10b57cec5SDimitry Andric //===-- LanaiInstPrinter.cpp - Convert Lanai MCInst to asm syntax ---------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This class prints an Lanai MCInst to a .s file.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
120b57cec5SDimitry Andric
130b57cec5SDimitry Andric #include "LanaiInstPrinter.h"
140b57cec5SDimitry Andric #include "LanaiMCExpr.h"
150b57cec5SDimitry Andric #include "LanaiAluCode.h"
160b57cec5SDimitry Andric #include "LanaiCondCode.h"
170b57cec5SDimitry Andric #include "MCTargetDesc/LanaiMCTargetDesc.h"
180b57cec5SDimitry Andric #include "llvm/MC/MCAsmInfo.h"
190b57cec5SDimitry Andric #include "llvm/MC/MCExpr.h"
200b57cec5SDimitry Andric #include "llvm/MC/MCInst.h"
210b57cec5SDimitry Andric #include "llvm/MC/MCRegisterInfo.h"
220b57cec5SDimitry Andric #include "llvm/MC/MCSymbol.h"
230b57cec5SDimitry Andric #include "llvm/Support/ErrorHandling.h"
240b57cec5SDimitry Andric #include "llvm/Support/FormattedStream.h"
250b57cec5SDimitry Andric
260b57cec5SDimitry Andric using namespace llvm;
270b57cec5SDimitry Andric
280b57cec5SDimitry Andric #define DEBUG_TYPE "asm-printer"
290b57cec5SDimitry Andric
300b57cec5SDimitry Andric // Include the auto-generated portion of the assembly writer.
310b57cec5SDimitry Andric #define PRINT_ALIAS_INSTR
320b57cec5SDimitry Andric #include "LanaiGenAsmWriter.inc"
330b57cec5SDimitry Andric
printRegName(raw_ostream & OS,MCRegister Reg) const34*bdd1243dSDimitry Andric void LanaiInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) const {
35*bdd1243dSDimitry Andric OS << StringRef(getRegisterName(Reg)).lower();
360b57cec5SDimitry Andric }
370b57cec5SDimitry Andric
printInst(const MCInst * MI,raw_ostream & OS,StringRef Alias,unsigned OpNo0,unsigned OpNo1)380b57cec5SDimitry Andric bool LanaiInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
390b57cec5SDimitry Andric StringRef Alias, unsigned OpNo0,
400b57cec5SDimitry Andric unsigned OpNo1) {
410b57cec5SDimitry Andric OS << "\t" << Alias << " ";
420b57cec5SDimitry Andric printOperand(MI, OpNo0, OS);
430b57cec5SDimitry Andric OS << ", ";
440b57cec5SDimitry Andric printOperand(MI, OpNo1, OS);
450b57cec5SDimitry Andric return true;
460b57cec5SDimitry Andric }
470b57cec5SDimitry Andric
usesGivenOffset(const MCInst * MI,int AddOffset)480b57cec5SDimitry Andric static bool usesGivenOffset(const MCInst *MI, int AddOffset) {
490b57cec5SDimitry Andric unsigned AluCode = MI->getOperand(3).getImm();
500b57cec5SDimitry Andric return LPAC::encodeLanaiAluCode(AluCode) == LPAC::ADD &&
510b57cec5SDimitry Andric (MI->getOperand(2).getImm() == AddOffset ||
520b57cec5SDimitry Andric MI->getOperand(2).getImm() == -AddOffset);
530b57cec5SDimitry Andric }
540b57cec5SDimitry Andric
isPreIncrementForm(const MCInst * MI,int AddOffset)550b57cec5SDimitry Andric static bool isPreIncrementForm(const MCInst *MI, int AddOffset) {
560b57cec5SDimitry Andric unsigned AluCode = MI->getOperand(3).getImm();
570b57cec5SDimitry Andric return LPAC::isPreOp(AluCode) && usesGivenOffset(MI, AddOffset);
580b57cec5SDimitry Andric }
590b57cec5SDimitry Andric
isPostIncrementForm(const MCInst * MI,int AddOffset)600b57cec5SDimitry Andric static bool isPostIncrementForm(const MCInst *MI, int AddOffset) {
610b57cec5SDimitry Andric unsigned AluCode = MI->getOperand(3).getImm();
620b57cec5SDimitry Andric return LPAC::isPostOp(AluCode) && usesGivenOffset(MI, AddOffset);
630b57cec5SDimitry Andric }
640b57cec5SDimitry Andric
decIncOperator(const MCInst * MI)650b57cec5SDimitry Andric static StringRef decIncOperator(const MCInst *MI) {
660b57cec5SDimitry Andric if (MI->getOperand(2).getImm() < 0)
670b57cec5SDimitry Andric return "--";
680b57cec5SDimitry Andric return "++";
690b57cec5SDimitry Andric }
700b57cec5SDimitry Andric
printMemoryLoadIncrement(const MCInst * MI,raw_ostream & OS,StringRef Opcode,int AddOffset)710b57cec5SDimitry Andric bool LanaiInstPrinter::printMemoryLoadIncrement(const MCInst *MI,
720b57cec5SDimitry Andric raw_ostream &OS,
730b57cec5SDimitry Andric StringRef Opcode,
740b57cec5SDimitry Andric int AddOffset) {
750b57cec5SDimitry Andric if (isPreIncrementForm(MI, AddOffset)) {
760b57cec5SDimitry Andric OS << "\t" << Opcode << "\t[" << decIncOperator(MI) << "%"
770b57cec5SDimitry Andric << getRegisterName(MI->getOperand(1).getReg()) << "], %"
780b57cec5SDimitry Andric << getRegisterName(MI->getOperand(0).getReg());
790b57cec5SDimitry Andric return true;
800b57cec5SDimitry Andric }
810b57cec5SDimitry Andric if (isPostIncrementForm(MI, AddOffset)) {
820b57cec5SDimitry Andric OS << "\t" << Opcode << "\t[%"
830b57cec5SDimitry Andric << getRegisterName(MI->getOperand(1).getReg()) << decIncOperator(MI)
840b57cec5SDimitry Andric << "], %" << getRegisterName(MI->getOperand(0).getReg());
850b57cec5SDimitry Andric return true;
860b57cec5SDimitry Andric }
870b57cec5SDimitry Andric return false;
880b57cec5SDimitry Andric }
890b57cec5SDimitry Andric
printMemoryStoreIncrement(const MCInst * MI,raw_ostream & OS,StringRef Opcode,int AddOffset)900b57cec5SDimitry Andric bool LanaiInstPrinter::printMemoryStoreIncrement(const MCInst *MI,
910b57cec5SDimitry Andric raw_ostream &OS,
920b57cec5SDimitry Andric StringRef Opcode,
930b57cec5SDimitry Andric int AddOffset) {
940b57cec5SDimitry Andric if (isPreIncrementForm(MI, AddOffset)) {
950b57cec5SDimitry Andric OS << "\t" << Opcode << "\t%" << getRegisterName(MI->getOperand(0).getReg())
960b57cec5SDimitry Andric << ", [" << decIncOperator(MI) << "%"
970b57cec5SDimitry Andric << getRegisterName(MI->getOperand(1).getReg()) << "]";
980b57cec5SDimitry Andric return true;
990b57cec5SDimitry Andric }
1000b57cec5SDimitry Andric if (isPostIncrementForm(MI, AddOffset)) {
1010b57cec5SDimitry Andric OS << "\t" << Opcode << "\t%" << getRegisterName(MI->getOperand(0).getReg())
1020b57cec5SDimitry Andric << ", [%" << getRegisterName(MI->getOperand(1).getReg())
1030b57cec5SDimitry Andric << decIncOperator(MI) << "]";
1040b57cec5SDimitry Andric return true;
1050b57cec5SDimitry Andric }
1060b57cec5SDimitry Andric return false;
1070b57cec5SDimitry Andric }
1080b57cec5SDimitry Andric
printAlias(const MCInst * MI,raw_ostream & OS)1090b57cec5SDimitry Andric bool LanaiInstPrinter::printAlias(const MCInst *MI, raw_ostream &OS) {
1100b57cec5SDimitry Andric switch (MI->getOpcode()) {
1110b57cec5SDimitry Andric case Lanai::LDW_RI:
1120b57cec5SDimitry Andric // ld 4[*%rN], %rX => ld [++imm], %rX
1130b57cec5SDimitry Andric // ld -4[*%rN], %rX => ld [--imm], %rX
1140b57cec5SDimitry Andric // ld 4[%rN*], %rX => ld [imm++], %rX
1150b57cec5SDimitry Andric // ld -4[%rN*], %rX => ld [imm--], %rX
1160b57cec5SDimitry Andric return printMemoryLoadIncrement(MI, OS, "ld", 4);
1170b57cec5SDimitry Andric case Lanai::LDHs_RI:
1180b57cec5SDimitry Andric return printMemoryLoadIncrement(MI, OS, "ld.h", 2);
1190b57cec5SDimitry Andric case Lanai::LDHz_RI:
1200b57cec5SDimitry Andric return printMemoryLoadIncrement(MI, OS, "uld.h", 2);
1210b57cec5SDimitry Andric case Lanai::LDBs_RI:
1220b57cec5SDimitry Andric return printMemoryLoadIncrement(MI, OS, "ld.b", 1);
1230b57cec5SDimitry Andric case Lanai::LDBz_RI:
1240b57cec5SDimitry Andric return printMemoryLoadIncrement(MI, OS, "uld.b", 1);
1250b57cec5SDimitry Andric case Lanai::SW_RI:
1260b57cec5SDimitry Andric // st %rX, 4[*%rN] => st %rX, [++imm]
1270b57cec5SDimitry Andric // st %rX, -4[*%rN] => st %rX, [--imm]
1280b57cec5SDimitry Andric // st %rX, 4[%rN*] => st %rX, [imm++]
1290b57cec5SDimitry Andric // st %rX, -4[%rN*] => st %rX, [imm--]
1300b57cec5SDimitry Andric return printMemoryStoreIncrement(MI, OS, "st", 4);
1310b57cec5SDimitry Andric case Lanai::STH_RI:
1320b57cec5SDimitry Andric return printMemoryStoreIncrement(MI, OS, "st.h", 2);
1330b57cec5SDimitry Andric case Lanai::STB_RI:
1340b57cec5SDimitry Andric return printMemoryStoreIncrement(MI, OS, "st.b", 1);
1350b57cec5SDimitry Andric default:
1360b57cec5SDimitry Andric return false;
1370b57cec5SDimitry Andric }
1380b57cec5SDimitry Andric }
1390b57cec5SDimitry Andric
printInst(const MCInst * MI,uint64_t Address,StringRef Annotation,const MCSubtargetInfo &,raw_ostream & OS)140480093f4SDimitry Andric void LanaiInstPrinter::printInst(const MCInst *MI, uint64_t Address,
1410b57cec5SDimitry Andric StringRef Annotation,
142480093f4SDimitry Andric const MCSubtargetInfo & /*STI*/,
143480093f4SDimitry Andric raw_ostream &OS) {
1445ffd83dbSDimitry Andric if (!printAlias(MI, OS) && !printAliasInstr(MI, Address, OS))
145480093f4SDimitry Andric printInstruction(MI, Address, OS);
1460b57cec5SDimitry Andric printAnnotation(OS, Annotation);
1470b57cec5SDimitry Andric }
1480b57cec5SDimitry Andric
printOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS,const char * Modifier)1490b57cec5SDimitry Andric void LanaiInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
1500b57cec5SDimitry Andric raw_ostream &OS, const char *Modifier) {
15104eeddc0SDimitry Andric assert((Modifier == nullptr || Modifier[0] == 0) && "No modifiers supported");
1520b57cec5SDimitry Andric const MCOperand &Op = MI->getOperand(OpNo);
1530b57cec5SDimitry Andric if (Op.isReg())
1540b57cec5SDimitry Andric OS << "%" << getRegisterName(Op.getReg());
1550b57cec5SDimitry Andric else if (Op.isImm())
1560b57cec5SDimitry Andric OS << formatHex(Op.getImm());
1570b57cec5SDimitry Andric else {
1580b57cec5SDimitry Andric assert(Op.isExpr() && "Expected an expression");
1590b57cec5SDimitry Andric Op.getExpr()->print(OS, &MAI);
1600b57cec5SDimitry Andric }
1610b57cec5SDimitry Andric }
1620b57cec5SDimitry Andric
printMemImmOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS)1630b57cec5SDimitry Andric void LanaiInstPrinter::printMemImmOperand(const MCInst *MI, unsigned OpNo,
1640b57cec5SDimitry Andric raw_ostream &OS) {
1650b57cec5SDimitry Andric const MCOperand &Op = MI->getOperand(OpNo);
1660b57cec5SDimitry Andric if (Op.isImm()) {
1670b57cec5SDimitry Andric OS << '[' << formatHex(Op.getImm()) << ']';
1680b57cec5SDimitry Andric } else {
1690b57cec5SDimitry Andric // Symbolic operand will be lowered to immediate value by linker
1700b57cec5SDimitry Andric assert(Op.isExpr() && "Expected an expression");
1710b57cec5SDimitry Andric OS << '[';
1720b57cec5SDimitry Andric Op.getExpr()->print(OS, &MAI);
1730b57cec5SDimitry Andric OS << ']';
1740b57cec5SDimitry Andric }
1750b57cec5SDimitry Andric }
1760b57cec5SDimitry Andric
printHi16ImmOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS)1770b57cec5SDimitry Andric void LanaiInstPrinter::printHi16ImmOperand(const MCInst *MI, unsigned OpNo,
1780b57cec5SDimitry Andric raw_ostream &OS) {
1790b57cec5SDimitry Andric const MCOperand &Op = MI->getOperand(OpNo);
1800b57cec5SDimitry Andric if (Op.isImm()) {
1810b57cec5SDimitry Andric OS << formatHex(Op.getImm() << 16);
1820b57cec5SDimitry Andric } else {
1830b57cec5SDimitry Andric // Symbolic operand will be lowered to immediate value by linker
1840b57cec5SDimitry Andric assert(Op.isExpr() && "Expected an expression");
1850b57cec5SDimitry Andric Op.getExpr()->print(OS, &MAI);
1860b57cec5SDimitry Andric }
1870b57cec5SDimitry Andric }
1880b57cec5SDimitry Andric
printHi16AndImmOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS)1890b57cec5SDimitry Andric void LanaiInstPrinter::printHi16AndImmOperand(const MCInst *MI, unsigned OpNo,
1900b57cec5SDimitry Andric raw_ostream &OS) {
1910b57cec5SDimitry Andric const MCOperand &Op = MI->getOperand(OpNo);
1920b57cec5SDimitry Andric if (Op.isImm()) {
1930b57cec5SDimitry Andric OS << formatHex((Op.getImm() << 16) | 0xffff);
1940b57cec5SDimitry Andric } else {
1950b57cec5SDimitry Andric // Symbolic operand will be lowered to immediate value by linker
1960b57cec5SDimitry Andric assert(Op.isExpr() && "Expected an expression");
1970b57cec5SDimitry Andric Op.getExpr()->print(OS, &MAI);
1980b57cec5SDimitry Andric }
1990b57cec5SDimitry Andric }
2000b57cec5SDimitry Andric
printLo16AndImmOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS)2010b57cec5SDimitry Andric void LanaiInstPrinter::printLo16AndImmOperand(const MCInst *MI, unsigned OpNo,
2020b57cec5SDimitry Andric raw_ostream &OS) {
2030b57cec5SDimitry Andric const MCOperand &Op = MI->getOperand(OpNo);
2040b57cec5SDimitry Andric if (Op.isImm()) {
2050b57cec5SDimitry Andric OS << formatHex(0xffff0000 | Op.getImm());
2060b57cec5SDimitry Andric } else {
2070b57cec5SDimitry Andric // Symbolic operand will be lowered to immediate value by linker
2080b57cec5SDimitry Andric assert(Op.isExpr() && "Expected an expression");
2090b57cec5SDimitry Andric Op.getExpr()->print(OS, &MAI);
2100b57cec5SDimitry Andric }
2110b57cec5SDimitry Andric }
2120b57cec5SDimitry Andric
printMemoryBaseRegister(raw_ostream & OS,const unsigned AluCode,const MCOperand & RegOp)2130b57cec5SDimitry Andric static void printMemoryBaseRegister(raw_ostream &OS, const unsigned AluCode,
2140b57cec5SDimitry Andric const MCOperand &RegOp) {
2150b57cec5SDimitry Andric assert(RegOp.isReg() && "Register operand expected");
2160b57cec5SDimitry Andric OS << "[";
2170b57cec5SDimitry Andric if (LPAC::isPreOp(AluCode))
2180b57cec5SDimitry Andric OS << "*";
2190b57cec5SDimitry Andric OS << "%" << LanaiInstPrinter::getRegisterName(RegOp.getReg());
2200b57cec5SDimitry Andric if (LPAC::isPostOp(AluCode))
2210b57cec5SDimitry Andric OS << "*";
2220b57cec5SDimitry Andric OS << "]";
2230b57cec5SDimitry Andric }
2240b57cec5SDimitry Andric
2250b57cec5SDimitry Andric template <unsigned SizeInBits>
printMemoryImmediateOffset(const MCAsmInfo & MAI,const MCOperand & OffsetOp,raw_ostream & OS)2260b57cec5SDimitry Andric static void printMemoryImmediateOffset(const MCAsmInfo &MAI,
2270b57cec5SDimitry Andric const MCOperand &OffsetOp,
2280b57cec5SDimitry Andric raw_ostream &OS) {
2290b57cec5SDimitry Andric assert((OffsetOp.isImm() || OffsetOp.isExpr()) && "Immediate expected");
2300b57cec5SDimitry Andric if (OffsetOp.isImm()) {
2310b57cec5SDimitry Andric assert(isInt<SizeInBits>(OffsetOp.getImm()) && "Constant value truncated");
2320b57cec5SDimitry Andric OS << OffsetOp.getImm();
2330b57cec5SDimitry Andric } else
2340b57cec5SDimitry Andric OffsetOp.getExpr()->print(OS, &MAI);
2350b57cec5SDimitry Andric }
2360b57cec5SDimitry Andric
printMemRiOperand(const MCInst * MI,int OpNo,raw_ostream & OS,const char *)2370b57cec5SDimitry Andric void LanaiInstPrinter::printMemRiOperand(const MCInst *MI, int OpNo,
2380b57cec5SDimitry Andric raw_ostream &OS,
2390b57cec5SDimitry Andric const char * /*Modifier*/) {
2400b57cec5SDimitry Andric const MCOperand &RegOp = MI->getOperand(OpNo);
2410b57cec5SDimitry Andric const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
2420b57cec5SDimitry Andric const MCOperand &AluOp = MI->getOperand(OpNo + 2);
2430b57cec5SDimitry Andric const unsigned AluCode = AluOp.getImm();
2440b57cec5SDimitry Andric
2450b57cec5SDimitry Andric // Offset
2460b57cec5SDimitry Andric printMemoryImmediateOffset<16>(MAI, OffsetOp, OS);
2470b57cec5SDimitry Andric
2480b57cec5SDimitry Andric // Register
2490b57cec5SDimitry Andric printMemoryBaseRegister(OS, AluCode, RegOp);
2500b57cec5SDimitry Andric }
2510b57cec5SDimitry Andric
printMemRrOperand(const MCInst * MI,int OpNo,raw_ostream & OS,const char *)2520b57cec5SDimitry Andric void LanaiInstPrinter::printMemRrOperand(const MCInst *MI, int OpNo,
2530b57cec5SDimitry Andric raw_ostream &OS,
2540b57cec5SDimitry Andric const char * /*Modifier*/) {
2550b57cec5SDimitry Andric const MCOperand &RegOp = MI->getOperand(OpNo);
2560b57cec5SDimitry Andric const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
2570b57cec5SDimitry Andric const MCOperand &AluOp = MI->getOperand(OpNo + 2);
2580b57cec5SDimitry Andric const unsigned AluCode = AluOp.getImm();
2590b57cec5SDimitry Andric assert(OffsetOp.isReg() && RegOp.isReg() && "Registers expected.");
2600b57cec5SDimitry Andric
2610b57cec5SDimitry Andric // [ Base OP Offset ]
2620b57cec5SDimitry Andric OS << "[";
2630b57cec5SDimitry Andric if (LPAC::isPreOp(AluCode))
2640b57cec5SDimitry Andric OS << "*";
2650b57cec5SDimitry Andric OS << "%" << getRegisterName(RegOp.getReg());
2660b57cec5SDimitry Andric if (LPAC::isPostOp(AluCode))
2670b57cec5SDimitry Andric OS << "*";
2680b57cec5SDimitry Andric OS << " " << LPAC::lanaiAluCodeToString(AluCode) << " ";
2690b57cec5SDimitry Andric OS << "%" << getRegisterName(OffsetOp.getReg());
2700b57cec5SDimitry Andric OS << "]";
2710b57cec5SDimitry Andric }
2720b57cec5SDimitry Andric
printMemSplsOperand(const MCInst * MI,int OpNo,raw_ostream & OS,const char *)2730b57cec5SDimitry Andric void LanaiInstPrinter::printMemSplsOperand(const MCInst *MI, int OpNo,
2740b57cec5SDimitry Andric raw_ostream &OS,
2750b57cec5SDimitry Andric const char * /*Modifier*/) {
2760b57cec5SDimitry Andric const MCOperand &RegOp = MI->getOperand(OpNo);
2770b57cec5SDimitry Andric const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
2780b57cec5SDimitry Andric const MCOperand &AluOp = MI->getOperand(OpNo + 2);
2790b57cec5SDimitry Andric const unsigned AluCode = AluOp.getImm();
2800b57cec5SDimitry Andric
2810b57cec5SDimitry Andric // Offset
2820b57cec5SDimitry Andric printMemoryImmediateOffset<10>(MAI, OffsetOp, OS);
2830b57cec5SDimitry Andric
2840b57cec5SDimitry Andric // Register
2850b57cec5SDimitry Andric printMemoryBaseRegister(OS, AluCode, RegOp);
2860b57cec5SDimitry Andric }
2870b57cec5SDimitry Andric
printCCOperand(const MCInst * MI,int OpNo,raw_ostream & OS)2880b57cec5SDimitry Andric void LanaiInstPrinter::printCCOperand(const MCInst *MI, int OpNo,
2890b57cec5SDimitry Andric raw_ostream &OS) {
2900b57cec5SDimitry Andric LPCC::CondCode CC =
2910b57cec5SDimitry Andric static_cast<LPCC::CondCode>(MI->getOperand(OpNo).getImm());
2920b57cec5SDimitry Andric // Handle the undefined value here for printing so we don't abort().
2930b57cec5SDimitry Andric if (CC >= LPCC::UNKNOWN)
2940b57cec5SDimitry Andric OS << "<und>";
2950b57cec5SDimitry Andric else
2960b57cec5SDimitry Andric OS << lanaiCondCodeToString(CC);
2970b57cec5SDimitry Andric }
2980b57cec5SDimitry Andric
printPredicateOperand(const MCInst * MI,unsigned OpNo,raw_ostream & OS)2990b57cec5SDimitry Andric void LanaiInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNo,
3000b57cec5SDimitry Andric raw_ostream &OS) {
3010b57cec5SDimitry Andric LPCC::CondCode CC =
3020b57cec5SDimitry Andric static_cast<LPCC::CondCode>(MI->getOperand(OpNo).getImm());
3030b57cec5SDimitry Andric // Handle the undefined value here for printing so we don't abort().
3040b57cec5SDimitry Andric if (CC >= LPCC::UNKNOWN)
3050b57cec5SDimitry Andric OS << "<und>";
3060b57cec5SDimitry Andric else if (CC != LPCC::ICC_T)
3070b57cec5SDimitry Andric OS << "." << lanaiCondCodeToString(CC);
3080b57cec5SDimitry Andric }
309