[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 17/22] linux-user: Move get_ppc64_abi
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL v3 17/22] linux-user: Move get_ppc64_abi |
Date: |
Fri, 22 Aug 2014 16:24:35 +0300 |
From: Tom Musta <address@hidden>
The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This
routine is currently implemented in the linux-user/elfload.c file but
is useful in other scenarios. Move the routine to a more generally
available location (linux-user/ppc/target_cpu.h).
Signed-off-by: Tom Musta <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/elfload.c | 9 ---------
linux-user/ppc/target_cpu.h | 10 ++++++++++
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 60777fe..bea803b 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -824,8 +824,6 @@ static uint32_t get_elf_hwcap2(void)
NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
} while (0)
-static inline uint32_t get_ppc64_abi(struct image_info *infop);
-
static inline void init_thread(struct target_pt_regs *_regs, struct image_info
*infop)
{
_regs->gpr[1] = infop->start_stack;
@@ -1205,13 +1203,6 @@ static inline void init_thread(struct target_pt_regs
*regs, struct image_info *i
#include "elf.h"
-#ifdef TARGET_PPC
-static inline uint32_t get_ppc64_abi(struct image_info *infop)
-{
- return infop->elf_flags & EF_PPC64_ABI;
-}
-#endif
-
struct exec
{
unsigned int a_info; /* Use macros N_MAGIC, etc for access */
diff --git a/linux-user/ppc/target_cpu.h b/linux-user/ppc/target_cpu.h
index 9cc0c3b..26f4ba2 100644
--- a/linux-user/ppc/target_cpu.h
+++ b/linux-user/ppc/target_cpu.h
@@ -38,4 +38,14 @@ static inline void cpu_set_tls(CPUPPCState *env,
target_ulong newtls)
#endif
}
+#ifndef EF_PPC64_ABI
+#define EF_PPC64_ABI 0x3
+#endif
+
+static inline uint32_t get_ppc64_abi(struct image_info *infop)
+{
+ return infop->elf_flags & EF_PPC64_ABI;
+}
+
+
#endif
--
2.0.1
- [Qemu-devel] [PULL v3 18/22] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2, (continued)
- [Qemu-devel] [PULL v3 18/22] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 19/22] linux-user: clock_nanosleep errno Handling on PPC, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 16/22] linux-user: Detect fault in sched_rr_get_interval, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 22/22] linux-user: check return value of malloc(), riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 15/22] linux-user: Handle NULL sched_param argument to sched_*, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 21/22] linux-user: writev Partial Writes, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 13/22] linux-user: Conditionally Pass Attribute Pointer to mq_open(), riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 20/22] linux-user: Support target-to-host translation of mlockall argument, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 14/22] linux-user: Detect Negative Message Sizes in msgsnd System Call, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 11/22] linux-user: Properly Handle semun Structure In Cross-Endian Situations, riku . voipio, 2014/08/22
- [Qemu-devel] [PULL v3 17/22] linux-user: Move get_ppc64_abi,
riku . voipio <=
- Re: [Qemu-devel] [PULL v3 00/22] Linux-user updates, Peter Maydell, 2014/08/22