1 //===-- xray_trampoline_hexagon.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 hexagon-specific assembler for the trampolines.
13 //===----------------------------------------------------------------------===//
15 #include "../builtins/assembly.h"
16 #include "../sanitizer_common/sanitizer_asm.h"
25 .macro RESTORE_REGISTERS
33 .macro CALL_PATCHED_FUNC entry_type
34 // if (xray::XRayPatchedFunctionE != NULL)
35 // xray::XRayPatchedFunctionE(FuncType);
37 r8 = #ASM_SYMBOL(_ZN6__xray19XRayPatchedFunctionE)
39 // The patched sled puts the function type
40 // into r6. Move it into r0 to pass it to
41 // the patched function.
49 .globl ASM_SYMBOL(__xray_FunctionEntry)
50 ASM_HIDDEN(__xray_FunctionEntry)
51 ASM_TYPE_FUNCTION(__xray_FunctionEntry)
52 # LLVM-MCA-BEGIN __xray_FunctionEntry
53 ASM_SYMBOL(__xray_FunctionEntry):
57 CALL_PATCHED_FUNC #0 // XRayEntryType::ENTRY
62 ASM_SIZE(__xray_FunctionEntry)
66 .globl ASM_SYMBOL(__xray_FunctionExit)
67 ASM_HIDDEN(__xray_FunctionExit)
68 ASM_TYPE_FUNCTION(__xray_FunctionExit)
69 # LLVM-MCA-BEGIN __xray_FunctionExit
70 ASM_SYMBOL(__xray_FunctionExit):
74 CALL_PATCHED_FUNC #1 // XRayEntryType::EXIT
80 ASM_SIZE(__xray_FunctionExit)
84 .globl ASM_SYMBOL(__xray_FunctionTailExit)
85 ASM_HIDDEN(__xray_FunctionTailExit)
86 ASM_TYPE_FUNCTION(__xray_FunctionTailExit)
87 # LLVM-MCA-BEGIN __xray_FunctionTailExit
88 ASM_SYMBOL(__xray_FunctionTailExit):
92 CALL_PATCHED_FUNC #2 // XRayEntryType::TAIL
98 ASM_SIZE(__xray_FunctionTailExit)