Displaying 5 results from an estimated 5 matches for "instformat".
2015 Aug 17
2
Print the Binary Form of an Instruction
Hi all,
I have defined an instruction in the InstFormat.td and InstrInfo.td files.
I also wrote a CodeEmitter class for that, and now I have a .inc file after
compilation that seems like it might be correct, BUT, I would like to see
what will be generated when the assembly code is converted to the binary
machine code!
Is there any command in TableGen or...
2008 Sep 12
2
[LLVMdev] Selection Condition Codes
...lemented; I just have yet to find a way to do it. I want the
select_cc instruction to be lowered into a comparison followed by a
conditional move. I've attempted to use a custom rule pasted below, but
it keeps giving me an error about the first argument.
What I attempted is as follows:
class InstFormat<dag outs, dag ins, string asmstr, list<dag> pattern>
: Instruction {
let Namespace = "Inst";
dag OutOperandList = outs;
dag InOperandList = ins;
let Pattern = pattern;
let AsmString = asmstr;
}
def SDTGenTernaryOp : SDTypeProfile<1, 3, [...
2015 Sep 15
2
Parsing Operands at TableGen Level
Hi all,
is it possible in TableGen to set value to instruction bits based on the
operands?
In other words, parsing the instruction at the TableGen level.
for instance:
"add $Rd, $Rn, $imm"
I want to have something like this:
*Inst{8} = ($Rn == Test::A0) 1 : 0;*
Is there any way to do that in TableGen? If not is there any example in the
provided example codes?
Cheers,
ES
2008 Sep 12
0
[LLVMdev] Selection Condition Codes
...ct_cc
> instruction to be lowered into a comparison followed by a conditional move.
"setOperationAction(ISD::SELECT_CC , MVT::Other, Expand);"
should do the trick; that will prevent SELECT_CC instructions from
being introduced. This one is easy to miss.
> def CMOVLOG : InstFormat<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS,
> GPR:$TVAL, GPR:$FVAL, CCOp:$cond),
The condition isn't properly an input... this seems likely to confuse
ISel. I'm not sure, though; I'm not really an expert on patterns, and
they can mess up in non-obvious ways.
> Maybe I'm ap...
2008 Sep 12
2
[LLVMdev] Selection Condition Codes
...ct_cc
> instruction to be lowered into a comparison followed by a conditional
move.
"setOperationAction(ISD::SELECT_CC , MVT::Other, Expand);"
should do the trick; that will prevent SELECT_CC instructions from
being introduced. This one is easy to miss.
> def CMOVLOG : InstFormat<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS,
> GPR:$TVAL, GPR:$FVAL, CCOp:$cond),
The condition isn't properly an input... this seems likely to confuse
ISel. I'm not sure, though; I'm not really an expert on patterns, and
they can mess up in non-obvious ways.
> Maybe I'm ap...