summaryrefslogtreecommitdiff
path: root/linux-user/tilegx/target_signal.h
diff options
context:
space:
mode:
authorChen Gang <xili_gchen_5257@hotmail.com>2015-08-21 05:35:43 +0800
committerRichard Henderson <rth@twiddle.net>2015-09-15 07:17:51 -0700
commit2cb154bc19854232b5379236dd9dfc06d83ced1e (patch)
tree079d954e1ab3cb6b13ac1105b75f43487734d40e /linux-user/tilegx/target_signal.h
parentb76a0d5db25ad9f81346930230092fdf1e88a5a1 (diff)
downloadqemu-2cb154bc19854232b5379236dd9dfc06d83ced1e.zip
linux-user: tilegx: Add architecture related features
They are based on Linux kernel tilegx architecture for 64 bit binary, and also based on tilegx ABI reference document, and also reference from other targets implementations. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <BLU436-SMTP2508945F92945BB525605A3B9660@phx.gbl> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'linux-user/tilegx/target_signal.h')
-rw-r--r--linux-user/tilegx/target_signal.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/linux-user/tilegx/target_signal.h b/linux-user/tilegx/target_signal.h
new file mode 100644
index 0000000000..b595f985cf
--- /dev/null
+++ b/linux-user/tilegx/target_signal.h
@@ -0,0 +1,28 @@
+#ifndef TARGET_SIGNAL_H
+#define TARGET_SIGNAL_H
+
+#include "cpu.h"
+
+/* this struct defines a stack used during syscall handling */
+
+typedef struct target_sigaltstack {
+ abi_ulong ss_sp;
+ abi_int ss_flags;
+ abi_ulong ss_size;
+} target_stack_t;
+
+/*
+ * sigaltstack controls
+ */
+#define TARGET_SS_ONSTACK 1
+#define TARGET_SS_DISABLE 2
+
+#define TARGET_MINSIGSTKSZ 2048
+#define TARGET_SIGSTKSZ 8192
+
+static inline abi_ulong get_sp_from_cpustate(CPUTLGState *state)
+{
+ return state->regs[TILEGX_R_SP];
+}
+
+#endif /* TARGET_SIGNAL_H */