[cfe-dev] PPC asm register definitions
Mike Stump
mrs at apple.com
Mon Sep 14 15:23:35 PDT 2009
On Sep 14, 2009, at 3:01 PM, Richard Pennington wrote:
> I filed bug http://llvm.org/bugs/show_bug.cgi?id=4976 this morning.
> Dale
> Johannesen mentioned that "3" is not a valid register name
Actually, he didn't say exactly that. He said that there is a bug in
llvm that prevents "3" from working.
> for the LLVM PPC code generator, it wants "r3".
>
> Should I change Targets.cpp to use "r0"... instead?
I think it would be reasonable to add r0 as the canonical spelling (I
don't think any assemblers we support can't support r0, do they?), but
a ppc assembly expert might have a better idea. Note, we still have
to support 3 as a register name, you can't just remove it.
> Also, the names GCCReg* don't seem right. Wouldn't LLVMRegNames* fit
> better?
The naming comes from gcc's naming convention. This convention is at
times necessary to follow as these names can be exposed in the source
code. Changing it to LLVMRegNames just obscures that fact.
More information about the cfe-dev
mailing list