diff options
| -rw-r--r-- | arch/hexagon/include/asm/elf.h | 15 |
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; | |||
| 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) \ | ||
| 109 | do {\ | ||
| 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) \ |
| 108 | do { \ | 118 | do { \ |
| 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. |
