Ticket #40 (closed defect: fixed)
instruction reg, [byte indexreg*scale+imm8] suspicious
| Reported by: | vclaudepierre@… | Owned by: | peter@… |
|---|---|---|---|
| Priority: | P2 | Milestone: | 0.4.0 |
| Component: | Architecture: x86 | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
;thanks for the nightly snapshots for Win9x, it rocks ! ; ;nasm 0.98 outputs 06h as a dword in any case, no warnings ;yasm r1162 outputs 06h as a byte if asked, no warnings too ;I would like a warning if possible. Moreover, ;the trouble is this opcode really needs DISP32 :-( (if I believe Ollydbg) ;in nasm's 0.98 html doc you may have a typo if I understand well, end of ;section A.2.3 ;"If mod is 0, r/m is 4 (meaning the SIB byte is present) AND BASE IS 4, ; the effective address encoded is not [EBP+index] as the above rules ; would suggest, but instead [disp32+index]: the displacement field is present ; and is four bytes long, and there is no base register (but the index register ; is still processed in the normal way)." ;I'll get an update of the doc if it exists ;IMHO you must read "AND BASE IS 5". Here we are in that special case. ;compiled with -fbin option ;a priori, idem with [bits 64] [bits 32] add [byte ebp*8+06h],ecx ;db 01,0c,0ed,06 probably wrong dd 90909090h add [dword ebp*8+06h],ecx ;db 01,0c,0ed,06,0,0,0 OK dd 90909090h add ecx,[byte ebp*8+06h] ;db 03,0c,0ed,06 probably wrong dd 90909090h add ecx,[dword ebp*8+06h] dd 90909090h add ecx,[byte ebx*8+06h] ;db 03,0c,0dd,06 probably wrong dd 90909090h add ecx,[dword ebx*8+06h] dd 90909090h Regards
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
