Skip to content

Commit 286d7b4

Browse files
author
gkoehler
committed
Fix cc -ftrapping-math on macppc
Handle CALL_RM like CALL for 32-bit ELF. If a function call has the strictfp attribute, its opcode changes from CALL to CALL_RM. If a call uses the secure PLT, then it must getGlobalBaseReg() to set r30. After I rebuilt xenocara/lib/pixman with this change, Xorg stopped crashing on my macppc. pixman uses cc -ftrapping-math which puts strictfp on each function call. llvm/llvm-project#72758 ok jca@ tobhe@ deraadt@
1 parent b2e43b2 commit 286d7b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gnu/llvm/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5293,7 +5293,8 @@ void PPCDAGToDAGISel::Select(SDNode *N) {
52935293
// generate secure plt code for TLS symbols.
52945294
getGlobalBaseReg();
52955295
} break;
5296-
case PPCISD::CALL: {
5296+
case PPCISD::CALL:
5297+
case PPCISD::CALL_RM: {
52975298
if (PPCLowering->getPointerTy(CurDAG->getDataLayout()) != MVT::i32 ||
52985299
!TM.isPositionIndependent() || !Subtarget->isSecurePlt() ||
52995300
!Subtarget->isTargetELF())

0 commit comments

Comments
 (0)