mailing list of musl libc
 help / color / mirror / code / Atom feed
From: <info@mobile-stream.com>
To: musl@lists.openwall.com
Subject: [PATCH] mips: simplify longjmp
Date: Wed, 11 Sep 2019 13:05:04 +0300	[thread overview]
Message-ID: <20190911103224.1C6E65C44B@mx7.valuehost.ru> (raw)

borrowed from the risc-v code.

OR (not ADDU) is intentional to please 74K* pipeline.
---
 src/setjmp/mips/longjmp.S | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/setjmp/mips/longjmp.S b/src/setjmp/mips/longjmp.S
index fdb6c95d..c3dd54ea 100644
--- a/src/setjmp/mips/longjmp.S
+++ b/src/setjmp/mips/longjmp.S
@@ -6,11 +6,6 @@
 .type   longjmp,@function
 _longjmp:
 longjmp:
-	move    $2, $5
-	bne     $2, $0, 1f
-	nop
-	addu    $2, $2, 1
-1:
 #ifndef __mips_soft_float
 	lwc1    $20, 56($4)
 	lwc1    $21, 60($4)
@@ -36,5 +31,7 @@ longjmp:
 	lw      $22, 32($4)
 	lw      $23, 36($4)
 	lw      $30, 40($4)
-	jr      $ra
 	lw      $28, 44($4)
+	sltiu	$2, $5, 1
+	jr      $ra
+	 or	$2, $5, $2
\ No newline at end of file
-- 
2.23.0.windows.1




                 reply	other threads:[~2019-09-11 10:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190911103224.1C6E65C44B@mx7.valuehost.ru \
    --to=info@mobile-stream.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).