[LLVMdev] Going from argument to register and back

Evan Cheng evan.cheng at apple.com
Mon Sep 29 08:51:57 PDT 2008


On Sep 25, 2008, at 10:49 AM, Villmow, Micah wrote:

> I am having trouble trying to figure out two pieces of information  
> from attempting to map arguments to registers.
> How do I determine, based on the argument name, which register the  
> value is supposed to be assigned to?
> I can hard-coded it currently and it will be correct 100% of the  
> time with the current set of assumptions,
> but I would rather determine it dynamically so that I can change my  
> assumptions and still get the right results.

Why would you want to map arguments to registers based on names?  
Calling conventions are encoded in td files such X86CallingConv.td.  
Parameter registers etc. are determined from argument number / type,  
not names.

Evan

>
> Thanks,
>
> Micah Villmow
> Systems Engineer
> Advanced Technology & Performance
> Advanced Micro Devices Inc.
> 4555 Great America Pkwy,
> Santa Clara, CA. 95054
> P: 408-572-6219
> F: 408-572-6596
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080929/5a2a1a9a/attachment.html>


More information about the llvm-dev mailing list