Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: