[PATCH][PowerPC] Fix BlockAddress access on ppc64
Anton Blanchard
anton at samba.org
Thu Oct 30 13:31:34 PDT 2014
Hi Uli,
> Anton noticed that code using the GCC extension to take the address
> of a block label (which is used e.g. in Linux kernel code):
>
> __label__ here;
> here:
> printf ("current address: %p\n", &&here);
>
> is miscompiled on ppc64 since it directly accesses the label value
> via @l / @ha, which fails if the code is linked to an address > 2GB.
>
> The attached patch fixes this by loading such values from the TOC, as
> is done for any other global symbol.
Thanks! I verified this fixed the issue for me.
Anton
More information about the llvm-commits
mailing list