Displaying 2 results from an estimated 2 matches for "immediateasmoperand".
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
...et Inst{12-8} = 0b01101; let Inst{7-0} = opcode; }
and I have
def pcoffset8 : Operand<i8>, ImmLeaf<i8, [{ return Immediate >= -128 && Immediate <= 127; }]> {
let PrintMethod = "printPCRelImmOperand";
let MIOperandInfo = (ops i8imm);
let ParserMatchClass = ImmediateAsmOperand<"Imm8">;
let EncoderMethod = "getMemOpValue";
let DecoderMethod = "DecodeMemOperand";
}
def pcoffset16 : Operand<i16>, ImmLeaf<i16, [{ return Immediate >= -32768 && Immediate <= 32767; }]> {
let PrintMethod = "printPCRelImmOp...
2015 Dec 07
2
Immediate value boundary checking
Dear all,
I have written an assembler which reads assembly instructions and produces
the equivalent binary. I have a problem. Although I set the bit range and
immediate type for an instruction like add which accepts a register and an
immediate value, I can simply overflow that value and llvm/tablegen doesn't
care!
for example for a i8imm imm value (bits<8> val) these two produce the