1 #include "sanitizer_common/sanitizer_asm.h"
5 ASM_HIDDEN(__tsan_setjmp)
6 .comm _ZN14__interception11real_setjmpE,8,8
7 .globl ASM_SYMBOL_INTERCEPTOR(setjmp)
8 ASM_TYPE_FUNCTION(ASM_SYMBOL_INTERCEPTOR(setjmp))
9 ASM_SYMBOL_INTERCEPTOR(setjmp):
12 // Save frame pointer and return address register
16 CFI_DEF_CFA_OFFSET (32)
20 // Adjust the SP for previous frame
22 CFI_DEF_CFA_REGISTER (22)
28 // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
31 // call tsan interceptor
32 bl ASM_SYMBOL(__tsan_setjmp)
34 // Restore env parameter
38 // Restore frame/link register
46 // tail jump to libc setjmp
47 la.local $a1, _ZN14__interception11real_setjmpE
52 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(setjmp))
54 .comm _ZN14__interception12real__setjmpE,8,8
55 .globl ASM_SYMBOL_INTERCEPTOR(_setjmp)
56 ASM_TYPE_FUNCTION(ASM_SYMBOL_INTERCEPTOR(_setjmp))
57 ASM_SYMBOL_INTERCEPTOR(_setjmp):
60 // Save frame pointer and return address register
64 CFI_DEF_CFA_OFFSET (32)
68 // Adjust the SP for previous frame
70 CFI_DEF_CFA_REGISTER (22)
76 // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
79 // call tsan interceptor
80 bl ASM_SYMBOL(__tsan_setjmp)
82 // Restore env parameter
86 // Restore frame/link register
94 // tail jump to libc setjmp
95 la.local $a1, _ZN14__interception12real__setjmpE
100 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(_setjmp))
102 .comm _ZN14__interception14real_sigsetjmpE,8,8
103 .globl ASM_SYMBOL_INTERCEPTOR(sigsetjmp)
104 ASM_TYPE_FUNCTION(ASM_SYMBOL_INTERCEPTOR(sigsetjmp))
105 ASM_SYMBOL_INTERCEPTOR(sigsetjmp):
108 // Save frame pointer and return address register
112 CFI_DEF_CFA_OFFSET (32)
116 // Adjust the SP for previous frame
118 CFI_DEF_CFA_REGISTER (22)
120 // Save env parameter
124 // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
127 // call tsan interceptor
128 bl ASM_SYMBOL(__tsan_setjmp)
130 // Restore env parameter
134 // Restore frame/link register
142 // tail jump to libc setjmp
143 la.local $a1, _ZN14__interception14real_sigsetjmpE
148 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(sigsetjmp))
150 .comm _ZN14__interception16real___sigsetjmpE,8,8
151 .globl ASM_SYMBOL_INTERCEPTOR(__sigsetjmp)
152 ASM_TYPE_FUNCTION(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp))
153 ASM_SYMBOL_INTERCEPTOR(__sigsetjmp):
156 // Save frame pointer and return address register
160 CFI_DEF_CFA_OFFSET (32)
164 // Adjust the SP for previous frame
166 CFI_DEF_CFA_REGISTER (22)
168 // Save env parameter
172 // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
175 // call tsan interceptor
176 bl ASM_SYMBOL(__tsan_setjmp)
178 // Restore env parameter
182 // Restore frame/link register
190 // tail jump to libc setjmp
191 la.local $a1, _ZN14__interception16real___sigsetjmpE
196 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp))