summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-03-21 20:09:10 +0000
committerJeff Johnston <jjohnstn@redhat.com>2014-03-21 20:09:10 +0000
commit5805cb1f8c1644bb888b03538af2aec30ca27da0 (patch)
tree3bdfea626ee4ca0a1d225fa24b46d59d5e25ddac
parent364f6915f8bc897f9916d4eec76f2f7b5880cd85 (diff)
downloadcygnal-5805cb1f8c1644bb888b03538af2aec30ca27da0.tar.gz
cygnal-5805cb1f8c1644bb888b03538af2aec30ca27da0.tar.bz2
cygnal-5805cb1f8c1644bb888b03538af2aec30ca27da0.zip
2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/setjmp.S: Optimize.
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/machine/nds32/setjmp.S9
2 files changed, 8 insertions, 5 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index ae3754746..413a30786 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
+
+ * libc/machine/nds32/setjmp.S: Optimize.
+
2014-03-07 Corinna Vinschen <vinschen@redhat.com>
Jeff Johnston <jjohnstn@redhat.com>
diff --git a/newlib/libc/machine/nds32/setjmp.S b/newlib/libc/machine/nds32/setjmp.S
index 90b162ef8..906efab8f 100644
--- a/newlib/libc/machine/nds32/setjmp.S
+++ b/newlib/libc/machine/nds32/setjmp.S
@@ -78,10 +78,9 @@ longjmp:
lmw.bim $r6, [$r0], $r14, 0x0
lmw.bim $r16, [$r0], $r19, 0xf
#endif
- /* If the value val is 0, 1 will be returned instead. */
- bnez $r1, 1f
- movi $r1, 1
-1:
- move $r0, $r1
+ /* Set val as return value. If the value val is 0, 1 will be returned
+ instead. */
+ movi $r0, 1
+ cmovn $r0, $r1, $r1 /* r0=(r1!=0)? r1: r0 */
ret
.size longjmp, .-longjmp