[llvm] r335414 - [X86] Make %eiz usage in 64-bit mode, force a 0x67 address size prefix. Fix some test CHECK lines.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 22 23:15:05 PDT 2018
Author: ctopper
Date: Fri Jun 22 23:15:04 2018
New Revision: 335414
URL: http://llvm.org/viewvc/llvm-project?rev=335414&view=rev
Log:
[X86] Make %eiz usage in 64-bit mode, force a 0x67 address size prefix. Fix some test CHECK lines.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
llvm/trunk/test/MC/X86/x86_64-encoding.s
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp?rev=335414&r1=335413&r2=335414&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp Fri Jun 22 23:15:04 2018
@@ -219,6 +219,8 @@ static bool Is32BitMemOperand(const MCIn
assert(IndexReg.getReg() == 0 && "Invalid eip-based address.");
return true;
}
+ if (IndexReg.getReg() == X86::EIZ)
+ return true;
return false;
}
Modified: llvm/trunk/test/MC/X86/x86_64-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_64-encoding.s?rev=335414&r1=335413&r2=335414&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86_64-encoding.s (original)
+++ llvm/trunk/test/MC/X86/x86_64-encoding.s Fri Jun 22 23:15:04 2018
@@ -276,14 +276,18 @@ sha256msg2 (%rax), %xmm2
// CHECK: encoding: [0x66,0x0f,0xc4,0xe9,0x03]
pinsrw $3, %rcx, %xmm5
-//CHECK movq 12(%rdi), %rsi
-//CHECK encoding: [0x48,0x8b,0x77,0x0c]
+//CHECK: movq 12(%rdi), %rsi
+//CHECK: encoding: [0x48,0x8b,0x77,0x0c]
movq 16+0-4(%rdi),%rsi
-//CHECK movq 12(%rdi), %rsi
-//CHECK encoding: [0x48,0x8b,0x77,0x0c]
+//CHECK: movq 12(%rdi), %rsi
+//CHECK: encoding: [0x48,0x8b,0x77,0x0c]
movq (16+(0-4))(%rdi),%rsi
-//CHECK movq 12(%rdi), %rsi
-//CHECK encoding: [0x48,0x8b,0x77,0x0c]
+//CHECK: movq 12(%rdi), %rsi
+//CHECK: encoding: [0x48,0x8b,0x77,0x0c]
movq (16+0)-1+1-2+2-3+3-4+4-5+5-6+6-(4)(%rdi),%rsi
+
+//CHECK: movq (,%eiz), %rax
+//CHECK: encoding: [0x67,0x48,0x8b,0x04,0x25,0x00,0x00,0x00,0x00]
+ movq (,%eiz), %rax
More information about the llvm-commits
mailing list