[llvm-dev] Adding fix-up information to an instruction created with BuildMI
Chris.Dewhurst via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 20 06:22:30 PDT 2016
I'm trying to work out how to add fix-up information to an instruction that is built with BuildMI.
The instruction is taking a local label (MBB), also created in the same piece code and needs to store its address. This address is fixed-up later in the compilation process.
Here's the essential fragment of code. This is custom lowering of an instruction (__builtin_setjmp), so I can't rely on the features provided by DAG legalization to help with fix-ups. I need to mark these instructions as needing later fix-ups here. I can't find any equivalent piece of code.
MIB = BuildMI(*thisMBB, MI, DL, TII->get(SP::SETHIi), LabelReg)
// Need some code here to mark that a Sparc HI22 fix-up is needed on this instruction
MIB = BuildMI(*thisMBB, MI, DL, TII->get(SP::ADDri), LabelReg)
// Need some code here to mark that a Sparc LO10 fix-up is needed on this instruction
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev