aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2025-01-12 16:48:53 +0000
committerMaciej W. Rozycki <macro@orcam.me.uk>2025-01-12 16:48:53 +0000
commit46861167f548ec622918d95acd2424b64f56797d (patch)
treea7f5a87e76d9002873bdcb69755fe6fd19ea26de /gcc
parent40754a3b9bef83bf4da0675fcb378e8cd1675602 (diff)
downloadgcc-46861167f548ec622918d95acd2424b64f56797d.zip
gcc-46861167f548ec622918d95acd2424b64f56797d.tar.gz
gcc-46861167f548ec622918d95acd2424b64f56797d.tar.bz2
Alpha: Add memory clobbers to `builtin_longjmp' expansion
Add the same memory clobbers to `builtin_longjmp' for Alpha as with commit 41439bf6a647 ("builtins.c (expand_builtin_longjmp): Added two memory clobbers."), to prevent instructions that access memory via the frame or stack pointer from being moved across the write to the frame pointer. gcc/ * config/alpha/alpha.md (builtin_longjmp): Add memory clobbers.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/alpha/alpha.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 376c4cb..35c8030 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -5005,6 +5005,8 @@
rtx pv = gen_rtx_REG (Pmode, 27);
/* This bit is the same as expand_builtin_longjmp. */
+ emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
+ emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));
emit_move_insn (hard_frame_pointer_rtx, fp);
emit_move_insn (pv, lab);
emit_stack_restore (SAVE_NONLOCAL, stack);