1

This question is about x86-64 assembly. Code is written in AT&T style syntax.

I want to do a jump to %rax+%rdx*8, but this seems to be possible only with two instructions:

lea (%rax,%rdx,8),%rax
jmp *%rax

However, since there is a way to do an even more complex thing:

jmp *(%rax,%rdx,8) # jumps to the address stored at address %rax+%rdx*8

I wonder if there is also a way of jumping directly to %rax+%rdx*8.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
Daniel S.
  • 6,458
  • 4
  • 35
  • 78
  • 6
    No, there isn't. – Jester Nov 04 '15 at 01:00
  • @Matt, this is not a duplicate. While the two questions are somewhat related, this question asks about how to calculate a jump address, but "x64: How to do a relative jmp *%rax?" is about how to make a jump RIP-relative or not RIP-relative. In fact, I'm trying to solve two different things here. – Daniel S. Nov 20 '15 at 01:43

0 Answers0