title: Declaring constant absolute 64-bit addresses in NASM
body: <p>I need to declare a dummy absolute address in the code of a self-modifying program. This pointer works similar to a relocation for a linker - it only reserves appropriate space in the instruction and is updated with a valid address later on at runtime. This has worked fine for me on x86-32:</p>
  
  <pre><code>movups xmm0, [0xDEADBEEF]
  </code></pre>
  
  <p>This assembles and works as expected at runtime. However, when I try to do this in x86-64 code:</p>
  
  <pre><code>movups xmm0, [0xDEADC0DEDEADBEEF]
  </code></pre>
  
  <p>It assembles with the following warning:</p>
  
  <pre><code>warning: dword data exceeds bounds
  </code></pre>
  
  <p>And promptly crashes at runtime because the next instruction is overwritten with the rest of the address, which happens to be garbage instruction-wise.</p>
  
  <p>Any address longer than 32 bits fails to assemble without a warning, even a minimally longer one than 32 bits:</p>
  
  <pre><code>movups xmm0, [0xADEADBEEF] ; 36-bit address
  </code></pre>
  
  <p>How should I go about declaring a constant, absolute 64-bit pointer? Or is there just no way around it and I need to drop a RIP-relative, 32-bit pointer in there?</p>