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

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Wed, 25 Mar 1998 14:15:24 -0800 (PST)


On Wed, 25 Mar 1998, H. J. Lu wrote:

> After I doule checked with my Intel manual, I don't think it
> is true. Can you show me an example with opcodes for "pushl %ds"
> and %esp is changed by 4 bytes?

Yes. Here's push %ds, pop %ds with and without overrides.

Dean

% cat ds.c
void main(void)
{
asm(".byte 0x1e\n");
asm(".byte 0x1f\n");
asm(".byte 0x66,0x1e\n");
asm(".byte 0x66,0x1f\n");
}
% gcc -g ds.c
% gdb a.out
(gdb) b main
Breakpoint 1 at 0x8048407: file ds.c, line 3.
(gdb) disp/x $esp
(gdb) run
Starting program: /home/dgaudet/a.out

Breakpoint 1, main () at ds.c:3
3 asm(".byte 0x1e\n");
1: /x $esp = 0xbffff964
(gdb) n
4 asm(".byte 0x1f\n");
1: /x $esp = 0xbffff960
(gdb) n
5 asm(".byte 0x66,0x1e\n");
1: /x $esp = 0xbffff964
(gdb)
6 asm(".byte 0x66,0x1f\n");
1: /x $esp = 0xbffff962
(gdb)
7 }
1: /x $esp = 0xbffff964
(gdb) q

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