summaryrefslogtreecommitdiff
path: root/ports/sysdeps/unix/alpha/sysdep.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-09-28 10:51:01 -0700
committerRichard Henderson <rth@twiddle.net>2012-09-28 10:51:01 -0700
commitc18b7473cb88e49d9f59ac2b1d2c68692202313d (patch)
treeb7730742be5192d423c275b972d44e49d413a484 /ports/sysdeps/unix/alpha/sysdep.h
parentb31606c0e1d9f04e2498b7c8262f7de87daa7ce7 (diff)
downloadglibc-c18b7473cb88e49d9f59ac2b1d2c68692202313d.tar.gz
alpha: Fix all users of SYSCALL_ERROR_HANDLER
The fix begun in 64e65bc1 was incomplete. Fixed by adding a new SYSCALL_ERROR_FALLTHRU macro.
Diffstat (limited to 'ports/sysdeps/unix/alpha/sysdep.h')
-rw-r--r--ports/sysdeps/unix/alpha/sysdep.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/ports/sysdeps/unix/alpha/sysdep.h b/ports/sysdeps/unix/alpha/sysdep.h
index 4ee0746acc..75c06c9cfd 100644
--- a/ports/sysdeps/unix/alpha/sysdep.h
+++ b/ports/sysdeps/unix/alpha/sysdep.h
@@ -52,13 +52,20 @@
#define END(sym) .end sym
#ifdef PROF
+# define PSEUDO_PROF \
+ .set noat; \
+ lda AT, _mcount; \
+ jsr AT, (AT), _mcount; \
+ .set at
+#else
+# define PSEUDO_PROF
+#endif
+
+#ifdef PROF
# define PSEUDO_PROLOGUE \
.frame sp, 0, ra; \
ldgp gp,0(pv); \
- .set noat; \
- lda AT,_mcount; \
- jsr AT,(AT),_mcount; \
- .set at; \
+ PSEUDO_PROF; \
.prologue 1
#elif defined PIC
# define PSEUDO_PROLOGUE \
@@ -80,16 +87,21 @@
#if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
+$syscall_error: \
stl v0, rtld_errno(gp) !gprel; \
lda v0, -1; \
ret
+# define SYSCALL_ERROR_FALLTHRU
#elif defined(PIC)
-# define SYSCALL_ERROR_LABEL __syscall_error !samegp
+# define SYSCALL_ERROR_LABEL __syscall_error !samegp
# define SYSCALL_ERROR_HANDLER
+# define SYSCALL_ERROR_FALLTHRU br SYSCALL_ERROR_LABEL
#else
-# define SYSCALL_ERROR_LABEL $syscall_error
-# define SYSCALL_ERROR_HANDLER \
- jmp $31, __syscall_error
+# define SYSCALL_ERROR_LABEL $syscall_error
+# define SYSCALL_ERROR_HANDLER \
+$syscall_error: \
+ jmp $31, __syscall_error
+# define SYSCALL_ERROR_FALLTHRU
#endif /* RTLD_PRIVATE_ERRNO */
/* Overridden by specific syscalls. */
@@ -108,14 +120,9 @@ __LABEL(name) \
bne a3, SYSCALL_ERROR_LABEL
#undef PSEUDO_END
-#if defined(PIC) && !RTLD_PRIVATE_ERRNO
-# define PSEUDO_END(sym) END(sym)
-#else
-# define PSEUDO_END(sym) \
-$syscall_error: \
+#define PSEUDO_END(sym) \
SYSCALL_ERROR_HANDLER; \
END(sym)
-#endif
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.globl name; \