[llvm] r293030 - [X86]Enable the use of 'mov' with a 64bit GPR and a large immediate
Coby Tayree via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 23:09:42 PST 2017
Author: coby
Date: Wed Jan 25 01:09:42 2017
New Revision: 293030
URL: http://llvm.org/viewvc/llvm-project?rev=293030&view=rev
Log:
[X86]Enable the use of 'mov' with a 64bit GPR and a large immediate
Enable the next form (intel style):
"mov <reg64>, <largeImm>"
which is should be available,
where <largeImm> stands for immediates which exceed the range of a singed 32bit integer
Differential Revision: https://reviews.llvm.org/D28988
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
llvm/trunk/test/MC/X86/intel-syntax.s
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=293030&r1=293029&r2=293030&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Wed Jan 25 01:09:42 2017
@@ -2984,7 +2984,7 @@ def : InstAlias<"mov\t{$mem, $seg|$seg,
def : InstAlias<"mov\t{$seg, $mem|$mem, $seg}", (MOV32ms i32mem:$mem, SEGMENT_REG:$seg), 0>;
// Match 'movq <largeimm>, <reg>' as an alias for movabsq.
-def : InstAlias<"movq\t{$imm, $reg|$reg, $imm}", (MOV64ri GR64:$reg, i64imm:$imm), 0>;
+def : InstAlias<"mov{q}\t{$imm, $reg|$reg, $imm}", (MOV64ri GR64:$reg, i64imm:$imm), 0>;
// Match 'movq GR64, MMX' as an alias for movd.
def : InstAlias<"movq\t{$src, $dst|$dst, $src}",
Modified: llvm/trunk/test/MC/X86/intel-syntax.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/intel-syntax.s?rev=293030&r1=293029&r2=293030&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Wed Jan 25 01:09:42 2017
@@ -19,6 +19,8 @@ _main:
mov EAX, DWORD PTR [RSP - 4]
// CHECK: movq (%rsp), %rax
mov RAX, QWORD PTR [RSP]
+// CHECK: movabsq $4294967289, %rax
+ mov RAX, 4294967289
// CHECK: movl $-4, -4(%rsp)
mov DWORD PTR [RSP - 4], -4
// CHECK: movq 0, %rcx
More information about the llvm-commits
mailing list