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. 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080925/ee679c43/attachment.html>
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>
One of the requirements for the backend that I am targeting is certain meta-data needs to be returned to the runtime. This includes the mapping between parameters and the locations this data is expected to be stored at. This is mainly because there are multiple address spaces and each one is mapped differently but all are assigned registers from the same register class. So this mapping needs to be known at compile time and passed in the generated code to the runtime to be processed before execution. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Evan Cheng Sent: Monday, September 29, 2008 8:52 AM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Going from argument to register and back 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/e5455801/attachment.html>