Skip to content

Commit

Permalink
Hexagon: add v4 CS regs to core copyout macro
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
  • Loading branch information
Richard Kuo committed May 1, 2013
1 parent 5c883b4 commit 426d29c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions arch/hexagon/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 426d29c

Please sign in to comment.