[LLVMdev] Adapting created intrinsics to PowerPC backend
evan.cheng at apple.com
Tue Mar 18 10:08:45 PDT 2008
On Mar 17, 2008, at 9:30 AM, aditya vishnubhotla wrote:
> I have implemented intrinsics which are placeholders
> for instructions executed elsewhere (e.g. in HW).
> So i have two types of intrinsics migrate_begin and
> migrate_end. Now i would like to make these intrinsics
> known to the PowerPC backend. Since the hardware
> initialization can not be implemented by one
> instruction it has to be expanded to a library call or
> lowered to something the ppc backend can understand?
> If it is possible to add the functionality of these
> functions to a library:
> Where is this library and how can these functions be
> Is it correct that entries in IntrinsicsPowerPC.td
> PPCInstrInfo.td files have to be done to make these
> new intrinsics known?
You would add the definition to IntrinsicsPowerPC.td to let it be
known. Then you can add a instruction selection pattern to
PPCInstrInfo.td so it would be translated to the right PPC
instruction(s). Alternatively, you can add C++ code to
PPCISelDAGToDAG.cpp to do the translation.
> "migrate_begin" is an instruction with a variable
> argument list. Is there some
> special handling necessary to add variable argument
In theory, you just need to specify the matching instruction input
> I would be thankful for any hints regarding this
> PowerPC backend adaptation.
> Thank You
> Never miss a thing. Make Yahoo your home page.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev