Summary:
This change saves and restores the full flags register in x86_64 mode.
This makes running instrumented signal handlers safer, and avoids flags
set during the execution of the event handlers from polluting the
instrumented call's flags state.
Reviewers: kpw, eizan, jfb
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D51277
llvm-svn: 340812
.macro SAVE_REGISTERS
+ pushfq
subq $240, %rsp
CFI_DEF_CFA_OFFSET(248)
movq %rbp, 232(%rsp)
movq 8(%rsp), %r14
movq 0(%rsp), %r15
addq $240, %rsp
+ popfq
CFI_DEF_CFA_OFFSET(8)
.endm