From: Craig Topper Date: Mon, 30 Apr 2018 01:53:12 +0000 (+0000) Subject: [X86] Remove support for accepting 'fnstsw %eax' and 'fnstsw %al'. X-Git-Tag: android-x86-7.1-r4~1686 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0d85819205d8a8bd789e0756784ee6df22be7936;p=android-x86%2Fexternal-llvm.git [X86] Remove support for accepting 'fnstsw %eax' and 'fnstsw %al'. I assume this was done because gas accepted it at one point, but current versions of gas don't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331154 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index ad743760d53..228c46e6d84 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -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. diff --git a/test/MC/X86/intel-syntax.s b/test/MC/X86/intel-syntax.s index da2f5f97dd3..7c64e83ed0d 100644 --- a/test/MC/X86/intel-syntax.s +++ b/test/MC/X86/intel-syntax.s @@ -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) diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s index 31e8888f398..343f7dc5057 100644 --- a/test/MC/X86/x86-64.s +++ b/test/MC/X86/x86-64.s @@ -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