Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Segment pus...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 20 of 21 Topic 4599 of 4821
Post > Topic >>

Re: Segment push in RM

by "Rod Pemberton" <spamtrap@[EMAIL PROTECTED] > Apr 5, 2008 at 07:30 AM

"Cranky" <spamtrap@[EMAIL PROTECTED]
> wrote in message
news:975941fe-103e-4297-81c8-ba1042d7bb9d@[EMAIL PROTECTED]
> On Apr 4, 8:23 am, "Rod Pemberton"  <spamt...@[EMAIL PROTECTED]
> wrote:
> Hi Rod,
>     where did you get the above from, can't see it in my Intel pdf's.
> Is it an update for later models? Maybe that's why I don't see zero
> extension for P4/P3.
>

Cut and pasted (I fixed text arrows) from .pdf of:

IA-32 Intel Architecture Software Developer's Manual,
Volume 2B: Instruction Set Reference, N-Z
Order Number: 253667-018, January 2006
"PUSH-Push Word or Doubleword Onto the Stack" pg. 4-177 to 4-181

There probably are more recent versions.  I pulled these from someone
else's
post:

ftp://download.intel.com/design/Pentium4/manuals/25366518.pdf
ftp://download.intel.com/design/Pentium4/manuals/25366618.pdf
ftp://download.intel.com/design/Pentium4/manuals/25366718.pdf
ftp://download.intel.com/design/Pentium4/manuals/25366818.pdf
ftp://download.intel.com/design/Pentium4/manuals/25366918.pdf

> I think the reason your seeing EFLAGS (P2) is due to the segment
> register being pushed as..
>
>  ELSE StackAddrSize = 16
>   ...
>  ELSE (* OperandSize = 32 *)
>   ...
>  IF (SRC is CS or DS or ES or SS of FS or GS)
>   SP <- (SP - 4);
>   SS:SP <- SRC; (* Push word *) <--not dword for segment reg's
>  FI;
>
> or something like that..
>

Since the method I used uses the trap flag and trap interrupt, I thought
perhaps the trap interrupt returns: flags,CS,IP for IRET, overwrite the
stack...  So, I whipped up another test that disables interrupts, NMI, and
doesn't use the trap flag, call instruction, or interrupts, etc.

The results for the K6-2 and Pentium MMX are the same.  They push a 32-bit
value with upper 16-bits zeroed.

The results for the Intel Pentium II was different.  It only pushed
16-bits:
  1) it appears the flags came from trap interrupt returns
  2) the P2 is ignoring the db 0x66 prefix

So, I have to retract my previous statement that it pushed 32-bits... 
Sorry
about that.  Anyway, now I'd have to say the P2 has a bug... not an
undefined behavior.  It should be pu****ng 32-bits with db 0x66.


Rod Pemberton
 




 21 Posts in Topic:
Segment push in RM
Cranky <spamtrap@[EMA  2008-04-01 00:39:33 
Re: Segment push in RM
Frank Kotler <spamtra  2008-04-01 10:13:49 
Re: Segment push in RM
"Wolfgang Kern"  2008-04-01 14:53:19 
Re: Segment push in RM
"Rod Pemberton"  2008-04-01 06:30:27 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-01 05:52:51 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-01 07:23:22 
Re: Segment push in RM
Frank Kotler <spamtra  2008-04-01 22:04:44 
Re: Segment push in RM
"Rod Pemberton"  2008-04-02 04:05:32 
Re: Segment push in RM
Robert Redelmeier <red  2008-04-02 18:05:57 
Re: Segment push in RM
"Rod Pemberton"  2008-04-02 20:26:45 
Re: Segment push in RM
Robert Redelmeier <red  2008-04-03 21:30:34 
Re: Segment push in RM
"Rod Pemberton"  2008-04-03 21:23:12 
Re: Segment push in RM
"Wolfgang Kern"  2008-04-04 17:40:22 
Re: Segment push in RM
Robert Redelmeier <red  2008-04-04 20:19:13 
Re: Segment push in RM
"Rod Pemberton"  2008-04-05 07:53:21 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-01 23:59:11 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-02 21:03:26 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-02 20:28:18 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-03 23:33:40 
Re: Segment push in RM
"Rod Pemberton"  2008-04-05 07:30:07 
Re: Segment push in RM
Cranky <spamtrap@[EMA  2008-04-06 11:42:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 17:04:38 CDT 2008.