x64 call instruction E8 00 00 00 00?

Trass3r un at known.com
Thu Jan 5 10:29:06 PST 2012


I can't wrap my brain around how the calls in dmd's x64 output code work.
According to http://siyobik.info/main/reference/instruction/CALL it is a
call relative to the next instruction (RIP).

And objdump prints just that.

0000000000000000 <_D4test3fooFZi>:
    0:	48 c7 c0 01 00 00 00 	mov    rax,0x1

0000000000000010 <_Dmain>:
   10:	e8 00 00 00 00     call   15 <_Dmain+0x5>
   15:	31 c0              xor    eax,eax
   17:	c3                 ret

While obj2asm prints:

_D4test3fooFZi:
		mov	RAX,1

_Dmain:
		call	  _D4test3fooFZi at PC32
		xor	EAX,EAX
		ret


More information about the Digitalmars-d mailing list