+2019-02-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * asan.c (asan_emit_stack_protection): Use full-sized mask to align
+ the base address on 64-bit strict-alignment platforms.
+
2019-02-15 H.J. Lu <hongjiu.lu@intel.com>
- * config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced
- ')'.
+ * config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced ')'.
2019-02-15 Uroš Bizjak <ubizjak@gmail.com>
base_align_bias = ((asan_frame_size + alignb - 1)
& ~(alignb - HOST_WIDE_INT_1)) - asan_frame_size;
}
+
/* Align base if target is STRICT_ALIGNMENT. */
if (STRICT_ALIGNMENT)
- base = expand_binop (Pmode, and_optab, base,
- gen_int_mode (-((GET_MODE_ALIGNMENT (SImode)
- << ASAN_SHADOW_SHIFT)
- / BITS_PER_UNIT), Pmode), NULL_RTX,
- 1, OPTAB_DIRECT);
+ {
+ const HOST_WIDE_INT align
+ = (GET_MODE_ALIGNMENT (SImode) / BITS_PER_UNIT) << ASAN_SHADOW_SHIFT;
+ base = expand_binop (Pmode, and_optab, base, gen_int_mode (-align, Pmode),
+ NULL_RTX, 1, OPTAB_DIRECT);
+ }
if (use_after_return_class == -1 && pbase)
emit_move_insn (pbase, base);