qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tom Musta <tommusta@gmail.com>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Tom Musta <tommusta@gmail.com>, riku.voipio@linaro.org, agraf@suse.de
Subject: [Qemu-devel] [PATCH 6/7] linux-user: Move get_ppc64_abi
Date: Mon, 30 Jun 2014 08:13:41 -0500	[thread overview]
Message-ID: <1404134022-17946-7-git-send-email-tommusta@gmail.com> (raw)
In-Reply-To: <1404134022-17946-1-git-send-email-tommusta@gmail.com>

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 <tommusta@gmail.com>
---
 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
-- 
1.7.1

  parent reply	other threads:[~2014-06-30 13:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 13:13 [Qemu-devel] [PATCH 0/7] linux-user: Support for Signal Handlers on PPC64 Tom Musta
2014-06-30 13:13 ` [Qemu-devel] [PATCH 1/7] linux-user: Fix Stack Pointer Bug in PPC setup_rt_frame Tom Musta
2014-06-30 13:13 ` [Qemu-devel] [PATCH 2/7] linux-user: Split PPC Trampoline Encoding from Register Save Tom Musta
2014-06-30 13:13 ` [Qemu-devel] [PATCH 3/7] linux-user: Enable Signal Handlers on PPC64 Tom Musta
2014-06-30 13:13 ` [Qemu-devel] [PATCH 4/7] linux-user: Properly Dereference PPC64 ELFv1 Signal Handler Pointer Tom Musta
2014-06-30 13:13 ` [Qemu-devel] [PATCH 5/7] linux-user: Implement do_setcontext for PPC64 Tom Musta
2014-06-30 13:13 ` Tom Musta [this message]
2014-06-30 13:13 ` [Qemu-devel] [PATCH 7/7] linux-user: Handle PPC64 ELFv2 Function Pointers Tom Musta
2014-07-03 12:59 ` [Qemu-devel] [PATCH 0/7] linux-user: Support for Signal Handlers on PPC64 Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404134022-17946-7-git-send-email-tommusta@gmail.com \
    --to=tommusta@gmail.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=riku.voipio@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).