Displaying 2 results from an estimated 2 matches for "printpcrelimmoperand".
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
Hi
In my MC6809 backend, in llvm/lib/Target/MC6809/InstPrinter/MC6809InstPrinter.cpp, I have the routine
void MC6809InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
const MCOperand &Op = MI->getOperand(OpNo);
ZZ
if (Op.isImm()) {
int64_t Imm = Op.getImm() + 2; <<<========================
O << "$";
if (Imm >= 0)
O << '+';
O <<...
2018 Mar 26
0
wrong imm value for branch conditions..
...b:$T),*
* (BGEID (CMP GR32:$L, GR32:$R), bb:$T)>;*
*def BGEID : TBT<0b101110, (outs), (ins GR32:$ra, brtarget:$offset),
"bgeid\t$ra,$offset", [], IIC_BRc> {*
* let rd = 0b10101;*
*}*
*def brtarget : Operand<OtherVT>*
*{*
* let PrintMethod = "printPCRelImmOperand";*
* let EncoderMethod = "getBranchTargetOpValue";*
* let OperandType = "OPERAND_PCREL";*
* let DecoderMethod = "DecodeBranchTarget";*
*}*
*getBranchTargetOpValue**(const MCInst &MI, unsigned OpNo,*
* SmallVectorImpl<MCFix...