Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2020 23:41:36 +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: r356856 - head/sys/powerpc/powerpc
Message-ID:  <202001172341.00HNfaRw095049@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Fri Jan 17 23:41:35 2020
New Revision: 356856
URL: https://svnweb.freebsd.org/changeset/base/356856

Log:
  [PowerPC] Save a dword in the powerpc64 signal trampoline
  
  In r291668, an instruction was added to sigcode64.S without the nop pad at
  the end being taken out.
  
  Due to alignment, this means that a dword is being wasted on the shared
  page for no reason.
  
  Take out this nop, and add some comments while I'm here.
  
  Reviewed by:	jhibbits
  Sponsored by:	Tag1 Consulting, Inc.
  Differential Revision:	https://reviews.freebsd.org/D23055

Modified:
  head/sys/powerpc/powerpc/sigcode64.S

Modified: head/sys/powerpc/powerpc/sigcode64.S
==============================================================================
--- head/sys/powerpc/powerpc/sigcode64.S	Fri Jan 17 22:26:41 2020	(r356855)
+++ head/sys/powerpc/powerpc/sigcode64.S	Fri Jan 17 23:41:35 2020	(r356856)
@@ -63,9 +63,13 @@ CNAME(sigcode64_elfv2):
 	addi	3,1,112+SF_UC		/* restore sp, and get &frame->sf_uc */
 	li	0,SYS_sigreturn
 	sc				/* sigreturn(scp) */
+	/*
+	 * If we get back to here, it means sigreturn failed.
+	 * As such, we are now stuck in the wrong context.
+	 * Exit immediately without touching the stack.
+	 */
 	li	0,SYS_exit
 	sc				/* exit(errno) */
-	nop				/* align to doubleword */
 endsigcode64:
 	
 	.data



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