Konstantin Vladimirov via llvm-dev
2016-Mar-30 15:38 UTC
[llvm-dev] How to split immediate in assembly output?
Hi, I am writing simple pattern in td that uses immediate and shall print it in assembler in two parts. Say for input immediate i: i1 = i << 2 i2 = i & 3 I want something like (simplified tablegen pseudocode): def MYINSN : Insn<(outs MyOut:$r0), (ins MyReg:$r1, MyImm32:$i), "prefix $i1 body $r0, $r1, $i2", [(... some pattern here)]>; In Insn pattern whole string goes to AsmString property. How can I do it with tablegen? Any examples from existing backends? P.S. Of course I can do custom node with one more parameter and write pattern matching in DAGToDAG selection, etc. I just wonder: may be there is some surprising tablegen magic to do it quickly in-place? In GCC md patterns allows C-code snippets for such cases, but in LLVM I can not find such possibility. --- With best regards, Konstnatin
Apparently Analagous Threads
- [LLVMdev] Passing specific register for an Instruction in target description files.
- Asterisk QOS working perfect using sveasoft 3.11g
- Relationship between dyn.load and library.dynam
- using vif from package "car" - "aliased coefficients in the model"
- store list objects in data.table