Commit 01b0e07e authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: Simplify logic in include/uapi/asm/elf.h

Simplify things by putting all the 32bit and 64bit defines
together instead of in two spots.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 23c6bd2a
...@@ -107,6 +107,11 @@ typedef elf_gregset_t32 compat_elf_gregset_t; ...@@ -107,6 +107,11 @@ typedef elf_gregset_t32 compat_elf_gregset_t;
# define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */
# define ELF_NVSRHALFREG 32 /* Half the vsx registers */ # define ELF_NVSRHALFREG 32 /* Half the vsx registers */
# define ELF_GREG_TYPE elf_greg_t64 # define ELF_GREG_TYPE elf_greg_t64
# define ELF_ARCH EM_PPC64
# define ELF_CLASS ELFCLASS64
# define ELF_DATA ELFDATA2MSB
typedef elf_greg_t64 elf_greg_t;
typedef elf_gregset_t64 elf_gregset_t;
#else #else
# define ELF_NEVRREG 34 /* includes acc (as 2) */ # define ELF_NEVRREG 34 /* includes acc (as 2) */
# define ELF_NVRREG 33 /* includes vscr */ # define ELF_NVRREG 33 /* includes vscr */
...@@ -114,20 +119,10 @@ typedef elf_gregset_t32 compat_elf_gregset_t; ...@@ -114,20 +119,10 @@ typedef elf_gregset_t32 compat_elf_gregset_t;
# define ELF_ARCH EM_PPC # define ELF_ARCH EM_PPC
# define ELF_CLASS ELFCLASS32 # define ELF_CLASS ELFCLASS32
# define ELF_DATA ELFDATA2MSB # define ELF_DATA ELFDATA2MSB
typedef elf_greg_t32 elf_greg_t;
typedef elf_gregset_t32 elf_gregset_t;
#endif /* __powerpc64__ */ #endif /* __powerpc64__ */
#ifndef ELF_ARCH
# define ELF_ARCH EM_PPC64
# define ELF_CLASS ELFCLASS64
# define ELF_DATA ELFDATA2MSB
typedef elf_greg_t64 elf_greg_t;
typedef elf_gregset_t64 elf_gregset_t;
#else
/* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */
typedef elf_greg_t32 elf_greg_t;
typedef elf_gregset_t32 elf_gregset_t;
#endif /* ELF_ARCH */
/* Floating point registers */ /* Floating point registers */
typedef double elf_fpreg_t; typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment