aboutsummaryrefslogtreecommitdiff
path: root/libitm/libitm_i.h
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2019-06-03 13:55:15 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2019-06-03 13:55:15 +0000
commit511ed59d0b0404577b7fec9b4fcaeb6a8f0c0d34 (patch)
tree2518077c50198015ff9073805bf48a9eb1f535d1 /libitm/libitm_i.h
parentb07fc91cc47769f1fdabf31a3c8f942caf49d873 (diff)
downloadgcc-511ed59d0b0404577b7fec9b4fcaeb6a8f0c0d34.zip
gcc-511ed59d0b0404577b7fec9b4fcaeb6a8f0c0d34.tar.gz
gcc-511ed59d0b0404577b7fec9b4fcaeb6a8f0c0d34.tar.bz2
Fix PR64242 - Longjmp expansion incorrect
Improve the fix for PR64242. Various optimizations can change a memory reference into a frame access. Given there are multiple virtual frame pointers which may be replaced by multiple hard frame pointers, there are no checks for writes to the various frame pointers. So updates to a frame pointer tends to generate incorrect code. Improve the previous fix to also add clobbers of several frame pointers and add a scheduling barrier. This should work in most cases until GCC supports a generic "don't optimize across this instruction" feature. Bootstrap OK. Testcase passes on AArch64 and x86-64. Inspected x86, Arm, Thumb-1 and Thumb-2 assembler which looks correct. gcc/ PR middle-end/64242 * builtins.c (expand_builtin_longjmp): Add frame clobbers and schedule block. (expand_builtin_nonlocal_goto): Likewise. testsuite/ PR middle-end/64242 * gcc.c-torture/execute/pr64242.c: Update test. From-SVN: r271870
Diffstat (limited to 'libitm/libitm_i.h')
0 files changed, 0 insertions, 0 deletions