master
h 44 lines 1.35 KB
Raw
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation, or (at your option) any
5 * later version. See the COPYING file in the top-level directory.
6 */
7
8 #ifndef SPARC_TARGET_ELF_H
9 #define SPARC_TARGET_ELF_H
10
11 #ifndef TARGET_SPARC64
12 # define ELF_CLASS ELFCLASS32
13 # define ELF_MACHINE EM_SPARC
14 #elif defined(TARGET_ABI32)
15 # define ELF_CLASS ELFCLASS32
16 # define ELF_MACHINE EM_SPARC32PLUS
17 # define elf_check_machine(x) ((x) == EM_SPARC32PLUS || (x) == EM_SPARC)
18 #else
19 # define ELF_CLASS ELFCLASS64
20 # define ELF_MACHINE EM_SPARCV9
21 #endif
22
23 #define HAVE_ELF_HWCAP 1
24 #define HAVE_ELF_CORE_DUMP 1
25
26 /*
27 * Matches the kernel's elf_gregset_t.
28 * sparc32/sparc32plus (ELF_NGREG = 38):
29 * psr, pc, npc, y, u_regs[16] (g0-g7, o0-o7),
30 * reg_window[16] (l0-l7, i0-i7), stack_check[2]
31 * sparc64 (ELF_NGREG = 36):
32 * u_regs[16] (g0-g7, o0-o7), reg_window[16] (l0-l7, i0-i7),
33 * tstate, tpc, tnpc, y
34 */
35 #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
36 # define TARGET_ELF_NGREG 36
37 #else
38 # define TARGET_ELF_NGREG 38
39 #endif
40 typedef struct target_elf_gregset_t {
41 abi_ulong regs[TARGET_ELF_NGREG];
42 } target_elf_gregset_t;
43
44 #endif