Skip to contentSkip to conversation

CRIS linux-user/cris (new)

PATCH New Edgar E. Iglesias 1 participant 1 message Oct 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CRIS linux-user/cris (new)

This adds CRIS user emulation support, new cris subdir.

Signature · 8 lines
Edgar E. Iglesias
Axis Communications AB

 linux-user/cris/syscall.h       |   37 +++++
 linux-user/cris/syscall_nr.h    |  291 +++++++++++++++++++++++++++++++++++++++
 linux-user/cris/target_signal.h |   29 ++++
 linux-user/cris/termbits.h      |  214 ++++++++++++++++++++++++++++
 4 files changed, 571 insertions(+), 0 deletions(-)
linux-user/cris/syscall.h new file +37 -0
new file mode 100644
index 0000000..8fa7474
@@ -0,0 +1,37 @@
+
+#define UNAME_MACHINE "cris"
+
+/* pt_regs not only specifices the format in the user-struct during
+ * ptrace but is also the frame format used in the kernel prologue/epilogues
+ * themselves
+ */
+
+struct target_pt_regs {
+        unsigned long orig_r10;
+        /* pushed by movem r13, [sp] in SAVE_ALL. */
+        unsigned long r0;
+        unsigned long r1;
+        unsigned long r2;
+        unsigned long r3;
+        unsigned long r4;
+        unsigned long r5;
+        unsigned long r6;
+        unsigned long r7;
+        unsigned long r8;
+        unsigned long r9;
+        unsigned long r10;
+        unsigned long r11;
+        unsigned long r12;
+        unsigned long r13;
+        unsigned long acr;
+        unsigned long srs;
+        unsigned long mof;
+        unsigned long spc;
+        unsigned long ccs;
+        unsigned long srp;
+        unsigned long erp; /* This is actually the debugged process' PC */
+        /* For debugging purposes; saved only when needed. */
+        unsigned long exs;
+        unsigned long eda;
+};
+
linux-user/cris/syscall_nr.h new file +291 -0

291 lines not on this page · raw message

linux-user/cris/target_signal.h new file +29 -0
new file mode 100644
index 0000000..e566de8
@@ -0,0 +1,29 @@
+#ifndef TARGET_SIGNAL_H
+#define TARGET_SIGNAL_H
+
+#include "cpu.h"
+
+/* this struct defines a stack used during syscall handling */
+
+typedef struct target_sigaltstack {
+	target_ulong ss_sp;
+	target_ulong ss_size;
+	target_long ss_flags;
+} 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 target_ulong get_sp_from_cpustate(CPUCRISState *state)
+{
+    return state->regs[14];
+}
+
+#endif /* TARGET_SIGNAL_H */
linux-user/cris/termbits.h new file +214 -0

214 lines not on this page · raw message