[PATCH] D17011: [lanai] Add Lanai backend.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:29:57 PDT 2016


t.p.northover added inline comments.

================
Comment at: lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp:230-231
@@ +229,4 @@
+
+void LanaiInstPrinter::printShiftImmOperand(const MCInst *MI, unsigned OpNo,
+                                           raw_ostream &Ostream) {
+  const MCOperand &Op = MI->getOperand(OpNo);
----------------
I'd be inclined to put the complexity into the decoder instead (i.e. require that the MCInst's immediate is already sign extended), since you probably want to diagnose an attempt to disassemble a dodgy shift there anyway and I don't think symbolic operands are permitted so the default formatHex ought to work fine.


http://reviews.llvm.org/D17011





More information about the llvm-commits mailing list