mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Move new sse 1 & 2 generic classes to a more appropriate place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efc9b69deb
commit
1e8d06282f
@ -367,6 +367,71 @@ let Uses = [EFLAGS], usesCustomInserter = 1 in {
|
||||
EFLAGS)))]>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// SSE 1 & 2 Instructions Classes
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// sse12_fp_scalar - SSE 1 & 2 scalar instructions class
|
||||
multiclass sse12_fp_scalar<bits<8> opc, string OpcodeStr, SDNode OpNode,
|
||||
RegisterClass RC, X86MemOperand memop> {
|
||||
let isCommutable = 1 in {
|
||||
def rr : SI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1, RC:$src2))]>;
|
||||
}
|
||||
def rm : SI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1, (load addr:$src2)))]>;
|
||||
}
|
||||
|
||||
/// sse12_fp_scalar_int - SSE 1 & 2 scalar instructions intrinsics class
|
||||
multiclass sse12_fp_scalar_int<bits<8> opc, string OpcodeStr, RegisterClass RC,
|
||||
string asm, string SSEVer, string FPSizeStr,
|
||||
Operand memop, ComplexPattern mem_cpat> {
|
||||
def rr_Int : SI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, RC:$src2))]>;
|
||||
def rm_Int : SI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, mem_cpat:$src2))]>;
|
||||
}
|
||||
|
||||
/// sse12_fp_packed - SSE 1 & 2 packed instructions class
|
||||
multiclass sse12_fp_packed<bits<8> opc, string OpcodeStr, SDNode OpNode,
|
||||
RegisterClass RC, ValueType vt,
|
||||
X86MemOperand x86memop, PatFrag mem_frag,
|
||||
Domain d> {
|
||||
let isCommutable = 1 in
|
||||
def rr : PI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (vt (OpNode RC:$src1, RC:$src2)))],d>;
|
||||
def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1,
|
||||
(mem_frag addr:$src2)))],d>;
|
||||
}
|
||||
|
||||
/// sse12_fp_packed_int - SSE 1 & 2 packed instructions intrinsics class
|
||||
multiclass sse12_fp_packed_int<bits<8> opc, string OpcodeStr, RegisterClass RC,
|
||||
string asm, string SSEVer, string FPSizeStr,
|
||||
X86MemOperand memop, PatFrag mem_frag,
|
||||
Domain d> {
|
||||
def rr_Int : PI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, RC:$src2))], d>;
|
||||
def rm_Int : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, (mem_frag addr:$src2)))], d>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// SSE1 Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -646,67 +711,6 @@ let Constraints = "$src1 = $dst" in {
|
||||
defm FsANDN : sse12_fp_alias_pack_logical<0x55, "andn", undef, 1, 1, 0>;
|
||||
}
|
||||
|
||||
/// sse12_fp_scalar - SSE 1 & 2 scalar instructions class
|
||||
multiclass sse12_fp_scalar<bits<8> opc, string OpcodeStr, SDNode OpNode,
|
||||
RegisterClass RC, X86MemOperand memop> {
|
||||
let isCommutable = 1 in {
|
||||
def rr : SI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1, RC:$src2))]>;
|
||||
}
|
||||
def rm : SI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1, (load addr:$src2)))]>;
|
||||
}
|
||||
|
||||
/// sse12_fp_scalar_int - SSE 1 & 2 scalar instructions intrinsics class
|
||||
multiclass sse12_fp_scalar_int<bits<8> opc, string OpcodeStr, RegisterClass RC,
|
||||
string asm, string SSEVer, string FPSizeStr,
|
||||
Operand memop, ComplexPattern mem_cpat> {
|
||||
def rr_Int : SI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, RC:$src2))]>;
|
||||
def rm_Int : SI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, mem_cpat:$src2))]>;
|
||||
}
|
||||
|
||||
/// sse12_fp_packed - SSE 1 & 2 packed instructions class
|
||||
multiclass sse12_fp_packed<bits<8> opc, string OpcodeStr, SDNode OpNode,
|
||||
RegisterClass RC, ValueType vt,
|
||||
X86MemOperand x86memop, PatFrag mem_frag,
|
||||
Domain d> {
|
||||
let isCommutable = 1 in
|
||||
def rr : PI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (vt (OpNode RC:$src1, RC:$src2)))],d>;
|
||||
def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
|
||||
OpcodeStr, [(set RC:$dst, (OpNode RC:$src1,
|
||||
(mem_frag addr:$src2)))],d>;
|
||||
}
|
||||
|
||||
/// sse12_fp_packed_int - SSE 1 & 2 packed instructions intrinsics class
|
||||
multiclass sse12_fp_packed_int<bits<8> opc, string OpcodeStr, RegisterClass RC,
|
||||
string asm, string SSEVer, string FPSizeStr,
|
||||
X86MemOperand memop, PatFrag mem_frag,
|
||||
Domain d> {
|
||||
def rr_Int : PI<opc, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, RC:$src2))], d>;
|
||||
def rm_Int : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, memop:$src2),
|
||||
asm, [(set RC:$dst, (
|
||||
!nameconcat<Intrinsic>("int_x86_sse",
|
||||
!strconcat(SSEVer, !strconcat("_",
|
||||
!strconcat(OpcodeStr, FPSizeStr))))
|
||||
RC:$src1, (mem_frag addr:$src2)))], d>;
|
||||
}
|
||||
|
||||
/// basic_sse12_fp_binop_rm - SSE 1 & 2 binops come in both scalar and
|
||||
/// vector forms.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user