lkml.org 
[lkml]   [1998]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] APM support doesn't compile with binutils 2.8.1.0.24


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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.698 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site