aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.hppa5
-rw-r--r--ports/sysdeps/hppa/__longjmp.c25
2 files changed, 18 insertions, 12 deletions
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 3efd186..105b04a 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2014-04-29 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/__longjmp.c (__longjmp): Use r25 as second arg
+ to simplify generated assembly.
+
2014-04-11 Torvald Riegel <triegel@redhat.com>
[BZ #15215]
diff --git a/ports/sysdeps/hppa/__longjmp.c b/ports/sysdeps/hppa/__longjmp.c
index 3637fdb..cb1aed1 100644
--- a/ports/sysdeps/hppa/__longjmp.c
+++ b/ports/sysdeps/hppa/__longjmp.c
@@ -27,6 +27,7 @@ __longjmp (__jmp_buf env, int val)
/* We must use one of the non-callee saves registers
for env. */
register unsigned long r26 asm ("r26") = (unsigned long)&env[0];
+ register unsigned long r25 asm ("r25") = (unsigned long)(val == 0 ? 1 : val);
#ifdef CHECK_SP
CHECK_SP (env[0].__jmp_buf.__sp);
@@ -61,22 +62,22 @@ __longjmp (__jmp_buf env, int val)
/* Load return pointer. */
"ldw 80(%1), %%rp\n\t"
/* Ues a spare caller saves register. */
- "ldo 88(%1),%%r20\n\t"
+ "ldo 88(%1),%%r25\n\t"
/* Load callee saves from fr12 to fr21. */
- "fldds,ma 8(%%r20), %%fr12\n\t"
- "fldds,ma 8(%%r20), %%fr13\n\t"
- "fldds,ma 8(%%r20), %%fr14\n\t"
- "fldds,ma 8(%%r20), %%fr15\n\t"
- "fldds,ma 8(%%r20), %%fr16\n\t"
- "fldds,ma 8(%%r20), %%fr17\n\t"
- "fldds,ma 8(%%r20), %%fr18\n\t"
- "fldds,ma 8(%%r20), %%fr19\n\t"
- "fldds,ma 8(%%r20), %%fr20\n\t"
- "fldds 0(%%r20), %%fr21\n\t"
+ "fldds,ma 8(%%r25), %%fr12\n\t"
+ "fldds,ma 8(%%r25), %%fr13\n\t"
+ "fldds,ma 8(%%r25), %%fr14\n\t"
+ "fldds,ma 8(%%r25), %%fr15\n\t"
+ "fldds,ma 8(%%r25), %%fr16\n\t"
+ "fldds,ma 8(%%r25), %%fr17\n\t"
+ "fldds,ma 8(%%r25), %%fr18\n\t"
+ "fldds,ma 8(%%r25), %%fr19\n\t"
+ "fldds,ma 8(%%r25), %%fr20\n\t"
+ "fldds 0(%%r25), %%fr21\n\t"
/* Jump back to stored return address. */
"bv,n %%r0(%%r2)\n\t"
: /* No outputs. */
- : "r" (val == 0 ? 1 : val), "r" (r26)
+ : "r" (r25), "r" (r26)
: /* No point in clobbers. */ );
/* Avoid `volatile function does return' warnings. */
for (;;);