[llvm-commits] [llvm] r89403 - /llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp

Chris Lattner clattner at apple.com
Sun Nov 22 06:00:04 PST 2009


On Nov 19, 2009, at 3:10 PM, Jim Grosbach wrote:

> Author: grosbach
> Date: Thu Nov 19 17:10:28 2009
> New Revision: 89403
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=89403&view=rev
> Log:
> When placing constant islands and adjusting for alignment padding, inline
> assembly can confuse things utterly, as it's assumed that instructions in
> inline assembly are 4 bytes wide. For Thumb mode, that's often not true,
> so the calculations for when alignment padding will be present get thrown off,
> ultimately leading to out of range constant pool entry references. Making
> more conservative assumptions that padding may be necessary when inline asm
> is present avoids this situation.

Are you sure that this is the right thing to do?  GCC inline asm precisely specifies how the size of an inline asm is computed:
http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended-Asm (6.39.1)

If some inline asm isn't working with this algorithm, then the inline asm is wrong and should be fixed.

-Chris





More information about the llvm-commits mailing list