mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
2771231de0
Re-commit r366322 after some fixes TME is a future architecture technology, documented in https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools https://developer.arm.com/docs/ddi0601/a More about the future architectures: https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and TCANCEL and the target feature/arch extension "tme". It also implements TME builtin functions, defined in ACLE Q2 2019 (https://developer.arm.com/docs/101028/latest) Differential Revision: https://reviews.llvm.org/D64416 Patch by Javed Absar and Momchil Velikov llvm-svn: 367428
45 lines
1.1 KiB
LLVM
45 lines
1.1 KiB
LLVM
; RUN: llc %s -verify-machineinstrs -o - | FileCheck %s
|
|
|
|
target triple = "aarch64-unknown-unknown-eabi"
|
|
|
|
define i64 @test_tstart() #0 {
|
|
%r = tail call i64 @llvm.aarch64.tstart()
|
|
ret i64 %r
|
|
}
|
|
declare i64 @llvm.aarch64.tstart() #1
|
|
; CHECK-LABEL: test_tstart
|
|
; CHECK: tstart x
|
|
|
|
define i64 @test_ttest() #0 {
|
|
%r = tail call i64 @llvm.aarch64.ttest()
|
|
ret i64 %r
|
|
}
|
|
declare i64 @llvm.aarch64.ttest() #1
|
|
; CHECK-LABEL: test_ttest
|
|
; CHECK: ttest x
|
|
|
|
define void @test_tcommit() #0 {
|
|
tail call void @llvm.aarch64.tcommit()
|
|
ret void
|
|
}
|
|
declare void @llvm.aarch64.tcommit() #1
|
|
; CHECK-LABEL: test_tcommit
|
|
; CHECK: tcommit
|
|
|
|
define void @test_tcancel() #0 {
|
|
tail call void @llvm.aarch64.tcancel(i64 0) #1
|
|
tail call void @llvm.aarch64.tcancel(i64 1) #1
|
|
tail call void @llvm.aarch64.tcancel(i64 65534) #1
|
|
tail call void @llvm.aarch64.tcancel(i64 65535) #1
|
|
ret void
|
|
}
|
|
declare void @llvm.aarch64.tcancel(i64 immarg) #1
|
|
; CHECK-LABEL: test_tcancel
|
|
; CHECK: tcancel #0
|
|
; CHECK: tcancel #0x1
|
|
; CHECK: tcancel #0xfffe
|
|
; CHECK: tcancel #0xffff
|
|
|
|
attributes #0 = { "target-features"="+tme" }
|
|
attributes #1 = { nounwind }
|