Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit decoding error #59

Closed
tpresche opened this issue Oct 4, 2013 · 1 comment
Closed

64 bit decoding error #59

tpresche opened this issue Oct 4, 2013 · 1 comment

Comments

@tpresche
Copy link

tpresche commented Oct 4, 2013

Hi,

I think I have found a bug with either the library or the udcli tool. For testing purposes I assembled the following program (nasm syntax):

mov eax, ebx
mov [ecx], eax
push qword [r8]
sfence
iretq

I created an object file using nasm and converted the object file code into binary using objcopy. When I disassemble the object file using objdump I see the follwing (and correct) output:

objdump -d test.o
0: 89 d8 mov %ebx,%eax
2: 67 89 01 mov %eax,(%ecx)
5: 41 ff 30 pushq (%r8)
8: 0f ae f8 sfence
b: 48 cf iretq

When I use udcli with the binary file I get the following (incorrect) output:

./udcli < test.bin
0000000000000000 89d8 mov eax, ebx
0000000000000002 678901 mov [bx+di], eax
0000000000000005 41 inc ecx
0000000000000006 ff30 push dword [eax]
0000000000000008 0faef8 sfence
000000000000000b 48 dec eax
000000000000000c cf iretd

@tpresche tpresche closed this as completed Oct 4, 2013
@tpresche
Copy link
Author

tpresche commented Oct 4, 2013

forgot to use -64 switch. Ignore

@tpresche tpresche reopened this Oct 4, 2013
@tpresche tpresche closed this as completed Oct 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant