0
movabsq $0x1F, %r9

This is an ATT version instruction so $0x1F is sorce and %r9 is dest.

I think this instruction is correct.

Janez Kuhar
  • 3,705
  • 4
  • 22
  • 45
平沢唯
  • 26
  • 3
  • 1
    Yes, that's correct. You could have just tried it by assembling it into an executable and single-stepping it in a debugger. (Yes, that line by itself in a `.s` will work with `gcc -nostdlib -static foo.s`, to get that instruction as the first one executed in user-space where you can single-step it. And then crash if you let it step farther, but that's fine.) – Peter Cordes Apr 13 '21 at 06:35
  • If you mean efficient, though, in terms of how to set R9 = 0x1F, it's worse code-size than `mov $0x1F, %r9d`. So it's correct but not efficient. – Peter Cordes Apr 13 '21 at 06:38

0 Answers0