x86 BSWAP instruction REX doesn't follow Intel specs?
问题 I've been assembling (and disassembling) the BSWAP x64 instruction with both NASM and GAS, and both assemble the instruction BSWAP r15 as 490FCF in hex. Disassemblers also disassemble this to the same instruction. The REX prefix for the instruction ( 49 ) thus has the REX.W bit (bit 3) and the REX.B bit (bit 0) set. This is directly in contrast to the Intel documentation, which states: In 64-bit mode, the instruction’s default operation size is 32 bits. Using a REX prefix in the form of REX.R