1 #include "sanitizer_common/sanitizer_asm.h"
4 #define R2_REL_OFFSET 16
5 #define R3_REL_OFFSET 24
6 #define R14_REL_OFFSET 112
7 #define R15_REL_OFFSET 120
12 ASM_HIDDEN(__tsan_setjmp)
14 .macro intercept symbol, real
16 .globl ASM_SYMBOL_INTERCEPTOR(\symbol)
17 ASM_TYPE_FUNCTION(ASM_SYMBOL_INTERCEPTOR(\symbol))
18 ASM_SYMBOL_INTERCEPTOR(\symbol):
20 stmg %r2, %r3, R2_REL_OFFSET(%r15)
21 CFI_REL_OFFSET(%r2, R2_REL_OFFSET)
22 CFI_REL_OFFSET(%r3, R3_REL_OFFSET)
23 stmg %r14, %r15, R14_REL_OFFSET(%r15)
24 CFI_REL_OFFSET(%r14, R14_REL_OFFSET)
25 CFI_REL_OFFSET(%r15, R15_REL_OFFSET)
26 aghi %r15, -FRAME_SIZE
27 CFI_ADJUST_CFA_OFFSET(FRAME_SIZE)
28 la %r2, FRAME_SIZE(%r15)
29 brasl %r14, ASM_SYMBOL(__tsan_setjmp)
30 lmg %r14, %r15, FRAME_SIZE + R14_REL_OFFSET(%r15)
33 CFI_DEF_CFA_OFFSET(CFA_OFFSET)
34 lmg %r2, %r3, R2_REL_OFFSET(%r15)
41 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(\symbol))
44 intercept setjmp, _ZN14__interception11real_setjmpE
45 intercept _setjmp, _ZN14__interception12real__setjmpE
46 intercept sigsetjmp, _ZN14__interception14real_sigsetjmpE
47 intercept __sigsetjmp, _ZN14__interception16real___sigsetjmpE
49 NO_EXEC_STACK_DIRECTIVE