mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
R600: Add a Bank Swizzle operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180758 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7097b1ddea
commit
e332e3559b
@ -428,7 +428,7 @@ void R600MCCodeEmitter::EmitSrcISA(const MCInst &MI, unsigned RegOpIdx,
|
||||
}
|
||||
|
||||
if (Reg == AMDGPU::ALU_LITERAL_X) {
|
||||
unsigned ImmOpIndex = MI.getNumOperands() - 1;
|
||||
unsigned ImmOpIndex = MI.getNumOperands() - 2;
|
||||
MCOperand ImmOp = MI.getOperand(ImmOpIndex);
|
||||
if (ImmOp.isFPImm()) {
|
||||
InlineConstant.f = ImmOp.getFPImm();
|
||||
|
@ -80,6 +80,7 @@ namespace R600Operands {
|
||||
LAST,
|
||||
PRED_SEL,
|
||||
IMM,
|
||||
BANK_SWIZZLE,
|
||||
COUNT
|
||||
};
|
||||
|
||||
@ -87,11 +88,11 @@ namespace R600Operands {
|
||||
// W C S S S S S S S S S S S
|
||||
// R O D L S R R R R S R R R R S R R R L P
|
||||
// D U I M R A R C C C C R C C C C R C C C A R I
|
||||
// S E U T O E M C 0 0 0 0 C 1 1 1 1 C 2 2 2 S E M
|
||||
// T M P E D L P 0 N R A S 1 N R A S 2 N R S T D M
|
||||
{0,-1,-1, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12},
|
||||
{0, 1, 2, 3, 4 ,5 ,6 ,7, 8, 9,10,11,12,13,14,15,16,-1,-1,-1,-1,17,18,19},
|
||||
{0,-1,-1,-1,-1, 1, 2, 3, 4, 5,-1, 6, 7, 8, 9,-1,10,11,12,13,14,15,16,17}
|
||||
// S E U T O E M C 0 0 0 0 C 1 1 1 1 C 2 2 2 S E M B
|
||||
// T M P E D L P 0 N R A S 1 N R A S 2 N R S T D M S
|
||||
{0,-1,-1, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13},
|
||||
{0, 1, 2, 3, 4 ,5 ,6 ,7, 8, 9,10,11,12,13,14,15,16,-1,-1,-1,-1,17,18,19,20},
|
||||
{0,-1,-1,-1,-1, 1, 2, 3, 4, 5,-1, 6, 7, 8, 9,-1,10,11,12,13,14,15,16,17,18}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -702,7 +702,8 @@ MachineInstrBuilder R600InstrInfo::buildDefaultInstruction(MachineBasicBlock &MB
|
||||
//scheduling to the backend, we can change the default to 0.
|
||||
MIB.addImm(1) // $last
|
||||
.addReg(AMDGPU::PRED_SEL_OFF) // $pred_sel
|
||||
.addImm(0); // $literal
|
||||
.addImm(0) // $literal
|
||||
.addImm(0); // $bank_swizzle
|
||||
|
||||
return MIB;
|
||||
}
|
||||
|
@ -75,6 +75,9 @@ class InstFlag<string PM = "printOperand", int Default = 0>
|
||||
def SEL : OperandWithDefaultOps <i32, (ops (i32 -1))> {
|
||||
let PrintMethod = "printSel";
|
||||
}
|
||||
def BANK_SWIZZLE : OperandWithDefaultOps <i32, (ops (i32 0))> {
|
||||
let PrintMethod = "printSel";
|
||||
}
|
||||
|
||||
def LITERAL : InstFlag<"printLiteral">;
|
||||
|
||||
@ -138,7 +141,7 @@ class R600ALU_Word1 {
|
||||
field bits<32> Word1;
|
||||
|
||||
bits<11> dst;
|
||||
bits<3> bank_swizzle = 0;
|
||||
bits<3> bank_swizzle;
|
||||
bits<1> dst_rel;
|
||||
bits<1> clamp;
|
||||
|
||||
@ -350,7 +353,8 @@ class R600_1OP <bits<11> inst, string opName, list<dag> pattern,
|
||||
InstR600 <(outs R600_Reg32:$dst),
|
||||
(ins WRITE:$write, OMOD:$omod, REL:$dst_rel, CLAMP:$clamp,
|
||||
R600_Reg32:$src0, NEG:$src0_neg, REL:$src0_rel, ABS:$src0_abs, SEL:$src0_sel,
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal),
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal,
|
||||
BANK_SWIZZLE:$bank_swizzle),
|
||||
!strconcat(" ", opName,
|
||||
"$clamp $dst$write$dst_rel$omod, "
|
||||
"$src0_neg$src0_abs$src0$src0_abs$src0_rel, "
|
||||
@ -390,7 +394,8 @@ class R600_2OP <bits<11> inst, string opName, list<dag> pattern,
|
||||
OMOD:$omod, REL:$dst_rel, CLAMP:$clamp,
|
||||
R600_Reg32:$src0, NEG:$src0_neg, REL:$src0_rel, ABS:$src0_abs, SEL:$src0_sel,
|
||||
R600_Reg32:$src1, NEG:$src1_neg, REL:$src1_rel, ABS:$src1_abs, SEL:$src1_sel,
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal),
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal,
|
||||
BANK_SWIZZLE:$bank_swizzle),
|
||||
!strconcat(" ", opName,
|
||||
"$clamp $update_exec_mask$update_pred$dst$write$dst_rel$omod, "
|
||||
"$src0_neg$src0_abs$src0$src0_abs$src0_rel, "
|
||||
@ -427,7 +432,8 @@ class R600_3OP <bits<5> inst, string opName, list<dag> pattern,
|
||||
R600_Reg32:$src0, NEG:$src0_neg, REL:$src0_rel, SEL:$src0_sel,
|
||||
R600_Reg32:$src1, NEG:$src1_neg, REL:$src1_rel, SEL:$src1_sel,
|
||||
R600_Reg32:$src2, NEG:$src2_neg, REL:$src2_rel, SEL:$src2_sel,
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal),
|
||||
LAST:$last, R600_Pred:$pred_sel, LITERAL:$literal,
|
||||
BANK_SWIZZLE:$bank_swizzle),
|
||||
!strconcat(" ", opName, "$clamp $dst$dst_rel, "
|
||||
"$src0_neg$src0$src0_rel, "
|
||||
"$src1_neg$src1$src1_rel, "
|
||||
|
Loading…
Reference in New Issue
Block a user