News for hackers. Stuff that matters.
Re:Loading an x64 register, how hard could it be? by waterhouse on Sunday September 20, 2015 @02:59AM (#10246790)
> "it is impossible to add 2^33 to rax using one instruction only."

This can in fact be done, with a memory operand. I'm not sure about the performance compared to a 64-bit load immediate followed by an add, but this will do it (NASM syntax):

          add rax, [rel the_constant]
          ...
  
  the_constant:
          dq 8589934592
Re:Loading an x64 register, how hard could it be? by raverbashing on Sunday September 20, 2015 @04:44AM (#10246954)
This is the right answer.

This is what ARM does a lot of times (their 'immediate' value ops allow you to pick an 8 bit number and rotate it a bit)

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....