[LLVMdev] Modeling 16-bit pointer registers for an 8-bit target

Evan Cheng evan.cheng at apple.com
Wed Aug 6 13:36:35 PDT 2008


On Aug 6, 2008, at 3:54 AM, Sanjiv.Gupta at microchip.com wrote:

> Pointer size on our target is 16-bits, and we have two 16-bit  
> registers that can be used only to hold pointers (indirect addresses).
>
> All operations on the target are 8-bit operations, so it takes two 8- 
> bit loads to load these pointer registers.
>
> We want LLVM to automatically expand all types to 8-bit values.
>
> The problem is that LLVM does not expand GlobalAddresses, which are  
> 16-bit values.
> This in turn means that you have to specify a 16-bit register class,  
> and once you specify a 16-bit register class, LLVM does not further  
> expand 16-bit values.

I don't think there is code in Legalizer to expand GlobalAddress. But  
you can custom lower it. X86 custom lower GlobalAddress nodes for a  
different reason.

Evan

>
> Any suggestions on how to model this into LLVM?
>
> TIA,
> Sanjiv
> _______________________________________________
> 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/20080806/ff7dfd0e/attachment.html>


More information about the llvm-dev mailing list