diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-18 21:14:09 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-18 21:14:09 +0000 |
commit | 5ef54116ea1c576995f0074b71400bf7bda08cf1 (patch) | |
tree | 5be5c3104d58828d73aac1fcef9f2bf8b62f0121 /linux-user/elfload.c | |
parent | 725cb90bf7e2487fe5aa5621cc10afe6d169e310 (diff) |
Sparc64 user emulator fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2063 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r-- | linux-user/elfload.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 687ff77b4d..57b5ed27d8 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -135,11 +135,13 @@ enum #define ELF_START_MMAP 0x80000000 -#define elf_check_arch(x) ( (x) == EM_SPARC ) +#define elf_check_arch(x) ( (x) == EM_SPARCV9 ) #define ELF_CLASS ELFCLASS64 #define ELF_DATA ELFDATA2MSB -#define ELF_ARCH EM_SPARC +#define ELF_ARCH EM_SPARCV9 + +#define STACK_BIAS 2047 static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop) { @@ -147,7 +149,7 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i regs->pc = infop->entry; regs->npc = regs->pc + 4; regs->y = 0; - regs->u_regs[14] = infop->start_stack - 16 * 4; + regs->u_regs[14] = infop->start_stack - 16 * 8 - STACK_BIAS; } #else |