Re: [PATCH] APM support doesn't compile with binutils 2.8.1.0.24

H. J. Lu (hjl@freya.yggdrasil.com)
Wed, 25 Mar 1998 17:23:11 -0800 (PST)


>
> This has really kicked up a storm of messages! It's a pity I didn't
> get my first patch to gas correct, and I guess I should have posted
> some of my correspondence with Ian Taylor here on linux-kernel. That
> may have reduced the message flood somewhat.
>
> I have another patch which I think has the correct behaviour. Here is
> an example of what my latest gas produces, assuming a default data
> size of 32 bits.

Please wait until 2.8.1.0.26. My current gas get:

# cat 1.s
push %ds
pushl %ds
pushw %ds
mov %ds,%ax
movw %ds,%ax
movw %ds,%eax
mov %ds,%eax
movl %ds,%eax
movl %ds,%ax
# gcc -c 1.s
# objdump -d 1.o

1.o: file format elf32-i386

Disassembly of section .text:

00000000 <.text>:
0: 1e pushl %ds
1: 1e pushl %ds
2: 66 1e pushw %ds
4: 66 8c d8 movw %ds,%ax
7: 66 8c d8 movw %ds,%ax
a: 66 8c d8 movw %ds,%ax
d: 8c d8 movl %ds,%eax
f: 8c d8 movl %ds,%eax
11: 8c d8 movl %ds,%eax
# cat 2.s
movb %ds,%ax
movb %ds,%eax
pushb %ds
# gcc -c 2.s
2.s: Assembler messages:
2.s:1: Error: register does not match opcode suffix
2.s:2: Error: register does not match opcode suffix
2.s:3: Error: register does not match opcode suffix

Does it look to everyone? I am preparing for 2.8.1.0.26 today
or tomorrow.

BTW, Linus is right. Intel reference manual is wrong on segment
registers. I had to modify opcodes/i386-dis.c too.

Thanks.

H.J.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu