hhvm
hhvm copied to clipboard
[PPC64] r2 register shouldn't be clobbered in asm
HHVM Version
3.24.7
Operating System and Version
Ubuntu 18.10 using gcc7 (https://gcc.gnu.org/gcc-7/changes.html)
Standalone code, or other way to reproduce the problem
Building
Expected result
Build success
Actual result
hphp/util/portability.h:203:25: error: PIC register clobbered by ‘r2’ in ‘asm’
@racardoso , @gut, @lbianc: are any of you supporting HHVM on PPC64?
Yes, I'm going to send the patch to fix that.
I guess the problem is here https://github.com/facebook/hhvm/blob/master/hphp/util/portability.h#L210 right? It should test the GCC version and do not clobber r2 on versions that doesn't allow clobber r2 (TOC pointer). We already have the same issue on GCC 5.4.1 with r30.