mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 00:27:31 +00:00
Modified encoding bits specification for VFP instructions. In particular, the D
bit (Inst{22}) and the M bit (Inst{5}) should be left unspecified. For binary format instructions, Inst{6} and Inst{4} need to specified for proper decodings. llvm-svn: 94855
This commit is contained in:
parent
c5a2b73589
commit
377da9a33c
@ -1246,75 +1246,90 @@ class AXSI5<dag oops, dag iops, InstrItinClass itin,
|
||||
}
|
||||
|
||||
// Double precision, unary
|
||||
class ADuI<bits<8> opcod1, bits<4> opcod2, bits<4> opcod3, dag oops, dag iops,
|
||||
InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
class ADuI<bits<5> opcod1, bits<2> opcod2, bits<4> opcod3, bits<2> opcod4,
|
||||
bit opcod5, dag oops, dag iops, InstrItinClass itin, string opc,
|
||||
string asm, list<dag> pattern>
|
||||
: VFPAI<oops, iops, VFPUnaryFrm, itin, opc, asm, pattern> {
|
||||
let Inst{27-20} = opcod1;
|
||||
let Inst{19-16} = opcod2;
|
||||
let Inst{27-23} = opcod1;
|
||||
let Inst{21-20} = opcod2;
|
||||
let Inst{19-16} = opcod3;
|
||||
let Inst{11-8} = 0b1011;
|
||||
let Inst{7-4} = opcod3;
|
||||
let Inst{7-6} = opcod4;
|
||||
let Inst{4} = opcod5;
|
||||
}
|
||||
|
||||
// Double precision, binary
|
||||
class ADbI<bits<8> opcod, dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
class ADbI<bits<5> opcod1, bits<2> opcod2, bit op6, bit op4, dag oops,
|
||||
dag iops, InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
: VFPAI<oops, iops, VFPBinaryFrm, itin, opc, asm, pattern> {
|
||||
let Inst{27-20} = opcod;
|
||||
let Inst{27-23} = opcod1;
|
||||
let Inst{21-20} = opcod2;
|
||||
let Inst{11-8} = 0b1011;
|
||||
let Inst{6} = op6;
|
||||
let Inst{4} = op4;
|
||||
}
|
||||
|
||||
// Single precision, unary
|
||||
class ASuI<bits<8> opcod1, bits<4> opcod2, bits<4> opcod3, dag oops, dag iops,
|
||||
InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
class ASuI<bits<5> opcod1, bits<2> opcod2, bits<4> opcod3, bits<2> opcod4,
|
||||
bit opcod5, dag oops, dag iops, InstrItinClass itin, string opc,
|
||||
string asm, list<dag> pattern>
|
||||
: VFPAI<oops, iops, VFPUnaryFrm, itin, opc, asm, pattern> {
|
||||
// Bits 22 (D bit) and 5 (M bit) will be changed during instruction encoding.
|
||||
let Inst{27-20} = opcod1;
|
||||
let Inst{19-16} = opcod2;
|
||||
let Inst{27-23} = opcod1;
|
||||
let Inst{21-20} = opcod2;
|
||||
let Inst{19-16} = opcod3;
|
||||
let Inst{11-8} = 0b1010;
|
||||
let Inst{7-4} = opcod3;
|
||||
let Inst{7-6} = opcod4;
|
||||
let Inst{4} = opcod5;
|
||||
}
|
||||
|
||||
// Single precision unary, if no NEON
|
||||
// Same as ASuI except not available if NEON is enabled
|
||||
class ASuIn<bits<8> opcod1, bits<4> opcod2, bits<4> opcod3, dag oops, dag iops,
|
||||
InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
: ASuI<opcod1, opcod2, opcod3, oops, iops, itin, opc, asm, pattern> {
|
||||
class ASuIn<bits<5> opcod1, bits<2> opcod2, bits<4> opcod3, bits<2> opcod4,
|
||||
bit opcod5, dag oops, dag iops, InstrItinClass itin, string opc,
|
||||
string asm, list<dag> pattern>
|
||||
: ASuI<opcod1, opcod2, opcod3, opcod4, opcod5, oops, iops, itin, opc, asm,
|
||||
pattern> {
|
||||
list<Predicate> Predicates = [HasVFP2,DontUseNEONForFP];
|
||||
}
|
||||
|
||||
// Single precision, binary
|
||||
class ASbI<bits<8> opcod, dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
class ASbI<bits<5> opcod1, bits<2> opcod2, bit op6, bit op4, dag oops, dag iops,
|
||||
InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
: VFPAI<oops, iops, VFPBinaryFrm, itin, opc, asm, pattern> {
|
||||
// Bit 22 (D bit) can be changed during instruction encoding.
|
||||
let Inst{27-20} = opcod;
|
||||
let Inst{27-23} = opcod1;
|
||||
let Inst{21-20} = opcod2;
|
||||
let Inst{11-8} = 0b1010;
|
||||
let Inst{6} = op6;
|
||||
let Inst{4} = op4;
|
||||
}
|
||||
|
||||
// Single precision binary, if no NEON
|
||||
// Same as ASbI except not available if NEON is enabled
|
||||
class ASbIn<bits<8> opcod, dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
: ASbI<opcod, oops, iops, itin, opc, asm, pattern> {
|
||||
class ASbIn<bits<5> opcod1, bits<2> opcod2, bit op6, bit op4, dag oops,
|
||||
dag iops, InstrItinClass itin, string opc, string asm, list<dag> pattern>
|
||||
: ASbI<opcod1, opcod2, op6, op4, oops, iops, itin, opc, asm, pattern> {
|
||||
list<Predicate> Predicates = [HasVFP2,DontUseNEONForFP];
|
||||
}
|
||||
|
||||
// VFP conversion instructions
|
||||
class AVConv1I<bits<8> opcod1, bits<4> opcod2, bits<4> opcod3,
|
||||
dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
class AVConv1I<bits<5> opcod1, bits<2> opcod2, bits<4> opcod3, bits<4> opcod4,
|
||||
dag oops, dag iops, InstrItinClass itin, string opc, string asm,
|
||||
list<dag> pattern>
|
||||
: VFPAI<oops, iops, VFPConv1Frm, itin, opc, asm, pattern> {
|
||||
let Inst{27-20} = opcod1;
|
||||
let Inst{19-16} = opcod2;
|
||||
let Inst{11-8} = opcod3;
|
||||
let Inst{27-23} = opcod1;
|
||||
let Inst{21-20} = opcod2;
|
||||
let Inst{19-16} = opcod3;
|
||||
let Inst{11-8} = opcod4;
|
||||
let Inst{6} = 1;
|
||||
let Inst{4} = 0;
|
||||
}
|
||||
|
||||
// VFP conversion instructions, if no NEON
|
||||
class AVConv1In<bits<8> opcod1, bits<4> opcod2, bits<4> opcod3,
|
||||
class AVConv1In<bits<5> opcod1, bits<2> opcod2, bits<4> opcod3, bits<4> opcod4,
|
||||
dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
: AVConv1I<opcod1, opcod2, opcod3, oops, iops, itin, opc, asm, pattern> {
|
||||
: AVConv1I<opcod1, opcod2, opcod3, opcod4, oops, iops, itin, opc, asm,
|
||||
pattern> {
|
||||
list<Predicate> Predicates = [HasVFP2,DontUseNEONForFP];
|
||||
}
|
||||
|
||||
|
@ -114,52 +114,48 @@ def VSTMS : AXSI5<(outs), (ins addrmode5:$addr, pred:$p, reglist:$wb,
|
||||
// FP Binary Operations.
|
||||
//
|
||||
|
||||
def VADDD : ADbI<0b11100011, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
def VADDD : ADbI<0b11100, 0b11, 0, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpALU64, "vadd", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fadd DPR:$a, DPR:$b))]>;
|
||||
|
||||
def VADDS : ASbIn<0b11100011, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
def VADDS : ASbIn<0b11100, 0b11, 0, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpALU32, "vadd", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fadd SPR:$a, SPR:$b))]>;
|
||||
|
||||
// These are encoded as unary instructions.
|
||||
let Defs = [FPSCR] in {
|
||||
def VCMPED : ADuI<0b11101011, 0b0100, 0b1100, (outs), (ins DPR:$a, DPR:$b),
|
||||
def VCMPED : ADuI<0b11101, 0b11, 0b0100, 0b11, 0, (outs), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpCMP64, "vcmpe", ".f64\t$a, $b",
|
||||
[(arm_cmpfp DPR:$a, DPR:$b)]>;
|
||||
|
||||
def VCMPES : ASuI<0b11101011, 0b0100, 0b1100, (outs), (ins SPR:$a, SPR:$b),
|
||||
def VCMPES : ASuI<0b11101, 0b11, 0b0100, 0b11, 0, (outs), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpCMP32, "vcmpe", ".f32\t$a, $b",
|
||||
[(arm_cmpfp SPR:$a, SPR:$b)]>;
|
||||
}
|
||||
|
||||
def VDIVD : ADbI<0b11101000, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
def VDIVD : ADbI<0b11101, 0b00, 0, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpDIV64, "vdiv", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fdiv DPR:$a, DPR:$b))]>;
|
||||
|
||||
def VDIVS : ASbI<0b11101000, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
def VDIVS : ASbI<0b11101, 0b00, 0, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpDIV32, "vdiv", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fdiv SPR:$a, SPR:$b))]>;
|
||||
|
||||
def VMULD : ADbI<0b11100010, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
def VMULD : ADbI<0b11100, 0b10, 0, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpMUL64, "vmul", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fmul DPR:$a, DPR:$b))]>;
|
||||
|
||||
def VMULS : ASbIn<0b11100010, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
def VMULS : ASbIn<0b11100, 0b10, 0, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpMUL32, "vmul", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fmul SPR:$a, SPR:$b))]>;
|
||||
|
||||
def VNMULD : ADbI<0b11100010, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
def VNMULD : ADbI<0b11100, 0b10, 1, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpMUL64, "vnmul", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fneg (fmul DPR:$a, DPR:$b)))]> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
[(set DPR:$dst, (fneg (fmul DPR:$a, DPR:$b)))]>;
|
||||
|
||||
def VNMULS : ASbI<0b11100010, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
def VNMULS : ASbI<0b11100, 0b10, 1, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpMUL32, "vnmul", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fneg (fmul SPR:$a, SPR:$b)))]> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
[(set SPR:$dst, (fneg (fmul SPR:$a, SPR:$b)))]>;
|
||||
|
||||
// Match reassociated forms only if not sign dependent rounding.
|
||||
def : Pat<(fmul (fneg DPR:$a), DPR:$b),
|
||||
@ -168,41 +164,37 @@ def : Pat<(fmul (fneg SPR:$a), SPR:$b),
|
||||
(VNMULS SPR:$a, SPR:$b)>, Requires<[NoHonorSignDependentRounding]>;
|
||||
|
||||
|
||||
def VSUBD : ADbI<0b11100011, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
def VSUBD : ADbI<0b11100, 0b11, 1, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
||||
IIC_fpALU64, "vsub", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fsub DPR:$a, DPR:$b))]> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
[(set DPR:$dst, (fsub DPR:$a, DPR:$b))]>;
|
||||
|
||||
def VSUBS : ASbIn<0b11100011, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
def VSUBS : ASbIn<0b11100, 0b11, 1, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
||||
IIC_fpALU32, "vsub", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fsub SPR:$a, SPR:$b))]> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
[(set SPR:$dst, (fsub SPR:$a, SPR:$b))]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FP Unary Operations.
|
||||
//
|
||||
|
||||
def VABSD : ADuI<0b11101011, 0b0000, 0b1100, (outs DPR:$dst), (ins DPR:$a),
|
||||
def VABSD : ADuI<0b11101, 0b11, 0b0000, 0b11, 0, (outs DPR:$dst), (ins DPR:$a),
|
||||
IIC_fpUNA64, "vabs", ".f64\t$dst, $a",
|
||||
[(set DPR:$dst, (fabs DPR:$a))]>;
|
||||
|
||||
def VABSS : ASuIn<0b11101011, 0b0000, 0b1100, (outs SPR:$dst), (ins SPR:$a),
|
||||
def VABSS : ASuIn<0b11101, 0b11, 0b0000, 0b11, 0,(outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpUNA32, "vabs", ".f32\t$dst, $a",
|
||||
[(set SPR:$dst, (fabs SPR:$a))]>;
|
||||
|
||||
let Defs = [FPSCR] in {
|
||||
def VCMPEZD : ADuI<0b11101011, 0b0101, 0b1100, (outs), (ins DPR:$a),
|
||||
def VCMPEZD : ADuI<0b11101, 0b11, 0b0101, 0b11, 0, (outs), (ins DPR:$a),
|
||||
IIC_fpCMP64, "vcmpe", ".f64\t$a, #0",
|
||||
[(arm_cmpfp0 DPR:$a)]>;
|
||||
|
||||
def VCMPEZS : ASuI<0b11101011, 0b0101, 0b1100, (outs), (ins SPR:$a),
|
||||
def VCMPEZS : ASuI<0b11101, 0b11, 0b0101, 0b11, 0, (outs), (ins SPR:$a),
|
||||
IIC_fpCMP32, "vcmpe", ".f32\t$a, #0",
|
||||
[(arm_cmpfp0 SPR:$a)]>;
|
||||
}
|
||||
|
||||
def VCVTDS : ASuI<0b11101011, 0b0111, 0b1100, (outs DPR:$dst), (ins SPR:$a),
|
||||
def VCVTDS : ASuI<0b11101, 0b11, 0b0111, 0b11, 0, (outs DPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTDS, "vcvt", ".f64.f32\t$dst, $a",
|
||||
[(set DPR:$dst, (fextend SPR:$a))]>;
|
||||
|
||||
@ -213,30 +205,31 @@ def VCVTSD : VFPAI<(outs SPR:$dst), (ins DPR:$a), VFPUnaryFrm,
|
||||
let Inst{27-23} = 0b11101;
|
||||
let Inst{21-16} = 0b110111;
|
||||
let Inst{11-8} = 0b1011;
|
||||
let Inst{7-4} = 0b1100;
|
||||
let Inst{7-6} = 0b11;
|
||||
let Inst{4} = 0;
|
||||
}
|
||||
|
||||
let neverHasSideEffects = 1 in {
|
||||
def VMOVD: ADuI<0b11101011, 0b0000, 0b0100, (outs DPR:$dst), (ins DPR:$a),
|
||||
def VMOVD: ADuI<0b11101, 0b11, 0b0000, 0b01, 0, (outs DPR:$dst), (ins DPR:$a),
|
||||
IIC_fpUNA64, "vmov", ".f64\t$dst, $a", []>;
|
||||
|
||||
def VMOVS: ASuI<0b11101011, 0b0000, 0b0100, (outs SPR:$dst), (ins SPR:$a),
|
||||
def VMOVS: ASuI<0b11101, 0b11, 0b0000, 0b01, 0, (outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpUNA32, "vmov", ".f32\t$dst, $a", []>;
|
||||
} // neverHasSideEffects
|
||||
|
||||
def VNEGD : ADuI<0b11101011, 0b0001, 0b0100, (outs DPR:$dst), (ins DPR:$a),
|
||||
def VNEGD : ADuI<0b11101, 0b11, 0b0001, 0b01, 0, (outs DPR:$dst), (ins DPR:$a),
|
||||
IIC_fpUNA64, "vneg", ".f64\t$dst, $a",
|
||||
[(set DPR:$dst, (fneg DPR:$a))]>;
|
||||
|
||||
def VNEGS : ASuIn<0b11101011, 0b0001, 0b0100, (outs SPR:$dst), (ins SPR:$a),
|
||||
def VNEGS : ASuIn<0b11101, 0b11, 0b0001, 0b01, 0,(outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpUNA32, "vneg", ".f32\t$dst, $a",
|
||||
[(set SPR:$dst, (fneg SPR:$a))]>;
|
||||
|
||||
def VSQRTD : ADuI<0b11101011, 0b0001, 0b1100, (outs DPR:$dst), (ins DPR:$a),
|
||||
def VSQRTD : ADuI<0b11101, 0b11, 0b0001, 0b11, 0, (outs DPR:$dst), (ins DPR:$a),
|
||||
IIC_fpSQRT64, "vsqrt", ".f64\t$dst, $a",
|
||||
[(set DPR:$dst, (fsqrt DPR:$a))]>;
|
||||
|
||||
def VSQRTS : ASuI<0b11101011, 0b0001, 0b1100, (outs SPR:$dst), (ins SPR:$a),
|
||||
def VSQRTS : ASuI<0b11101, 0b11, 0b0001, 0b11, 0, (outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpSQRT32, "vsqrt", ".f32\t$dst, $a",
|
||||
[(set SPR:$dst, (fsqrt SPR:$a))]>;
|
||||
|
||||
@ -277,51 +270,59 @@ def VMOVDRR : AVConv5I<0b11000100, 0b1011,
|
||||
|
||||
// Int to FP:
|
||||
|
||||
def VSITOD : AVConv1I<0b11101011, 0b1000, 0b1011, (outs DPR:$dst), (ins SPR:$a),
|
||||
def VSITOD : AVConv1I<0b11101, 0b11, 0b1000, 0b1011,
|
||||
(outs DPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTID, "vcvt", ".f64.s32\t$dst, $a",
|
||||
[(set DPR:$dst, (arm_sitof SPR:$a))]> {
|
||||
let Inst{7} = 1;
|
||||
let Inst{7} = 1; // s32
|
||||
}
|
||||
|
||||
def VSITOS : AVConv1In<0b11101011, 0b1000, 0b1010, (outs SPR:$dst),(ins SPR:$a),
|
||||
def VSITOS : AVConv1In<0b11101, 0b11, 0b1000, 0b1010,
|
||||
(outs SPR:$dst),(ins SPR:$a),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.s32\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_sitof SPR:$a))]> {
|
||||
let Inst{7} = 1;
|
||||
let Inst{7} = 1; // s32
|
||||
}
|
||||
|
||||
def VUITOD : AVConv1I<0b11101011, 0b1000, 0b1011, (outs DPR:$dst), (ins SPR:$a),
|
||||
def VUITOD : AVConv1I<0b11101, 0b11, 0b1000, 0b1011,
|
||||
(outs DPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTID, "vcvt", ".f64.u32\t$dst, $a",
|
||||
[(set DPR:$dst, (arm_uitof SPR:$a))]>;
|
||||
[(set DPR:$dst, (arm_uitof SPR:$a))]> {
|
||||
let Inst{7} = 0; // u32
|
||||
}
|
||||
|
||||
def VUITOS : AVConv1In<0b11101011, 0b1000, 0b1010, (outs SPR:$dst),(ins SPR:$a),
|
||||
def VUITOS : AVConv1In<0b11101, 0b11, 0b1000, 0b1010,
|
||||
(outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTIS, "vcvt", ".f32.u32\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_uitof SPR:$a))]>;
|
||||
[(set SPR:$dst, (arm_uitof SPR:$a))]> {
|
||||
let Inst{7} = 0; // u32
|
||||
}
|
||||
|
||||
// FP to Int:
|
||||
// Always set Z bit in the instruction, i.e. "round towards zero" variants.
|
||||
|
||||
def VTOSIZD : AVConv1I<0b11101011, 0b1101, 0b1011,
|
||||
def VTOSIZD : AVConv1I<0b11101, 0b11, 0b1101, 0b1011,
|
||||
(outs SPR:$dst), (ins DPR:$a),
|
||||
IIC_fpCVTDI, "vcvt", ".s32.f64\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_ftosi DPR:$a))]> {
|
||||
let Inst{7} = 1; // Z bit
|
||||
}
|
||||
|
||||
def VTOSIZS : AVConv1In<0b11101011, 0b1101, 0b1010,
|
||||
def VTOSIZS : AVConv1In<0b11101, 0b11, 0b1101, 0b1010,
|
||||
(outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTSI, "vcvt", ".s32.f32\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_ftosi SPR:$a))]> {
|
||||
let Inst{7} = 1; // Z bit
|
||||
}
|
||||
|
||||
def VTOUIZD : AVConv1I<0b11101011, 0b1100, 0b1011,
|
||||
def VTOUIZD : AVConv1I<0b11101, 0b11, 0b1100, 0b1011,
|
||||
(outs SPR:$dst), (ins DPR:$a),
|
||||
IIC_fpCVTDI, "vcvt", ".u32.f64\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_ftoui DPR:$a))]> {
|
||||
let Inst{7} = 1; // Z bit
|
||||
}
|
||||
|
||||
def VTOUIZS : AVConv1In<0b11101011, 0b1100, 0b1010,
|
||||
def VTOUIZS : AVConv1In<0b11101, 0b11, 0b1100, 0b1010,
|
||||
(outs SPR:$dst), (ins SPR:$a),
|
||||
IIC_fpCVTSI, "vcvt", ".u32.f32\t$dst, $a",
|
||||
[(set SPR:$dst, (arm_ftoui SPR:$a))]> {
|
||||
@ -332,82 +333,82 @@ def VTOUIZS : AVConv1In<0b11101011, 0b1100, 0b1010,
|
||||
// FP FMA Operations.
|
||||
//
|
||||
|
||||
def VMLAD : ADbI<0b11100000, (outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
def VMLAD : ADbI<0b11100, 0b00, 0, 0,
|
||||
(outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
IIC_fpMAC64, "vmla", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fadd (fmul DPR:$a, DPR:$b), DPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VMLAS : ASbIn<0b11100000, (outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
def VMLAS : ASbIn<0b11100, 0b00, 0, 0,
|
||||
(outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
IIC_fpMAC32, "vmla", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fadd (fmul SPR:$a, SPR:$b), SPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VNMLSD : ADbI<0b11100001, (outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
def VNMLSD : ADbI<0b11100, 0b01, 0, 0,
|
||||
(outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
IIC_fpMAC64, "vnmls", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fsub (fmul DPR:$a, DPR:$b), DPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VNMLSS : ASbI<0b11100001, (outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
def VNMLSS : ASbI<0b11100, 0b01, 0, 0,
|
||||
(outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
IIC_fpMAC32, "vnmls", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fsub (fmul SPR:$a, SPR:$b), SPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VMLSD : ADbI<0b11100000, (outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
def VMLSD : ADbI<0b11100, 0b00, 1, 0,
|
||||
(outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
IIC_fpMAC64, "vmls", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fadd (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst"> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VMLSS : ASbIn<0b11100000, (outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
def VMLSS : ASbIn<0b11100, 0b00, 1, 0,
|
||||
(outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
IIC_fpMAC32, "vmls", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fadd (fneg (fmul SPR:$a, SPR:$b)), SPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst"> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def : Pat<(fsub DPR:$dstin, (fmul DPR:$a, DPR:$b)),
|
||||
(VMLSD DPR:$dstin, DPR:$a, DPR:$b)>, Requires<[DontUseNEONForFP]>;
|
||||
def : Pat<(fsub SPR:$dstin, (fmul SPR:$a, SPR:$b)),
|
||||
(VMLSS SPR:$dstin, SPR:$a, SPR:$b)>, Requires<[DontUseNEONForFP]>;
|
||||
|
||||
def VNMLAD : ADbI<0b11100001, (outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
def VNMLAD : ADbI<0b11100, 0b01, 1, 0,
|
||||
(outs DPR:$dst), (ins DPR:$dstin, DPR:$a, DPR:$b),
|
||||
IIC_fpMAC64, "vnmla", ".f64\t$dst, $a, $b",
|
||||
[(set DPR:$dst, (fsub (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst"> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
def VNMLAS : ASbI<0b11100001, (outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
def VNMLAS : ASbI<0b11100, 0b01, 1, 0,
|
||||
(outs SPR:$dst), (ins SPR:$dstin, SPR:$a, SPR:$b),
|
||||
IIC_fpMAC32, "vnmla", ".f32\t$dst, $a, $b",
|
||||
[(set SPR:$dst, (fsub (fneg (fmul SPR:$a, SPR:$b)), SPR:$dstin))]>,
|
||||
RegConstraint<"$dstin = $dst"> {
|
||||
let Inst{6} = 1;
|
||||
}
|
||||
RegConstraint<"$dstin = $dst">;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FP Conditional moves.
|
||||
//
|
||||
|
||||
def VMOVDcc : ADuI<0b11101011, 0b0000, 0b0100,
|
||||
def VMOVDcc : ADuI<0b11101, 0b11, 0b0000, 0b01, 0,
|
||||
(outs DPR:$dst), (ins DPR:$false, DPR:$true),
|
||||
IIC_fpUNA64, "vmov", ".f64\t$dst, $true",
|
||||
[/*(set DPR:$dst, (ARMcmov DPR:$false, DPR:$true, imm:$cc))*/]>,
|
||||
RegConstraint<"$false = $dst">;
|
||||
|
||||
def VMOVScc : ASuI<0b11101011, 0b0000, 0b0100,
|
||||
def VMOVScc : ASuI<0b11101, 0b11, 0b0000, 0b01, 0,
|
||||
(outs SPR:$dst), (ins SPR:$false, SPR:$true),
|
||||
IIC_fpUNA32, "vmov", ".f32\t$dst, $true",
|
||||
[/*(set SPR:$dst, (ARMcmov SPR:$false, SPR:$true, imm:$cc))*/]>,
|
||||
RegConstraint<"$false = $dst">;
|
||||
|
||||
def VNEGDcc : ADuI<0b11101011, 0b0001, 0b0100,
|
||||
def VNEGDcc : ADuI<0b11101, 0b11, 0b0001, 0b01, 0,
|
||||
(outs DPR:$dst), (ins DPR:$false, DPR:$true),
|
||||
IIC_fpUNA64, "vneg", ".f64\t$dst, $true",
|
||||
[/*(set DPR:$dst, (ARMcneg DPR:$false, DPR:$true, imm:$cc))*/]>,
|
||||
RegConstraint<"$false = $dst">;
|
||||
|
||||
def VNEGScc : ASuI<0b11101011, 0b0001, 0b0100,
|
||||
def VNEGScc : ASuI<0b11101, 0b11, 0b0001, 0b01, 0,
|
||||
(outs SPR:$dst), (ins SPR:$false, SPR:$true),
|
||||
IIC_fpUNA32, "vneg", ".f32\t$dst, $true",
|
||||
[/*(set SPR:$dst, (ARMcneg SPR:$false, SPR:$true, imm:$cc))*/]>,
|
||||
|
Loading…
Reference in New Issue
Block a user