[llvm] r245553 - [X86] Fix FBLD and FBSTP

Marina Yatsina via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 04:51:24 PDT 2015


Author: myatsina
Date: Thu Aug 20 06:51:24 2015
New Revision: 245553

URL: http://llvm.org/viewvc/llvm-project?rev=245553&view=rev
Log:
[X86] Fix FBLD and FBSTP

FBLD and FBSTP should receive TBYTE because it is defined as
FBLD m80
FBSTP m80

Differential Revision: http://reviews.llvm.org/D11748


Modified:
    llvm/trunk/lib/Target/X86/X86InstrFPStack.td
    llvm/trunk/test/MC/X86/intel-syntax.s

Modified: llvm/trunk/lib/Target/X86/X86InstrFPStack.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFPStack.td?rev=245553&r1=245552&r2=245553&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrFPStack.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrFPStack.td Thu Aug 20 06:51:24 2015
@@ -311,8 +311,8 @@ def FNSTSWm  : FPI<0xDD, MRM7m, (outs f3
 def FICOM16m : FPI<0xDE, MRM2m, (outs), (ins i16mem:$src), "ficom{s}\t$src">;
 def FICOMP16m: FPI<0xDE, MRM3m, (outs), (ins i16mem:$src), "ficomp{s}\t$src">;
 
-def FBLDm    : FPI<0xDF, MRM4m, (outs), (ins f32mem:$src), "fbld\t$src">;
-def FBSTPm   : FPI<0xDF, MRM6m, (outs f32mem:$dst), (ins), "fbstp\t$dst">;
+def FBLDm    : FPI<0xDF, MRM4m, (outs), (ins f80mem:$src), "fbld\t$src">;
+def FBSTPm   : FPI<0xDF, MRM6m, (outs f80mem:$dst), (ins), "fbstp\t$dst">;
 
 // Floating point cmovs.
 class FpIf32CMov<dag outs, dag ins, FPFormat fp, list<dag> pattern> :

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=245553&r1=245552&r2=245553&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Thu Aug 20 06:51:24 2015
@@ -714,3 +714,8 @@ vcomiss xmm0, DWORD PTR [eax]
 // CHECK: comiss (%eax), %xmm0
 // CHECK: vcomisd (%eax), %xmm0
 // CHECK: vcomiss (%eax), %xmm0
+
+fbld tbyte ptr [eax]
+fbstp tbyte ptr [eax]
+// CHECK: fbld (%eax)
+// CHECK: fbstp (%eax)




More information about the llvm-commits mailing list