1 //===-- xray_trampoline_riscv64.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 riscv64-specific assembler for the trampolines.
13 //===----------------------------------------------------------------------===//
15 #include "../sanitizer_common/sanitizer_asm.h"
17 .macro SAVE_ARG_REGISTERS
18 // Push return registers to stack
20 CFI_DEF_CFA_OFFSET(144)
40 .macro SAVE_RET_REGISTERS
41 // Push return registers to stack
43 CFI_DEF_CFA_OFFSET(48)
51 .macro RESTORE_RET_REGISTERS
52 // Restore return registers
62 .macro RESTORE_ARG_REGISTERS
63 // Restore argument registers
85 .macro LOAD_XLEN, rd, src
89 #include "xray_trampoline_riscv_common.S"