forked from OSchip/llvm-project
[XRay][compiler-rt] Stash flags as well in x86_64 trampoline
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
This commit is contained in:
parent
6a5c01c7e9
commit
bb6aa92c31
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
.macro SAVE_REGISTERS
|
||||
pushfq
|
||||
subq $240, %rsp
|
||||
CFI_DEF_CFA_OFFSET(248)
|
||||
movq %rbp, 232(%rsp)
|
||||
|
@ -69,6 +70,7 @@
|
|||
movq 8(%rsp), %r14
|
||||
movq 0(%rsp), %r15
|
||||
addq $240, %rsp
|
||||
popfq
|
||||
CFI_DEF_CFA_OFFSET(8)
|
||||
.endm
|
||||
|
||||
|
|
Loading…
Reference in New Issue