diff options
| author | Tom Musta | 2014-08-13 21:04:44 +0200 |
|---|---|---|
| committer | Riku Voipio | 2014-08-22 14:06:35 +0200 |
| commit | 67d6d829cdc4e76f64162e6ba8861ee527987bd5 (patch) | |
| tree | 11a5492cafbf4497c21f012a5baf1253f9704e37 /linux-user/ppc | |
| parent | linux-user: Detect fault in sched_rr_get_interval (diff) | |
| download | qemu-67d6d829cdc4e76f64162e6ba8861ee527987bd5.tar.gz qemu-67d6d829cdc4e76f64162e6ba8861ee527987bd5.tar.xz qemu-67d6d829cdc4e76f64162e6ba8861ee527987bd5.zip | |
linux-user: Move get_ppc64_abi
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>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/ppc')
| -rw-r--r-- | linux-user/ppc/target_cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-user/ppc/target_cpu.h b/linux-user/ppc/target_cpu.h index 9cc0c3ba9c..26f4ba297f 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 |
