Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2017 07:25:38 +0000 (UTC)
From:      Jason Evans <jasone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320136 - head/lib/libc/aarch64/gen
Message-ID:  <201706200725.v5K7PcmQ097937@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jasone
Date: Tue Jun 20 07:25:38 2017
New Revision: 320136
URL: https://svnweb.freebsd.org/changeset/base/320136

Log:
  Decrease relative branch brittleness.
  
  Replace conditional branches with trampolines to unconditional branches when
  jumping to labels within other compilation units.  This increases the offset
  range from +-1 MiB to +-128 MiB.

Modified:
  head/lib/libc/aarch64/gen/sigsetjmp.S

Modified: head/lib/libc/aarch64/gen/sigsetjmp.S
==============================================================================
--- head/lib/libc/aarch64/gen/sigsetjmp.S	Tue Jun 20 06:20:09 2017	(r320135)
+++ head/lib/libc/aarch64/gen/sigsetjmp.S	Tue Jun 20 07:25:38 2017	(r320136)
@@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$");
 
 ENTRY(sigsetjmp)
 	cmp	x1, #0
-	b.eq	_C_LABEL(_setjmp)
+	b.eq	1f
 	b	_C_LABEL(setjmp)
+1:
+	b	_C_LABEL(_setjmp)
 END(sigsetjmp)
 
 ENTRY(siglongjmp)
@@ -45,8 +47,10 @@ ENTRY(siglongjmp)
 
 	/* Check the magic */
 	cmp	x2, x3
-	b.eq	_C_LABEL(_longjmp)
+	b.eq	1f
 	b	_C_LABEL(longjmp)
+1:
+	b	_C_LABEL(_longjmp)
 	.align	3
 .Lmagic:
 	.quad	_JB_MAGIC__SETJMP



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