1 //===-- xray_trampoline_mips.s ----------------------------------*- ASM -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of XRay, a dynamic runtime instrumentation system.
12 // This implements the MIPS-specific assembler for the trampolines.
14 //===----------------------------------------------------------------------===//
17 .file "xray_trampoline_mips.S"
18 .globl __xray_FunctionEntry
20 .type __xray_FunctionEntry,@function
26 // Save argument registers before doing any actual work
27 .cfi_def_cfa_offset 36
38 la $t9, _ZN6__xray19XRayPatchedFunctionE
41 beqz $t9, FunctionEntry_restore
43 // a1=0 means that we are tracing an entry event
45 // Function ID is in t0 (the first parameter).
49 FunctionEntry_restore:
50 // Restore argument registers
61 .size __xray_FunctionEntry, FunctionEntry_end-__xray_FunctionEntry
65 .globl __xray_FunctionExit
67 .type __xray_FunctionExit,@function
73 // Save return registers before doing any actual work.
74 .cfi_def_cfa_offset 36
85 la $t9, _ZN6__xray19XRayPatchedFunctionE
88 beqz $t9, FunctionExit_restore
90 // a1=1 means that we are tracing an exit event
92 // Function ID is in t0 (the first parameter).
97 // Restore return registers
109 .size __xray_FunctionExit, FunctionExit_end-__xray_FunctionExit