aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/include/asm/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/hexagon/include/asm/elf.h')
-rw-r--r--arch/hexagon/include/asm/elf.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h
index 1f14e082588e..e1b933a0e121 100644
--- a/arch/hexagon/include/asm/elf.h
+++ b/arch/hexagon/include/asm/elf.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * ELF definitions for the Hexagon architecture 2 * ELF definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
@@ -104,6 +104,16 @@ typedef unsigned long elf_fpregset_t;
104 * Bypass the whole "regsets" thing for now and use the define. 104 * Bypass the whole "regsets" thing for now and use the define.
105 */ 105 */
106 106
107#if CONFIG_HEXAGON_ARCH_VERSION >= 4
108#define CS_COPYREGS(DEST,REGS) \
109do {\
110 DEST.cs0 = REGS->cs0;\
111 DEST.cs1 = REGS->cs1;\
112} while (0)
113#else
114#define CS_COPYREGS(DEST,REGS)
115#endif
116
107#define ELF_CORE_COPY_REGS(DEST, REGS) \ 117#define ELF_CORE_COPY_REGS(DEST, REGS) \
108do { \ 118do { \
109 DEST.r0 = REGS->r00; \ 119 DEST.r0 = REGS->r00; \
@@ -148,13 +158,12 @@ do { \
148 DEST.p3_0 = REGS->preds; \ 158 DEST.p3_0 = REGS->preds; \
149 DEST.gp = REGS->gp; \ 159 DEST.gp = REGS->gp; \
150 DEST.ugp = REGS->ugp; \ 160 DEST.ugp = REGS->ugp; \
151 DEST.pc = pt_elr(REGS); \ 161 CS_COPYREGS(DEST,REGS); \
162 DEST.pc = pt_elr(REGS); \
152 DEST.cause = pt_cause(REGS); \ 163 DEST.cause = pt_cause(REGS); \
153 DEST.badva = pt_badva(REGS); \ 164 DEST.badva = pt_badva(REGS); \
154} while (0); 165} while (0);
155 166
156
157
158/* 167/*
159 * This is used to ensure we don't load something for the wrong architecture. 168 * This is used to ensure we don't load something for the wrong architecture.
160 * Checks the machine and ABI type. 169 * Checks the machine and ABI type.
@@ -168,15 +177,15 @@ do { \
168#define ELF_DATA ELFDATA2LSB 177#define ELF_DATA ELFDATA2LSB
169#define ELF_ARCH EM_HEXAGON 178#define ELF_ARCH EM_HEXAGON
170 179
171#ifdef CONFIG_HEXAGON_ARCH_V2 180#if CONFIG_HEXAGON_ARCH_VERSION == 2
172#define ELF_CORE_EFLAGS 0x1 181#define ELF_CORE_EFLAGS 0x1
173#endif 182#endif
174 183
175#ifdef CONFIG_HEXAGON_ARCH_V3 184#if CONFIG_HEXAGON_ARCH_VERSION == 3
176#define ELF_CORE_EFLAGS 0x2 185#define ELF_CORE_EFLAGS 0x2
177#endif 186#endif
178 187
179#ifdef CONFIG_HEXAGON_ARCH_V4 188#if CONFIG_HEXAGON_ARCH_VERSION == 4
180#define ELF_CORE_EFLAGS 0x3 189#define ELF_CORE_EFLAGS 0x3
181#endif 190#endif
182 191