llvm-project
2cdb8869 - [X86] Convert `mov moffs64` to `movabs` automatically (#172954)

Commit
72 days ago
[X86] Convert `mov moffs64` to `movabs` automatically (#172954) Opcodes 0xA0-0xA3 can access a 64-bit absolute address. Before this change, LLVM would require this to be written as `movabs`, and writing it as `mov` would silently truncate the address. After this change, if `mov moffset` is used with a constant expression which evaluates to a value that doesn't fit in 32 bits, the instruction will automatically be changed to `movabs`. This should match the behavior of more recent versions of gas. The one existing test which expected a silent truncation + sign-extend is removed. This change does not affect `mov` opcodes that reference an external symbol. Using `mov` will continue to generate a 32-bit address and reloc_signed_4byte, and `movabs` is required to specify a 64-bit address. Fixes #73481
Author
Parents
Loading