From 3dbb9df36bdb0a7e8e00f24f94fa06a802a3eeee Mon Sep 17 00:00:00 2001 From: Brandon Bergren Date: Thu, 14 May 2020 04:00:35 +0000 Subject: [PATCH] [PowerPC] Fix wrong instructions in _savegpr_X. We were accidentally using stfd instead of stw in our SAVEGPR macro. This has almost certainly been causing crashes when compiling with -Os. Reviewed by: jhibbits (in irc) MFC after: 3 days Sponsored by: Tag1 Consulting, Inc. --- lib/csu/powerpc/crtsavres.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/csu/powerpc/crtsavres.S b/lib/csu/powerpc/crtsavres.S index 2341b611b4d9..582b69f2fe37 100644 --- a/lib/csu/powerpc/crtsavres.S +++ b/lib/csu/powerpc/crtsavres.S @@ -93,7 +93,7 @@ RESTFPR(31) blr #define SAVEGPR(r) _CRTENTRY(__CONCAT(_savegpr_,r)) \ - stfd r,(-128 + r*4)(11) + stw r,(-128 + r * 4)(11) SAVEGPR(14) SAVEGPR(15) @@ -165,7 +165,7 @@ RESTFPR_X(31) blr #define RESTGPR_X(r) _CRTENTRY(__CONCAT(__CONCAT(_restgpr_,r),_x)) \ - lwz r,(-128 + r*4)(11) + lwz r,(-128 + r * 4)(11) RESTGPR_X(14) RESTGPR_X(15)