News for hackers. Stuff that matters.
Re:Loading an x64 register, how hard could it be? by userbinator on Sunday September 20, 2015 @12:56AM (#10246602)
I think the author is saying what's crazy is the lack of 64-bit immediates in a machine that contains 64-bit registers. There's an instruction to add a 32-bit immediate (and I believe 8 and 16 as well), but not a 64-bit one.
Re:Loading an x64 register, how hard could it be? by devit on Sunday September 20, 2015 @04:06AM (#10246902)
It's rare for programs to contain integer constants that don't fit in 32 bits, and they aren't needed for 64-bit code/global memory references due to the introduction of addressing relative to the instruction pointer.

Also there is a 15 bytes instruction length limit that would have to be extended if 64-bit immediates were allowed on all instructions.

Re:Loading an x64 register, how hard could it be? by hrydgard on Sunday September 20, 2015 @04:26AM (#10246933)
No processor out there has 64-bit arithmetic immediates - it's not useful enough in practice that you'd want it, and most other architectures have fixed-length 4-byte instructions anyway so it's not practical.
Re:Loading an x64 register, how hard could it be? by pcwalton on Sunday September 20, 2015 @01:47AM (#10246682)
It's not crazy: it's just standard operating procedure for RISC-like architectures. In fact, anything that brings the x86 architecture closer to RISC is nice in my book.