Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D36034
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309477
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
-void AMDGPUInstPrinter::printSel(const MCInst *MI, unsigned OpNo,
- raw_ostream &O) {
- const char * chans = "XYZW";
- int sel = MI->getOperand(OpNo).getImm();
-
- int chan = sel & 3;
- sel >>= 2;
-
- if (sel >= 512) {
- sel -= 512;
- int cb = sel >> 12;
- sel &= 4095;
- O << cb << '[' << sel << ']';
- } else if (sel >= 448) {
- sel -= 448;
- O << sel;
- } else if (sel >= 0){
- O << sel;
- }
-
- if (sel >= 0)
- O << '.' << chans[chan];
-}
-
void AMDGPUInstPrinter::printBankSwizzle(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI,
raw_ostream &O) {
const MCSubtargetInfo &STI, raw_ostream &O);
void printWrite(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
raw_ostream &O);
- void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
void printBankSwizzle(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI, raw_ostream &O);
void printRSel(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
}
// src_sel for ALU src operands, see also ALU_CONST, ALU_PARAM registers
-def SEL : OperandWithDefaultOps <i32, (ops (i32 -1))> {
- let PrintMethod = "printSel";
-}
+def SEL : OperandWithDefaultOps <i32, (ops (i32 -1))>;
def BANK_SWIZZLE : OperandWithDefaultOps <i32, (ops (i32 0))> {
let PrintMethod = "printBankSwizzle";
}