powerpc: setcontext.S uses power6 mtfsf when not supported [BZ #18116]
authorMartin Sebor <msebor@redhat.com>
Mon, 1 Jun 2015 17:12:09 +0000 (14:12 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Mon, 1 Jun 2015 19:19:50 +0000 (16:19 -0300)
commitdb8fed87d9741b6b3da6c2257f01d63ef2fe407c
treed953222a4268f606005216e2f7d8a91ec6fca0a7
parent0cd2828695cc328aa1b48379436d15c39d433076
powerpc: setcontext.S uses power6 mtfsf when not supported [BZ #18116]

The attached patch fixes a glibc build failure with gcc 5 on powerpc64le
caused by a recent change in gcc where the compiler defines the
_ARCH_PWR6 macro when processing assembly files but doesn't invoke the
assembler in the corresponding machine mode (unless it has been
explicitly configured to target POWER 6 or later).  A bug had been filed
with gcc for this (65341) but was closed as won't fix. Glibc relies on
the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5
instructions (specifically, the four-argument form of the mtfsf insn).
A similar problem had occurred in the past (bug 10118) but the fix that
was committed for it didn't anticipate this new problem.
ChangeLog
sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S