aditya vishnubhotla
2008-Mar-17 16:30 UTC
[LLVMdev] Adapting created intrinsics to PowerPC backend
Hi, 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 added? Is it correct that entries in IntrinsicsPowerPC.td and PPCInstrInfo.td files have to be done to make these new intrinsics known? "migrate_begin" is an instruction with a variable argument list. Is there some special handling necessary to add variable argument functions? I would be thankful for any hints regarding this PowerPC backend adaptation. Thank You Aditya ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
On Mar 17, 2008, at 9:30 AM, aditya vishnubhotla wrote:> Hi, > > 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 > added? > > Is it correct that entries in IntrinsicsPowerPC.td > and > 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 > functions?In theory, you just need to specify the matching instruction input operands "variable_ops". Evan> > > I would be thankful for any hints regarding this > PowerPC backend adaptation. > > Thank You > Aditya > > > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] Creation of Intrinsics with Pointer Return Types
- [LLVMdev] Creation of Intrinsics with Pointer Return Types
- [LLVMdev] Implementing llvm.memory.barrier on PowerPC
- [LLVMdev] Implementing llvm.memory.barrier on PowerPC
- [LLVMdev] Implementing llvm.memory.barrier on PowerPC