Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2020 04:00:35 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361024 - head/lib/csu/powerpc
Message-ID:  <202005140400.04E40Zeb071152@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Thu May 14 04:00:35 2020
New Revision: 361024
URL: https://svnweb.freebsd.org/changeset/base/361024

Log:
  [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.

Modified:
  head/lib/csu/powerpc/crtsavres.S

Modified: head/lib/csu/powerpc/crtsavres.S
==============================================================================
--- head/lib/csu/powerpc/crtsavres.S	Thu May 14 03:30:27 2020	(r361023)
+++ head/lib/csu/powerpc/crtsavres.S	Thu May 14 04:00:35 2020	(r361024)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005140400.04E40Zeb071152>