> 
> 
> > Help please.
> > 
> > I've investigated this to some degree but I hope to get a fast (and smart)
> > answer for this problem.
> > 
> > I've got the 2.1.84 distribution and I'm trying to build it.  I've
> > configured the kernel ok but in the last stages of the build I get the
> > following error.  Question:  Is my compiler the wrong version or is there
> > a bug in the assembly, or is it something else?
> > Any help or comments are very welcome.
> > 
> > sorry for the long post... I wanted to get all pertinant info in here.
> > 
> > make[2]: Entering directory `/usr/src/linux-2.1.84/arch/i386/lib'
> > as   -o locks.o locks.s
> > locks.s: Assembler messages:
> > locks.s:70: Error: operands given don't match any known 386 instruction
> > locks.s:73: Error: operands given don't match any known 386 instruction
> > 
> > 2:
> >         btl     %dl, smp_invalidate_needed
> >         jnc     0f
> >         lock
> >         btrl    %dl, smp_invalidate_needed
> >         jnc     0f
> > 
> > The error occurs at the bit [un]lock test (?) operands (btl/btrl) using
> > smp_invalidate_needed.
> > 

That is a very old one. From my binutils 2.9.1.0.7 release note:

5. There are some major x86 assembler changes with operand size suffix. 
   Some x86 assembler performence bugs are fixed. The Linux kernel and
   applications may run faster when assembled the new x86 assembler on
   x86. Please double check them on x86. gcc/egcs should be fine. But
   the Linux kernel does have some invalid x86 assembly code. In
   arch/i386/lib/locks.S, there was

        btl     %dl, SYMBOL_NAME(smp_invalidate_needed)

   It is not valid. The register should be either 16-bit or 32-bit. 
   8-bit is not allowed. Previously, gas would silently turn

        call sys_call_table(,%eax,4)
   into    
        call *sys_call_table(,%eax,4)

   Now, it is flagged as an error. There are asm codes like that in the
   Linux kernel. They should be fixed. If you have any x86 assembler
   problem, please let me know.


H.J.

Reply via email to