diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-04 02:26:14 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-04 02:26:14 +0000 |
commit | 9dc3ede509c9dbe76ff123d280f31b011467ed08 (patch) | |
tree | 10a5802617b3f774d067285ee306e52a2a8d3a25 | |
parent | 55a85a47d4cb7bed22cd03f9f8003441a33cf1a7 (diff) | |
download | external_llvm-9dc3ede509c9dbe76ff123d280f31b011467ed08.zip external_llvm-9dc3ede509c9dbe76ff123d280f31b011467ed08.tar.gz external_llvm-9dc3ede509c9dbe76ff123d280f31b011467ed08.tar.bz2 |
Added instruction format class 3.15 and floating-point compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6594 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SparcV9/SparcV9.td | 15 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9_F3.td | 18 |
2 files changed, 22 insertions, 11 deletions
diff --git a/lib/Target/SparcV9/SparcV9.td b/lib/Target/SparcV9/SparcV9.td index adc9e4d..ca2d0be 100644 --- a/lib/Target/SparcV9/SparcV9.td +++ b/lib/Target/SparcV9/SparcV9.td @@ -188,15 +188,12 @@ def FSUBD : F3_16<2, 0b110100, 0x46, "fsubd">; // fsubd f, f, f def FSUBQ : F3_16<2, 0b110100, 0x47, "fsubq">; // fsubq f, f, f // Section A.13: Floating-point compare - p159 -// FIXME: FCMPS, FCMPD, FCMPQ !!! -#if 0 -def FSTOX : F3_14<2, 0b110100, 0b011001001, "fstod">; // fstod rs2, rd -def FDTOX : F3_14<2, 0b110100, 0b011001101, "fstoq">; // fstoq rs2, rd -def FQTOX : F3_14<2, 0b110100, 0b011000110, "fstos">; // fstos rs2, rd -def FSTOI : F3_14<2, 0b110100, 0b011001110, "fdtoq">; // fdtoq rs2, rd -def FDTOI : F3_14<2, 0b110100, 0b011000111, "fqtos">; // fqtos rs2, rd -def FQTOI : F3_14<2, 0b110100, 0b011001011, "fqtod">; // fqtod rs2, rd -#endif +def FCMPS : F3_15<2, 0b110101, 0b010100001, "fcmps">; // fcmps %fcc, r1, r2 +def FCMPD : F3_15<2, 0b110101, 0b010100010, "fcmpd">; // fcmpd %fcc, r1, r2 +def FCMPQ : F3_15<2, 0b110101, 0b010100011, "fcmpq">; // fcmpq %fcc, r1, r2 +def FCMPES : F3_15<2, 0b110101, 0b010100101, "fcmpes">; // fcmpes %fcc, r1, r2 +def FCMPED : F3_15<2, 0b110101, 0b010100110, "fcmped">; // fcmped %fcc, r1, r2 +def FCMPEQ : F3_15<2, 0b110101, 0b010100111, "fcmpeq">; // fcmpeq %fcc, r1, r2 // Section A.14: Convert floating-point to integer - p161 def FSTOX : F3_14<2, 0b110100, 0b010000001, "fstox">; // fstox rs2, rd diff --git a/lib/Target/SparcV9/SparcV9_F3.td b/lib/Target/SparcV9/SparcV9_F3.td index f29a3f8..a0033d8 100644 --- a/lib/Target/SparcV9/SparcV9_F3.td +++ b/lib/Target/SparcV9/SparcV9_F3.td @@ -202,12 +202,26 @@ class F3_13<bits<2> opVal, bits<6> op3Val, string name> : F3_rs1 { } class F3_14<bits<2> opVal, bits<6> op3Val, - bits<9> opfval, string name> : F3_rs2rd { + bits<9> opfVal, string name> : F3_rs2rd { set op = opVal; set op3 = op3Val; set Name = name; //set Inst{18-14} = dontcare; - set Inst{13-5} = opfval; + set Inst{13-5} = opfVal; +} + +class F3_15<bits<2> opVal, bits<6> op3Val, + bits<9> opfVal, string name> : F3 { + bits<2> cc; + bits<5> rs1; + bits<5> rs2; + + set op = opVal; + set op3 = op3Val; + set Inst{26-25} = cc; + set Inst{18-14} = rs1; + set Inst{13-5} = opfVal; + set Inst{4-0} = rs2; } class F3_16<bits<2> opVal, bits<6> op3Val, |