[X86] Fix FBLD and FBSTP
authorMarina Yatsina <marina.yatsina@intel.com>
Thu, 20 Aug 2015 11:51:24 +0000 (11:51 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Thu, 20 Aug 2015 11:51:24 +0000 (11:51 +0000)
FBLD and FBSTP should receive TBYTE because it is defined as
FBLD m80
FBSTP m80

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245553 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrFPStack.td
test/MC/X86/intel-syntax.s

index 49068e9c37d3a20dc8a8ca7427ebdffe7756e20b..c2fe39c952e9610eaa8c465e5008cedb6895d947 100644 (file)
@@ -311,8 +311,8 @@ def FNSTSWm  : FPI<0xDD, MRM7m, (outs f32mem:$dst), (ins), "fnstsw\t$dst">;
 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> :
index c3cdb013571188923d24b462416eafccbf0cb2dd..95527b0eff25581c26f49f9930fa6fe3a285d43b 100644 (file)
@@ -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)