Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: Wed, 3 Sep 2008 09:47:15 -0400
"Herbert Kleebauer" <klee@xxxxxxxxx> wrote in message
news:48B4540F.25C76D0C@xxxxxxxxxxxx
Rod claimed, that "lsl eax, ebx" should be used instead of
"lsl eax, bx" because in 32 bit mode 32 bit registers are used
by default.
As have all of you! Do you remember saying this?
Herbert Kleebauer:
"I don't see any difference in ldsl and for example the
add instruction."
Frank Kotler:
"... in the reg, reg forms [of LSL], the size of the registers
must match."
Chuck Crayne:
"...disassembler might be show case 1 as lsl eax,ebx
[instead of lsl eax,bx]."
Randall Hyde:
"...you specify the 16-bit version in a 16-bit
segment and the 32-bit version in a 32-bit segment."
Those were from 2006 on clax:
http://groups.google.com/group/comp.lang.asm.x86/browse_thread/thread/15837b30374c5746/a13111f0554abe81?#a13111f0554abe81
Frank proofed[sic], that when "lsl" is used with a memory
operand only a 16 bit memory access occurs
Frank/Chuck/et al. proved on newer processors that the instruction uses
16-bits for the memory read. This is what the current Intel/AMD manuals
state. They didn't prove that older processors don't read/write 32-bits from
memory as their older manuals describe. Nor, did they prove anything about
the size of the source register which was the entire issue. But, even if
one could prove that all cpu's only accessed a 16-bit register, it still has
nothing to do with the fact that the assembly syntax should be 32-bit for
32-bit mode for these two instructions as all manuals indicate.
and it doesn't make
much sense to claim that in the register case the full 32 bit
register is accessed and the higher halve then is discarded.
What claim? This is _exactly_ what is stated in the Intel manuals from at
least 2003 to 2008 (and likely longer). Under LAR/LSL:
"1. For all loads (regardless of source or destination sizing) only bits
16-0 are used. Other bits are ignored."
So, you're saying that the Intel manuals have been continuously wrong for at
least five years?... They've rewritten the manuals over and over and
produced new manuals for 64-bit, but haven't noticed this specific error in
half a decade? To me, "it doesn't make much sense to claim that in that in
the register case the full 32 bit register" isn't accessed since the 386
manual explicitly indicates this is so...
Rod Pemberton
PS. Who is Nasm64developer?
.
- Follow-Ups:
- Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- From: Chuck Crayne
- Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- From: Frank Kotler
- Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Prev by Date: Re: for 7 segment display
- Next by Date: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Previous by thread: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Next by thread: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Index(es):
Relevant Pages
|