summaryrefslogtreecommitdiffstats
path: root/runtime/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syscall.h')
-rw-r--r--runtime/syscall.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/runtime/syscall.h b/runtime/syscall.h
index 24e93463..24fc7b1c 100644
--- a/runtime/syscall.h
+++ b/runtime/syscall.h
@@ -66,7 +66,15 @@
#define MUNMAP_SYSCALL_NO(tsk) 91
#define MREMAP_SYSCALL_NO(tsk) 163
#endif
-
+
+#if defined(__ia64__)
+#define MMAP_SYSCALL_NO(tsk) 1151
+#define MMAP2_SYSCALL_NO(tsk) 1172
+#define MPROTECT_SYSCALL_NO(tsk) 1155
+#define MUNMAP_SYSCALL_NO(tsk) 1152
+#define MREMAP_SYSCALL_NO(tsk) 1156
+#endif
+
#if !defined(MMAP_SYSCALL_NO) || !defined(MMAP2_SYSCALL_NO) \
|| !defined(MPROTECT_SYSCALL_NO) || !defined(MUNMAP_SYSCALL_NO) \
|| !defined(MREMAP_SYSCALL_NO)
@@ -95,6 +103,14 @@ __stp_user_syscall_nr(struct pt_regs *regs)
}
#endif
+#if defined(__ia64__)
+static inline unsigned long
+__stp_user_syscall_nr(struct pt_regs *regs)
+{
+ return regs->r15;
+}
+#endif
+
#if defined(__i386__) || defined(__x86_64__)
static inline long *
__stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs)
@@ -129,6 +145,14 @@ __stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs)
}
#endif
+#if defined(__ia64__)
+static inline long *
+__stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs)
+{
+ return &regs->r8;
+}
+#endif
+
#if defined(__i386__) || defined(__x86_64__)
static inline long *
__stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs,
@@ -211,4 +235,20 @@ __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs,
}
#endif
+#if defined(__ia64__)
+#define __stp_user_syscall_arg(task, regs, n) \
+ ____stp_user_syscall_arg(task, regs, n, &c->unwaddr)
+
+static inline long *
+____stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs,
+ unsigned int n, unsigned long **cache)
+{
+ if (n > 5) {
+ _stp_error("syscall arg > 5");
+ return NULL;
+ }
+ return __ia64_fetch_register(n + 32, regs, cache);
+}
+#endif
+
#endif /* _SYSCALL_H_ */