mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-06 12:04:52 +00:00
Added VCVT (between floating-point and fixed-point, VFP) for disassembly.
A8.6.297 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95885 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6f7b27fda
commit
27bb8d0a88
@ -412,6 +412,101 @@ def VTOUIRS : AVConv1In<0b11101, 0b11, 0b1100, 0b1010,
|
||||
let Inst{7} = 0; // Z bit
|
||||
}
|
||||
|
||||
// Convert between floating-point and fixed-point
|
||||
// Data type for fixed-point naming convention:
|
||||
// S16 (U=0, sx=0) -> SH
|
||||
// U16 (U=1, sx=0) -> UH
|
||||
// S32 (U=0, sx=1) -> SL
|
||||
// U32 (U=1, sx=1) -> UL
|
||||
|
||||
let Constraints = "$a = $dst" in {
|
||||
|
||||
// FP to Fixed-Point:
|
||||
|
||||
def VTOSHS : AVConv1XI<0b11101, 0b11, 0b1110, 0b1010, 0,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTSI, "vcvt", ".s16.f32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOUHS : AVConv1XI<0b11101, 0b11, 0b1111, 0b1010, 0,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTSI, "vcvt", ".u16.f32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOSLS : AVConv1XI<0b11101, 0b11, 0b1110, 0b1010, 1,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTSI, "vcvt", ".s32.f32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOULS : AVConv1XI<0b11101, 0b11, 0b1111, 0b1010, 1,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTSI, "vcvt", ".u32.f32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOSHD : AVConv1XI<0b11101, 0b11, 0b1110, 0b1011, 0,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTDI, "vcvt", ".s16.f64\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOUHD : AVConv1XI<0b11101, 0b11, 0b1111, 0b1011, 0,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTDI, "vcvt", ".u16.f64\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOSLD : AVConv1XI<0b11101, 0b11, 0b1110, 0b1011, 1,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTDI, "vcvt", ".s32.f64\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VTOULD : AVConv1XI<0b11101, 0b11, 0b1111, 0b1011, 1,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTDI, "vcvt", ".u32.f64\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
// Fixed-Point to FP:
|
||||
|
||||
def VSHTOS : AVConv1XI<0b11101, 0b11, 0b1010, 0b1010, 0,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.s16\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VUHTOS : AVConv1XI<0b11101, 0b11, 0b1011, 0b1010, 0,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.u16\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VSLTOS : AVConv1XI<0b11101, 0b11, 0b1010, 0b1010, 1,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.s32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VULTOS : AVConv1XI<0b11101, 0b11, 0b1011, 0b1010, 1,
|
||||
(outs SPR:$dst), (ins SPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.u32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VSHTOD : AVConv1XI<0b11101, 0b11, 0b1010, 0b1011, 0,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTID, "vcvt", ".f64.s16\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VUHTOD : AVConv1XI<0b11101, 0b11, 0b1011, 0b1011, 0,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTID, "vcvt", ".f64.u16\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VSLTOD : AVConv1XI<0b11101, 0b11, 0b1010, 0b1011, 1,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTID, "vcvt", ".f64.s32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
def VULTOD : AVConv1XI<0b11101, 0b11, 0b1011, 0b1011, 1,
|
||||
(outs DPR:$dst), (ins DPR:$a, i32imm:$fbits),
|
||||
IIC_fpCVTID, "vcvt", ".f64.u32\t$dst, $a, $fbits",
|
||||
[/* For disassembly only; pattern left blank */]>;
|
||||
|
||||
} // End of 'let Constraints = "$src = $dst" in'
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FP FMA Operations.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user