0
votes

This is the source of confusion: movl (%edx), %eax This treats the value of %eax as an address, goes to it and copies its content to %eax,

Keeping that in mind then looking at: jmp *(%edx) Since parenthesis was used earlier (as dereferencing in the mov instruction), then is the asterisk a form of double dereference ?

...and how would this instruction perform differently ? --> jmp (%edx)

...or what about jmp *%edx versus jmp %edx ?

1
This is AT&T syntax, please keep it tagged that way. - Gunner
Your first statement.. I think its a typo... Did you mean: "It treats the values of %edx as an address, goes to it and copies its contents to %eax" - Sam

1 Answers

0
votes

The * indicates an absolute jump, in contrast with the absense of the asterisk meaning a relative jump. See http://sourceware.org/binutils/docs-2.17/as/i386_002dMemory.html#i386_002dMemory

However, I don't know whether the assembler infers the absolute jump from the indirection even if the * is missing or it barks on the impossibility of an indirect relative jump.