Skip to content

Commit 72630e8

Browse files
committed
[AArch64] Remove FEAT_TME assembly and ACLE support
The Transactional Memory Extension (TME) was introduced as part of Armv9-A but has not been adopted by the ecosystem. This mirrors what Arm has observed with similar extensions in other architectures. Therefore, remove FEAT_TME assembly and ACLE code from llvm, because support for TME has now been officially withdrawn, as noted here: ``` FEAT_TME is withdrawn from all future versions of Arm® Architecture Reference Manual for A-profile architecture. ``` referenced in Known Issue D24093, documented here: https://developer.arm.com/documentation/102105/lb-05/
1 parent 07cd105 commit 72630e8

File tree

21 files changed

+4
-311
lines changed

21 files changed

+4
-311
lines changed

clang/include/clang/Basic/BuiltinsAArch64.def

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,6 @@ BUILTIN(__builtin_arm_wsrp, "vcC*vC*", "nc")
109109
// Misc
110110
BUILTIN(__builtin_sponentry, "v*", "c")
111111

112-
// Transactional Memory Extension
113-
BUILTIN(__builtin_arm_tstart, "WUi", "nj")
114-
BUILTIN(__builtin_arm_tcommit, "v", "n")
115-
BUILTIN(__builtin_arm_tcancel, "vWUIi", "n")
116-
BUILTIN(__builtin_arm_ttest, "WUi", "nc")
117-
118112
// Armv8.5-A FP rounding intrinsics
119113
TARGET_BUILTIN(__builtin_arm_rint32zf, "ff", "", "v8.5a")
120114
TARGET_BUILTIN(__builtin_arm_rint32z, "dd", "", "v8.5a")

clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,6 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
606606
if (HasMTE)
607607
Builder.defineMacro("__ARM_FEATURE_MEMORY_TAGGING", "1");
608608

609-
if (HasTME)
610-
Builder.defineMacro("__ARM_FEATURE_TME", "1");
611-
612609
if (HasMatMul)
613610
Builder.defineMacro("__ARM_FEATURE_MATMUL_INT8", "1");
614611

@@ -1173,8 +1170,6 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
11731170
}
11741171
if (Feature == "+mte")
11751172
HasMTE = true;
1176-
if (Feature == "+tme")
1177-
HasTME = true;
11781173
if (Feature == "+pauth")
11791174
HasPAuth = true;
11801175
if (Feature == "+i8mm")

clang/lib/Basic/Targets/AArch64.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo {
7575
bool HasDotProd = false;
7676
bool HasFP16FML = false;
7777
bool HasMTE = false;
78-
bool HasTME = false;
7978
bool HasPAuth = false;
8079
bool HasLS64 = false;
8180
bool HasRandGen = false;

clang/lib/Headers/arm_acle.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -821,28 +821,6 @@ __arm_st64bv0(void *__addr, data512_t __value) {
821821

822822
#endif // __ARM_FEATURE_COPROC
823823

824-
/* 17 Transactional Memory Extension (TME) Intrinsics */
825-
#if defined(__ARM_FEATURE_TME) && __ARM_FEATURE_TME
826-
827-
#define _TMFAILURE_REASON 0x00007fffu
828-
#define _TMFAILURE_RTRY 0x00008000u
829-
#define _TMFAILURE_CNCL 0x00010000u
830-
#define _TMFAILURE_MEM 0x00020000u
831-
#define _TMFAILURE_IMP 0x00040000u
832-
#define _TMFAILURE_ERR 0x00080000u
833-
#define _TMFAILURE_SIZE 0x00100000u
834-
#define _TMFAILURE_NEST 0x00200000u
835-
#define _TMFAILURE_DBG 0x00400000u
836-
#define _TMFAILURE_INT 0x00800000u
837-
#define _TMFAILURE_TRIVIAL 0x01000000u
838-
839-
#define __tstart() __builtin_arm_tstart()
840-
#define __tcommit() __builtin_arm_tcommit()
841-
#define __tcancel(__arg) __builtin_arm_tcancel(__arg)
842-
#define __ttest() __builtin_arm_ttest()
843-
844-
#endif /* __ARM_FEATURE_TME */
845-
846824
/* 8.7 Armv8.5-A Random number generation intrinsics */
847825
#if defined(__ARM_64BIT_STATE) && __ARM_64BIT_STATE
848826
static __inline__ int __attribute__((__always_inline__, __nodebug__, target("rand")))

clang/lib/Sema/SemaARM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,6 @@ bool SemaARM::CheckAArch64BuiltinFunctionCall(const TargetInfo &TI,
11831183
l = 0;
11841184
u = 15;
11851185
break;
1186-
case AArch64::BI__builtin_arm_tcancel: l = 0; u = 65535; break;
11871186
}
11881187

11891188
return SemaRef.BuiltinConstantArgRange(TheCall, i, l, u + l);

clang/test/CodeGen/AArch64/tme.cpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

clang/test/Driver/print-supported-extensions-aarch64.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,4 @@
115115
// CHECK-NEXT: the FEAT_THE Enable Armv8.9-A Translation Hardening Extension
116116
// CHECK-NEXT: tlbid FEAT_TLBID Enable Armv9.7-A TLBI Domains extension
117117
// CHECK-NEXT: tlbiw FEAT_TLBIW Enable Armv9.5-A TLBI VMALL for Dirty State
118-
// CHECK-NEXT: tme FEAT_TME Enable Transactional Memory Extension
119118
// CHECK-NEXT: wfxt FEAT_WFxT Enable Armv8.7-A WFET and WFIT instruction

clang/test/Sema/aarch64-tme-errors.c

Lines changed: 0 additions & 8 deletions
This file was deleted.

clang/test/Sema/aarch64-tme-tcancel-errors.c

Lines changed: 0 additions & 9 deletions
This file was deleted.

llvm/docs/ReleaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Changes to the AArch64 Backend
104104
* Assembler/disassembler support has been added for Armv9.7-A (2025)
105105
architecture extensions.
106106

107+
* `FEAT_TME` support has been removed, as it has been withdrawn from
108+
all future versions of the A-profile architecture.
109+
107110
Changes to the AMDGPU Backend
108111
-----------------------------
109112

0 commit comments

Comments
 (0)