[LLVMdev] TableGen Calling Convention help
Micah.Villmow at amd.com
Tue Sep 16 11:10:35 CDT 2008
Yeah, I'd say it would be similar to be register rN-rN+J, where J is
the number of registers and N is some offset large enough to not
conflict with the register allocator. I've found a way to get it done by
just specifying the numbers as an offset of the last register defined in
RegisterInfo.td, but I'm not sure this is the correct way. I'll take a
look at what you mentioned and see if I can figure a way out to do what
I want to do.
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On Behalf Of Eli Friedman
Sent: Monday, September 15, 2008 7:46 PM
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] TableGen Calling Convention help
On Mon, Sep 15, 2008 at 4:51 PM, Villmow, Micah <Micah.Villmow at amd.com>
> With my backend code gen I want to assign calling parameters to a list
> registers, but since I'm targeting a virtual instruction set. I don't
> to be limited by the number of registers. Is there a way using
> specify just a starting register to assign to for the CallingConv
> then have it just use sequential registers?
No; you'll have to hack it to deal with an infinite register file.
The relevant bits are include/llvm/CallingConvLower.h,
lib/Target/TargetCallingConv.td. None of the current LLVM targets
using CodeGen have infinite registers.
Although, what exactly is the calling convention? Are the arguments
supposed to be in registers r0-rN, where N is the number of arguments?
Or is there some way of specifying which registers to pass? Where
does the caller save registers? Or does the target use something like
SPARC register windows?
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the LLVMdev