1 //===-- xray_trampoline_mips.s ----------------------------------*- ASM -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of XRay, a dynamic runtime instrumentation system.
11 // This implements the MIPS-specific assembler for the trampolines.
13 //===----------------------------------------------------------------------===//
16 .file "xray_trampoline_mips.S"
17 .globl __xray_FunctionEntry
19 .type __xray_FunctionEntry,@function
25 // Save argument registers before doing any actual work
26 .cfi_def_cfa_offset 36
37 la $t9, _ZN6__xray19XRayPatchedFunctionE
40 beqz $t9, FunctionEntry_restore
42 // a1=0 means that we are tracing an entry event
44 // Function ID is in t0 (the first parameter).
48 FunctionEntry_restore:
49 // Restore argument registers
60 .size __xray_FunctionEntry, FunctionEntry_end-__xray_FunctionEntry
64 .globl __xray_FunctionExit
66 .type __xray_FunctionExit,@function
72 // Save return registers before doing any actual work.
73 .cfi_def_cfa_offset 36
84 la $t9, _ZN6__xray19XRayPatchedFunctionE
87 beqz $t9, FunctionExit_restore
89 // a1=1 means that we are tracing an exit event
91 // Function ID is in t0 (the first parameter).
96 // Restore return registers
108 .size __xray_FunctionExit, FunctionExit_end-__xray_FunctionExit