diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-12-30 22:10:49 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-12-30 22:10:49 +0000 |
commit | ee0432ce08941d74b47ad0cef4c6890018e8ab08 (patch) | |
tree | 2facbf55aafffa3e4ce589a2b72257f308e79a32 /llvm/lib | |
parent | 8a7d90b1528dbfdc263f5015d6fdfc48197fa924 (diff) | |
download | bcm5719-llvm-ee0432ce08941d74b47ad0cef4c6890018e8ab08.tar.gz bcm5719-llvm-ee0432ce08941d74b47ad0cef4c6890018e8ab08.zip |
Add another non-commutable instruction that gas accepts commuted forms for.
Fixes PR8861.
llvm-svn: 122641
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.td | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index 761e9ccb6c6..f9c0a7bbfb3 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -1465,14 +1465,15 @@ defm : FpUnaryAlias<"fucompi", UCOM_FIPr>; // Handle "f{mulp,addp} st(0), $op" the same as "f{mulp,addp} $op", since they -// commute. We also allow fdivrp/fsubrp even though they don't commute, solely -// because gas supports it. +// commute. We also allow fdiv[r]p/fsubrp even though they don't commute, +// solely because gas supports it. def : InstAlias<"faddp %st(0), $op", (ADD_FPrST0 RST:$op)>; def : InstAlias<"fmulp %st(0), $op", (MUL_FPrST0 RST:$op)>; def : InstAlias<"fsubrp %st(0), $op", (SUB_FPrST0 RST:$op)>; +def : InstAlias<"fdivp %st(0), $op", (DIVR_FPrST0 RST:$op)>; def : InstAlias<"fdivrp %st(0), $op", (DIV_FPrST0 RST:$op)>; -// We accepts "fnstsw %eax" even though it only writes %ax. +// We accept "fnstsw %eax" even though it only writes %ax. def : InstAlias<"fnstsw %eax", (FNSTSW8r)>; def : InstAlias<"fnstsw %al" , (FNSTSW8r)>; def : InstAlias<"fnstsw" , (FNSTSW8r)>; |