aboutsummaryrefslogtreecommitdiff
path: root/arch/hexagon
diff options
context:
space:
mode:
authorRichard Kuo2013-04-09 17:06:08 -0500
committerRichard Kuo2013-04-30 19:40:29 -0500
commit426d29ccb2a8d44c18d3167327ee82b38287e7bf (patch)
treef09f3d8b4d9299f53e90ca91ed1319216815d64a /arch/hexagon
parent5c883b462aa5ecde3da6cabdca00f6abac22aa74 (diff)
Hexagon: add v4 CS regs to core copyout macro
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon')
-rw-r--r--arch/hexagon/include/asm/elf.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h
index f52d8ec9ccf2..e1b933a0e121 100644
--- a/arch/hexagon/include/asm/elf.h
+++ b/arch/hexagon/include/asm/elf.h
@@ -104,6 +104,16 @@ typedef unsigned long elf_fpregset_t;
* Bypass the whole "regsets" thing for now and use the define.
*/
+#if CONFIG_HEXAGON_ARCH_VERSION >= 4
+#define CS_COPYREGS(DEST,REGS) \
+do {\
+ DEST.cs0 = REGS->cs0;\
+ DEST.cs1 = REGS->cs1;\
+} while (0)
+#else
+#define CS_COPYREGS(DEST,REGS)
+#endif
+
#define ELF_CORE_COPY_REGS(DEST, REGS) \
do { \
DEST.r0 = REGS->r00; \
@@ -148,13 +158,12 @@ do { \
DEST.p3_0 = REGS->preds; \
DEST.gp = REGS->gp; \
DEST.ugp = REGS->ugp; \
- DEST.pc = pt_elr(REGS); \
+ CS_COPYREGS(DEST,REGS); \
+ DEST.pc = pt_elr(REGS); \
DEST.cause = pt_cause(REGS); \
DEST.badva = pt_badva(REGS); \
} while (0);
-
-
/*
* This is used to ensure we don't load something for the wrong architecture.
* Checks the machine and ABI type.