[llvm-commits] [llvm] r74328 - in /llvm/trunk/lib/Target/X86: AsmPrinter/X86ATTAsmPrinter.cpp X86RegisterInfo.td
Chris Lattner
clattner at apple.com
Fri Jun 26 15:05:10 PDT 2009
On Jun 26, 2009, at 2:42 PM, Dan Gohman wrote:
> On Jun 26, 2009, at 2:25 PM, Chris Lattner wrote:
> Author: lattner
>> Date: Fri Jun 26 16:25:00 2009
>> New Revision: 74328
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=74328&view=rev
>> Log:
>> add %rip to the GR64 register class. Lets avoid allocating it to
>> anything though! :)
>
> Hi Chris,
>
> Is this really a good idea? %rip isn't really a register,
> from the compiler's perspective. It's just assembly syntax
> for a special kind of address that happens to resemble register
> syntax. Wouldn't it be better to model %rip as one of these
> new cool target flags you're working on?
RIP really is part of the addressing mode. SYMBOL(%rip) is just reg
+imm where the reg is RIP and the immediate is the offset of SYMBOL
(with a flag saying it's RIP rel, but that doesn't print as anything).
I plan to model this with RIP in the base register of the normal
addressing mode gunk. Do you see a specific problem with this approach?
-Chris
More information about the llvm-commits
mailing list