mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 17:28:21 +00:00
change the fp comparison instructions to not have %st0 explicitly
listed in its asm string, for consistency with the other similar instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3af0e7d5cd
commit
235705b9ca
@ -583,16 +583,16 @@ def UCOM_FPPr : FPI<0xE9, RawFrm, // cmp ST(0) with ST(1), pop, pop
|
||||
|
||||
def UCOM_FIr : FPI<0xE8, AddRegFrm, // CC = cmp ST(0) with ST(i)
|
||||
(outs), (ins RST:$reg),
|
||||
"fucomi\t{$reg, %st(0)|%ST(0), $reg}">, DB;
|
||||
"fucomi\t$reg">, DB;
|
||||
def UCOM_FIPr : FPI<0xE8, AddRegFrm, // CC = cmp ST(0) with ST(i), pop
|
||||
(outs), (ins RST:$reg),
|
||||
"fucomip\t{$reg, %st(0)|%ST(0), $reg}">, DF;
|
||||
"fucomip\t$reg">, DF;
|
||||
}
|
||||
|
||||
def COM_FIr : FPI<0xF0, AddRegFrm, (outs), (ins RST:$reg),
|
||||
"fcomi\t{$reg, %st(0)|%ST(0), $reg}">, DB;
|
||||
"fcomi\t$reg">, DB;
|
||||
def COM_FIPr : FPI<0xF0, AddRegFrm, (outs), (ins RST:$reg),
|
||||
"fcomip\t{$reg, %st(0)|%ST(0), $reg}">, DF;
|
||||
"fcomip\t$reg">, DF;
|
||||
|
||||
// Floating point flag ops.
|
||||
let Defs = [AX] in
|
||||
|
@ -1377,14 +1377,6 @@ def : InstAlias<"clrw $reg", (XOR16rr GR16:$reg, GR16:$reg)>;
|
||||
def : InstAlias<"clrl $reg", (XOR32rr GR32:$reg, GR32:$reg)>;
|
||||
def : InstAlias<"clrq $reg", (XOR64rr GR64:$reg, GR64:$reg)>;
|
||||
|
||||
// The instruction patterns for these instructions were written with st(0)
|
||||
// explicitly in the pattern, match the form with implicit st(0).
|
||||
// FIXME: Tweak these to work like fadd etc.
|
||||
def : InstAlias<"fcomi $reg", (COM_FIr RST:$reg)>;
|
||||
def : InstAlias<"fcomip $reg", (COM_FIPr RST:$reg)>;
|
||||
def : InstAlias<"fucomi $reg", (UCOM_FIr RST:$reg)>;
|
||||
def : InstAlias<"fucomip $reg", (UCOM_FIPr RST:$reg)>;
|
||||
|
||||
// Various unary fpstack operations default to operating on on ST1.
|
||||
// For example, "fxch" -> "fxch %st(1)"
|
||||
def : InstAlias<"faddp", (ADD_FPrST0 ST1)>;
|
||||
@ -1422,6 +1414,11 @@ defm : FpUnaryAlias<"fdiv", DIV_FST0r>;
|
||||
defm : FpUnaryAlias<"fdivp", DIVR_FPrST0>;
|
||||
defm : FpUnaryAlias<"fdivr", DIVR_FST0r>;
|
||||
defm : FpUnaryAlias<"fdivrp", DIV_FPrST0>;
|
||||
defm : FpUnaryAlias<"fcomi", COM_FIr>;
|
||||
defm : FpUnaryAlias<"fcomip", COM_FIPr>;
|
||||
defm : FpUnaryAlias<"fucomi", UCOM_FIr>;
|
||||
defm : FpUnaryAlias<"fucomip", 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
|
||||
|
@ -4474,19 +4474,19 @@
|
||||
// CHECK: encoding: [0xdb,0xda]
|
||||
fcmovnu %st(2),%st
|
||||
|
||||
// CHECK: fcomi %st(2), %st(0)
|
||||
// CHECK: fcomi %st(2)
|
||||
// CHECK: encoding: [0xdb,0xf2]
|
||||
fcomi %st(2),%st
|
||||
|
||||
// CHECK: fucomi %st(2), %st(0)
|
||||
// CHECK: fucomi %st(2)
|
||||
// CHECK: encoding: [0xdb,0xea]
|
||||
fucomi %st(2),%st
|
||||
|
||||
// CHECK: fcomip %st(2), %st(0)
|
||||
// CHECK: fcomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xf2]
|
||||
fcomip %st(2),%st
|
||||
|
||||
// CHECK: fucomip %st(2), %st(0)
|
||||
// CHECK: fucomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xea]
|
||||
fucomip %st(2),%st
|
||||
|
||||
@ -14150,16 +14150,16 @@
|
||||
// CHECK: fcmovnu %st(2), %st(0)
|
||||
fcmovnu %st(2),%st
|
||||
|
||||
// CHECK: fcomi %st(2), %st(0)
|
||||
// CHECK: fcomi %st(2)
|
||||
fcomi %st(2),%st
|
||||
|
||||
// CHECK: fucomi %st(2), %st(0)
|
||||
// CHECK: fucomi %st(2)
|
||||
fucomi %st(2),%st
|
||||
|
||||
// CHECK: fcomip %st(2), %st(0)
|
||||
// CHECK: fcomip %st(2)
|
||||
fcomip %st(2),%st
|
||||
|
||||
// CHECK: fucomip %st(2), %st(0)
|
||||
// CHECK: fucomip %st(2)
|
||||
fucomip %st(2),%st
|
||||
|
||||
// CHECK: movnti %ecx, 3735928559(%ebx,%ecx,8)
|
||||
|
@ -708,27 +708,27 @@ pshufw $90, %mm4, %mm0
|
||||
// CHECK: encoding: [0x0f,0x01,0x48,0x04]
|
||||
sidtl 4(%eax)
|
||||
|
||||
// CHECK: fcomip %st(2), %st(0)
|
||||
// CHECK: fcomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xf2]
|
||||
fcompi %st(2),%st
|
||||
|
||||
// CHECK: fcomip %st(2), %st(0)
|
||||
// CHECK: fcomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xf2]
|
||||
fcompi %st(2)
|
||||
|
||||
// CHECK: fcomip %st(1), %st(0)
|
||||
// CHECK: fcomip %st(1)
|
||||
// CHECK: encoding: [0xdf,0xf1]
|
||||
fcompi
|
||||
|
||||
// CHECK: fucomip %st(2), %st(0)
|
||||
// CHECK: fucomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xea]
|
||||
fucompi %st(2),%st
|
||||
|
||||
// CHECK: fucomip %st(2), %st(0)
|
||||
// CHECK: fucomip %st(2)
|
||||
// CHECK: encoding: [0xdf,0xea]
|
||||
fucompi %st(2)
|
||||
|
||||
// CHECK: fucomip %st(1), %st(0)
|
||||
// CHECK: fucomip %st(1)
|
||||
// CHECK: encoding: [0xdf,0xe9]
|
||||
fucompi
|
||||
|
||||
|
@ -261,11 +261,11 @@ fmulp
|
||||
fdivp
|
||||
fdivrp
|
||||
|
||||
// CHECK: fcomi %st(1), %st(0)
|
||||
// CHECK: fcomi %st(2), %st(0)
|
||||
// CHECK: fucomi %st(1), %st(0)
|
||||
// CHECK: fucomi %st(2), %st(0)
|
||||
// CHECK: fucomi %st(2), %st(0)
|
||||
// CHECK: fcomi %st(1)
|
||||
// CHECK: fcomi %st(2)
|
||||
// CHECK: fucomi %st(1)
|
||||
// CHECK: fucomi %st(2)
|
||||
// CHECK: fucomi %st(2)
|
||||
|
||||
fcomi
|
||||
fcomi %st(2)
|
||||
|
Loading…
Reference in New Issue
Block a user