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
123 lines
3.9 KiB
LLVM
123 lines
3.9 KiB
LLVM
; RUN: llc -mtriple arm64e-apple-darwin -mattr=+bti -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=DARWIN,CHECK
|
|
; RUN: llc -mtriple arm64e-apple-darwin -mattr=+bti -global-isel -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=DARWIN,CHECK
|
|
; RUN: llc -mtriple arm64e-apple-darwin -mattr=+bti -fast-isel -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=DARWIN,CHECK
|
|
; RUN: llc -mtriple aarch64-linux-gnu -mattr=+bti -mattr=+pauth -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=ELF,CHECK
|
|
; RUN: llc -mtriple aarch64-linux-gnu -mattr=+bti -mattr=+pauth -global-isel -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=ELF,CHECK
|
|
; RUN: llc -mtriple aarch64-linux-gnu -mattr=+bti -mattr=+pauth -fast-isel -asm-verbose=false \
|
|
; RUN: -o - %s | FileCheck %s --check-prefixes=ELF,CHECK
|
|
|
|
; ptrauth tail-calls can only use x16/x17 with BTI.
|
|
|
|
; CHECK-LABEL: test_tailcall_ia_0:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: braaz x16
|
|
define i32 @test_tailcall_ia_0(ptr %arg0) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 0, i64 0) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ib_0:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: brabz x16
|
|
define i32 @test_tailcall_ib_0(ptr %arg0) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 1, i64 0) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ia_imm:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: mov x17, #42
|
|
; CHECK-NEXT: braa x16, x17
|
|
define i32 @test_tailcall_ia_imm(ptr %arg0) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 0, i64 42) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ib_imm:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: mov x17, #42
|
|
; CHECK-NEXT: brab x16, x17
|
|
define i32 @test_tailcall_ib_imm(ptr %arg0) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 1, i64 42) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ia_var:
|
|
; DARWIN-NEXT: bti c
|
|
; DARWIN-NEXT: mov x16, x0
|
|
; DARWIN-NEXT: ldr x0, [x1]
|
|
; DARWIN-NEXT: braa x16, x0
|
|
; ELF-NEXT: bti c
|
|
; ELF-NEXT: ldr x1, [x1]
|
|
; ELF-NEXT: mov x16, x0
|
|
; ELF-NEXT: braa x16, x1
|
|
define i32 @test_tailcall_ia_var(ptr %arg0, ptr %arg1) #0 {
|
|
%tmp0 = load i64, ptr %arg1
|
|
%tmp1 = tail call i32 %arg0() [ "ptrauth"(i32 0, i64 %tmp0) ]
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ib_var:
|
|
; DARWIN-NEXT: bti c
|
|
; DARWIN-NEXT: mov x16, x0
|
|
; DARWIN-NEXT: ldr x0, [x1]
|
|
; DARWIN-NEXT: brab x16, x0
|
|
; ELF-NEXT: bti c
|
|
; ELF-NEXT: ldr x1, [x1]
|
|
; ELF-NEXT: mov x16, x0
|
|
; ELF-NEXT: brab x16, x1
|
|
define i32 @test_tailcall_ib_var(ptr %arg0, ptr %arg1) #0 {
|
|
%tmp0 = load i64, ptr %arg1
|
|
%tmp1 = tail call i32 %arg0() [ "ptrauth"(i32 1, i64 %tmp0) ]
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ia_arg:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: braa x16, x1
|
|
define i32 @test_tailcall_ia_arg(ptr %arg0, i64 %arg1) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 0, i64 %arg1) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ib_arg:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: mov x16, x0
|
|
; CHECK-NEXT: brab x16, x1
|
|
define i32 @test_tailcall_ib_arg(ptr %arg0, i64 %arg1) #0 {
|
|
%tmp0 = tail call i32 %arg0() [ "ptrauth"(i32 1, i64 %arg1) ]
|
|
ret i32 %tmp0
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ia_arg_ind:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: ldr x16, [x0]
|
|
; CHECK-NEXT: braa x16, x1
|
|
define i32 @test_tailcall_ia_arg_ind(ptr %arg0, i64 %arg1) #0 {
|
|
%tmp0 = load ptr, ptr %arg0
|
|
%tmp1 = tail call i32 %tmp0() [ "ptrauth"(i32 0, i64 %arg1) ]
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
; CHECK-LABEL: test_tailcall_ib_arg_ind:
|
|
; CHECK-NEXT: bti c
|
|
; CHECK-NEXT: ldr x16, [x0]
|
|
; CHECK-NEXT: brab x16, x1
|
|
define i32 @test_tailcall_ib_arg_ind(ptr %arg0, i64 %arg1) #0 {
|
|
%tmp0 = load ptr, ptr %arg0
|
|
%tmp1 = tail call i32 %tmp0() [ "ptrauth"(i32 1, i64 %arg1) ]
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
attributes #0 = { nounwind "branch-target-enforcement"="true" }
|