mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
[mips] Set isCommutable flag in a more explicit way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c88a8d978
commit
2f3e06399a
@ -137,8 +137,7 @@ multiclass FFR1P_M<bits<6> funct, string opstr, SDNode OpNode> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multiclass FFR2P_M<bits<6> funct, string opstr, SDNode OpNode, bit isComm = 0> {
|
multiclass FFR2P_M<bits<6> funct, string opstr, SDNode OpNode> {
|
||||||
let isCommutable = isComm in {
|
|
||||||
def _D32 : FFR2P<funct, 17, opstr, AFGR64, OpNode>,
|
def _D32 : FFR2P<funct, 17, opstr, AFGR64, OpNode>,
|
||||||
Requires<[NotFP64bit, HasStdEnc]>;
|
Requires<[NotFP64bit, HasStdEnc]>;
|
||||||
def _D64 : FFR2P<funct, 17, opstr, FGR64, OpNode>,
|
def _D64 : FFR2P<funct, 17, opstr, FGR64, OpNode>,
|
||||||
@ -146,7 +145,6 @@ multiclass FFR2P_M<bits<6> funct, string opstr, SDNode OpNode, bit isComm = 0> {
|
|||||||
let DecoderNamespace = "Mips64";
|
let DecoderNamespace = "Mips64";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// FP madd/msub/nmadd/nmsub instruction classes.
|
// FP madd/msub/nmadd/nmsub instruction classes.
|
||||||
class FMADDSUB<bits<3> funct, bits<3> fmt, string opstr,
|
class FMADDSUB<bits<3> funct, bits<3> fmt, string opstr,
|
||||||
@ -325,11 +323,11 @@ let Predicates = [HasMips64, HasStdEnc],
|
|||||||
|
|
||||||
/// Floating-point Aritmetic
|
/// Floating-point Aritmetic
|
||||||
def FADD_S : FFR2P<0x00, 16, "add.s", FGR32, fadd>, IsCommutable;
|
def FADD_S : FFR2P<0x00, 16, "add.s", FGR32, fadd>, IsCommutable;
|
||||||
defm FADD : FFR2P_M<0x00, "add.d", fadd, 1>;
|
defm FADD : FFR2P_M<0x00, "add.d", fadd>, IsCommutable;
|
||||||
def FDIV_S : FFR2P<0x03, 16, "div.s", FGR32, fdiv>;
|
def FDIV_S : FFR2P<0x03, 16, "div.s", FGR32, fdiv>;
|
||||||
defm FDIV : FFR2P_M<0x03, "div.d", fdiv>;
|
defm FDIV : FFR2P_M<0x03, "div.d", fdiv>;
|
||||||
def FMUL_S : FFR2P<0x02, 16, "mul.s", FGR32, fmul>, IsCommutable;
|
def FMUL_S : FFR2P<0x02, 16, "mul.s", FGR32, fmul>, IsCommutable;
|
||||||
defm FMUL : FFR2P_M<0x02, "mul.d", fmul, 1>;
|
defm FMUL : FFR2P_M<0x02, "mul.d", fmul>, IsCommutable;
|
||||||
def FSUB_S : FFR2P<0x01, 16, "sub.s", FGR32, fsub>;
|
def FSUB_S : FFR2P<0x01, 16, "sub.s", FGR32, fsub>;
|
||||||
defm FSUB : FFR2P_M<0x01, "sub.d", fsub>;
|
defm FSUB : FFR2P_M<0x01, "sub.d", fsub>;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user