5 .global _ZN6__xray19XRayPatchedFunctionE
6 @ Word-aligned function entry point
8 @ Let C/C++ see the symbol
9 .global __xray_FunctionEntry
10 @ It preserves all registers except r0, r12(ip), r14(lr) and r15(pc)
11 @ Assume that "q" part of the floating-point registers is not used
12 @ for passing parameters to C/C++ functions.
13 .type __xray_FunctionEntry, %function
14 @ In C++ it is void extern "C" __xray_FunctionEntry(uint32_t FuncId) with
15 @ FuncId passed in r0 register.
18 @ Save floating-point parameters of the instrumented function
20 MOVW r1,#:lower16:_ZN6__xray19XRayPatchedFunctionE
21 MOVT r1,#:upper16:_ZN6__xray19XRayPatchedFunctionE
23 @ Handler address is nullptr if handler is not set
25 BEQ FunctionEntry_restore
26 @ Function ID is already in r0 (the first parameter).
27 @ r1=0 means that we are tracing an entry event
29 @ Call the handler with 2 parameters in r0 and r1
31 FunctionEntry_restore:
32 @ Restore floating-point parameters of the instrumented function
36 @ Word-aligned function entry point
38 @ Let C/C++ see the symbol
39 .global __xray_FunctionExit
40 @ Assume that d1-d7 are not used for the return value.
41 @ Assume that "q" part of the floating-point registers is not used for the
42 @ return value in C/C++.
43 .type __xray_FunctionExit, %function
44 @ In C++ it is extern "C" void __xray_FunctionExit(uint32_t FuncId) with
45 @ FuncId passed in r0 register.
48 @ Save the floating-point return value of the instrumented function
50 @ Load the handler address
51 MOVW r1,#:lower16:_ZN6__xray19XRayPatchedFunctionE
52 MOVT r1,#:upper16:_ZN6__xray19XRayPatchedFunctionE
54 @ Handler address is nullptr if handler is not set
56 BEQ FunctionExit_restore
57 @ Function ID is already in r0 (the first parameter).
58 @ 1 means that we are tracing an exit event
60 @ Call the handler with 2 parameters in r0 and r1
63 @ Restore the floating-point return value of the instrumented function