[X86] Remove support for accepting 'fnstsw %eax' and 'fnstsw %al'.
authorCraig Topper <craig.topper@intel.com>
Mon, 30 Apr 2018 01:53:12 +0000 (01:53 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 30 Apr 2018 01:53:12 +0000 (01:53 +0000)
I assume this was done because gas accepted it at one point, but current versions of gas don't.

llvm-svn: 331154

llvm/lib/Target/X86/X86InstrInfo.td
llvm/test/MC/X86/intel-syntax.s
llvm/test/MC/X86/x86-64.s

index ad74376..228c46e 100644 (file)
@@ -3151,10 +3151,7 @@ def : InstAlias<"fsub{r|}p\t{%st(0), $op|$op, st(0)}", (SUB_FPrST0 RST:$op)>;
 def : InstAlias<"fdiv{|r}p\t{%st(0), $op|$op, st(0)}", (DIVR_FPrST0 RST:$op)>;
 def : InstAlias<"fdiv{r|}p\t{%st(0), $op|$op, st(0)}", (DIV_FPrST0 RST:$op)>;
 
-// We accept "fnstsw %eax" even though it only writes %ax.
-def : InstAlias<"fnstsw\t{%eax|eax}", (FNSTSW16r)>;
-def : InstAlias<"fnstsw\t{%al|al}" , (FNSTSW16r)>;
-def : InstAlias<"fnstsw"     , (FNSTSW16r)>;
+def : InstAlias<"fnstsw"     , (FNSTSW16r), 0>;
 
 // lcall and ljmp aliases.  This seems to be an odd mapping in 64-bit mode, but
 // this is compatible with what GAS does.
index da2f5f9..7c64e83 100644 (file)
@@ -551,13 +551,9 @@ test [ECX], AL
 
 // CHECK: fnstsw %ax
 // CHECK: fnstsw %ax
-// CHECK: fnstsw %ax
-// CHECK: fnstsw %ax
 // CHECK: fnstsw (%eax)
 fnstsw
 fnstsw AX
-fnstsw EAX
-fnstsw AL
 fnstsw WORD PTR [EAX]
 
 // CHECK: faddp %st(1)
index 31e8888..343f7dc 100644 (file)
@@ -340,13 +340,9 @@ fucomi     %st(2), %st
 
 // CHECK: fnstsw %ax
 // CHECK: fnstsw %ax
-// CHECK: fnstsw %ax
-// CHECK: fnstsw %ax
 
 fnstsw
 fnstsw %ax
-fnstsw %eax
-fnstsw %al
 
 // rdar://8431880
 // CHECK: rclb %bl