hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

[PPC64] r2 register shouldn't be clobbered in asm

Open lbianc opened this issue 7 years ago • 3 comments

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’

lbianc avatar May 16 '18 19:05 lbianc

@racardoso , @gut, @lbianc: are any of you supporting HHVM on PPC64?

fredemmott avatar May 16 '18 19:05 fredemmott

Yes, I'm going to send the patch to fix that.

lbianc avatar May 16 '18 19:05 lbianc

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.

racardoso avatar May 16 '18 19:05 racardoso