Adapting created intrinsics to PowerPC backend

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adapting created intrinsics to PowerPC backend

aditya vishnubhotla
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
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Adapting created intrinsics to PowerPC backend

Evan Cheng-2

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
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev