diff options
| -rw-r--r-- | scripts/gcc-plugins/arm_ssp_per_task_plugin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/gcc-plugins/arm_ssp_per_task_plugin.c b/scripts/gcc-plugins/arm_ssp_per_task_plugin.c index de70b8470971..a65fbefb8501 100644 --- a/scripts/gcc-plugins/arm_ssp_per_task_plugin.c +++ b/scripts/gcc-plugins/arm_ssp_per_task_plugin.c | |||
| @@ -13,7 +13,7 @@ static unsigned int arm_pertask_ssp_rtl_execute(void) | |||
| 13 | for (insn = get_insns(); insn; insn = NEXT_INSN(insn)) { | 13 | for (insn = get_insns(); insn; insn = NEXT_INSN(insn)) { |
| 14 | const char *sym; | 14 | const char *sym; |
| 15 | rtx body; | 15 | rtx body; |
| 16 | rtx masked_sp; | 16 | rtx mask, masked_sp; |
| 17 | 17 | ||
| 18 | /* | 18 | /* |
| 19 | * Find a SET insn involving a SYMBOL_REF to __stack_chk_guard | 19 | * Find a SET insn involving a SYMBOL_REF to __stack_chk_guard |
| @@ -33,12 +33,13 @@ static unsigned int arm_pertask_ssp_rtl_execute(void) | |||
| 33 | * produces the address of the copy of the stack canary value | 33 | * produces the address of the copy of the stack canary value |
| 34 | * stored in struct thread_info | 34 | * stored in struct thread_info |
| 35 | */ | 35 | */ |
| 36 | mask = GEN_INT(sext_hwi(sp_mask, GET_MODE_PRECISION(Pmode))); | ||
| 36 | masked_sp = gen_reg_rtx(Pmode); | 37 | masked_sp = gen_reg_rtx(Pmode); |
| 37 | 38 | ||
| 38 | emit_insn_before(gen_rtx_SET(masked_sp, | 39 | emit_insn_before(gen_rtx_SET(masked_sp, |
| 39 | gen_rtx_AND(Pmode, | 40 | gen_rtx_AND(Pmode, |
| 40 | stack_pointer_rtx, | 41 | stack_pointer_rtx, |
| 41 | GEN_INT(sp_mask))), | 42 | mask)), |
| 42 | insn); | 43 | insn); |
| 43 | 44 | ||
| 44 | SET_SRC(body) = gen_rtx_PLUS(Pmode, masked_sp, | 45 | SET_SRC(body) = gen_rtx_PLUS(Pmode, masked_sp, |
