[llvm-commits] [patch] add support for a movi32 of a symbol to the ARM MC asm printer

Rafael Espindola espindola at google.com
Sun May 9 19:36:02 PDT 2010


> Right, this isn't the right way to go here.  In general, the MC stuff should use *fewer* instructions that codegen does.  Things like "the tail call form of return" etc go away with MC.
>
> The right thing to do here depends on whether the reference to the global ends up with a special relocation type in the relocation entry.  Assuming it does, adding new VariantKinds is the right way to go (currently VariantKind is going to be a union of all target's relocation flags).  The best way to handle this is to have isel set these as TargetFlags when it lowers the instruction, then have ARM's MCInstLowering convert the target flags to the VariantKinds.

Ah, much better. The references do end up as different relocations
(R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS). There are not that many
relocation types, so we might be able to have one enum for all
targets.

The attached patch fixes the same issue as before, but now by updating
VariantKind. There is currently no tests for
-enable-arm-mcinst-printer. Should I add one or this is just something
we just expect to make the default in a short(ish) time frame?

> -Chris
>
>


Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: movi32.patch
Type: application/octet-stream
Size: 4556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100509/480c7964/attachment.obj>


More information about the llvm-commits mailing list