[PATCH][PowerPC] Fix BlockAddress access on ppc64
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Thu Oct 30 11:13:46 PDT 2014
Hello,
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.
(See attached file: diff-llvm-ppc64-blockaddress)
OK for mainline?
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand | Phone: +49-7031/16-3727
STSM, GNU/Linux compilers and toolchain
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk
Wittkopp
Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-llvm-ppc64-blockaddress
Type: application/octet-stream
Size: 8351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141030/cf5c27dc/attachment.obj>
More information about the llvm-commits
mailing list