about summary refs log tree commit diff
path: root/sysdeps/unix/mips
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/mips')
-rw-r--r--sysdeps/unix/mips/sysdep.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 13a3752dc8..dd2795edc4 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -51,6 +51,18 @@
 
 #define ret_NOERRNO ret
 
+#define PSEUDO_ERRVAL(name, syscall_name, args)	\
+  .align 2;						\
+  ENTRY(name)						\
+  .set noreorder;					\
+  li v0, SYS_ify(syscall_name);				\
+  syscall
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
+
+#define ret_ERRVAL ret
+
 #define r0	v0
 #define r1	v1
 /* The mips move insn is d,s.  */