Files
TheRock/compiler/amd-llvm/compiler-rt/lib/xray/xray_trampoline_mips.S
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

110 lines
2.7 KiB
ArmAsm

//===-- xray_trampoline_mips.s ----------------------------------*- ASM -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of XRay, a dynamic runtime instrumentation system.
//
// This implements the MIPS-specific assembler for the trampolines.
//
//===----------------------------------------------------------------------===//
.text
.file "xray_trampoline_mips.S"
.globl __xray_FunctionEntry
.p2align 2
.type __xray_FunctionEntry,@function
__xray_FunctionEntry:
.cfi_startproc
.set noreorder
.cpload $t9
.set reorder
// Save argument registers before doing any actual work
.cfi_def_cfa_offset 36
addiu $sp, $sp, -36
sw $ra, 32($sp)
.cfi_offset 31, -4
sw $a3, 28($sp)
sw $a2, 24($sp)
sw $a1, 20($sp)
sw $a0, 16($sp)
sdc1 $f14, 8($sp)
sdc1 $f12, 0($sp)
la $t9, _ZN6__xray19XRayPatchedFunctionE
lw $t9, 0($t9)
beqz $t9, FunctionEntry_restore
// a1=0 means that we are tracing an entry event
move $a1, $zero
// Function ID is in t0 (the first parameter).
move $a0, $t0
jalr $t9
FunctionEntry_restore:
// Restore argument registers
ldc1 $f12, 0($sp)
ldc1 $f14, 8($sp)
lw $a0, 16($sp)
lw $a1, 20($sp)
lw $a2, 24($sp)
lw $a3, 28($sp)
lw $ra, 32($sp)
addiu $sp, $sp, 36
jr $ra
FunctionEntry_end:
.size __xray_FunctionEntry, FunctionEntry_end-__xray_FunctionEntry
.cfi_endproc
.text
.globl __xray_FunctionExit
.p2align 2
.type __xray_FunctionExit,@function
__xray_FunctionExit:
.cfi_startproc
.set noreorder
.cpload $t9
.set reorder
// Save return registers before doing any actual work.
.cfi_def_cfa_offset 36
addiu $sp, $sp, -36
sw $ra, 32($sp)
.cfi_offset 31, -4
sw $a1, 28($sp)
sw $a0, 24($sp)
sw $v1, 20($sp)
sw $v0, 16($sp)
sdc1 $f2, 8($sp)
sdc1 $f0, 0($sp)
la $t9, _ZN6__xray19XRayPatchedFunctionE
lw $t9, 0($t9)
beqz $t9, FunctionExit_restore
// a1=1 means that we are tracing an exit event
li $a1, 1
// Function ID is in t0 (the first parameter).
move $a0, $t0
jalr $t9
FunctionExit_restore:
// Restore return registers
ldc1 $f0, 0($sp)
ldc1 $f2, 8($sp)
lw $v0, 16($sp)
lw $v1, 20($sp)
lw $a0, 24($sp)
lw $a1, 28($sp)
lw $ra, 32($sp)
addiu $sp, $sp, 36
jr $ra
FunctionExit_end:
.size __xray_FunctionExit, FunctionExit_end-__xray_FunctionExit
.cfi_endproc