aboutsummaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-12-15 10:01:00 -0800
committerRichard Henderson <rth@twiddle.net>2017-01-23 09:52:40 -0800
commit7c248bcda1d1b3081b1bdb3a10352bb549dff2c5 (patch)
tree7f680c6a63c706206457dbcd94ad264c8d1764f9 /linux-user/elfload.c
parent1659e38e1d40b8d6b39d8a9c664a2db2df3c6865 (diff)
linux-user: Add HPPA startup and main loop
Including support for the atomic memory op syscalls. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 5cea39d172..51794bbb45 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1215,6 +1215,30 @@ static inline void init_thread(struct target_pt_regs *regs,
#endif /* TARGET_TILEGX */
+#ifdef TARGET_HPPA
+
+#define ELF_START_MMAP 0x80000000
+#define ELF_CLASS ELFCLASS32
+#define ELF_ARCH EM_PARISC
+#define ELF_PLATFORM "PARISC"
+#define STACK_GROWS_DOWN 0
+#define STACK_ALIGNMENT 64
+
+static inline void init_thread(struct target_pt_regs *regs,
+ struct image_info *infop)
+{
+ regs->iaoq[0] = infop->entry;
+ regs->iaoq[1] = infop->entry + 4;
+ regs->gr[23] = 0;
+ regs->gr[24] = infop->arg_start;
+ regs->gr[25] = (infop->arg_end - infop->arg_start) / sizeof(abi_ulong);
+ /* The top-of-stack contains a linkage buffer. */
+ regs->gr[30] = infop->start_stack + 64;
+ regs->gr[31] = infop->entry;
+}
+
+#endif /* TARGET_HPPA */
+
#ifndef ELF_PLATFORM
#define ELF_PLATFORM (NULL)
#endif