Share

The Netwide Assembler

Tracker: Bugs

5 PUSH QWORD imm is incorrectly disassembled in 64-bit mode - ID: 2039270
Last Update: Comment added ( nobody )

This input:
bits 64
push qword 0xffff0000

Gives this disassembly:
$ ndisasm -b 64 push
00000000 68 db 0x68
00000001 0000 add [rax],al
00000003 FF db 0xFF
00000004 FF db 0xFF

The correct disassembly ought to be "push qword 0xffffffffffff0000" (i.e.
sign-extended). The 0x68 instruction is forced to a 64-bit data size.


Göran Weinholt ( weinholt ) - 2008-08-05 20:20

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-12-17 00:09
Sender: nobody

It's true that ndisasm disassembles 68 00 00 FF FF as that.

The current NASM release won't assemble "push qword 0xffff0000"...

NASM 2.06rc1:
file:#: warning: signed dword immediate exceeds bounds


Rod Pemberton



Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.