[PATCH] Fix CoerceIntOrPtrToIntOrPtr on big-endian targets

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue May 28 21:04:16 PDT 2013


Hi,

Please review this patch which fixes the CoerceIntOrPtrToIntOrPtr() function on big-endian targets.

If I understand coercion correctly, it is supposed to be equivalent to storing one type and loading a different type from the same address. The CoerceIntOrPtrToIntOrPtr() performs type coercion of integers and pointers without the loads and stores. On big-endian targets, it needs to insert shifts when coercing types of different sizes.

This also gets us the correct argument passing behavior on SPARC v9 which passes small structs in the high bits of registers.

Thanks,
/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-CoerceIntOrPtrToIntOrPtr-on-big-endian-targets.patch
Type: application/octet-stream
Size: 4034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130528/8d5d75f3/attachment.obj>


More information about the cfe-commits mailing list