Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions clang/include/clang/Basic/BuiltinsAArch64.def
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ BUILTIN(__builtin_arm_wsrp, "vcC*vC*", "nc")
// Misc
BUILTIN(__builtin_sponentry, "v*", "c")

// Transactional Memory Extension
BUILTIN(__builtin_arm_tstart, "WUi", "nj")
BUILTIN(__builtin_arm_tcommit, "v", "n")
BUILTIN(__builtin_arm_tcancel, "vWUIi", "n")
BUILTIN(__builtin_arm_ttest, "WUi", "nc")

// Armv8.5-A FP rounding intrinsics
TARGET_BUILTIN(__builtin_arm_rint32zf, "ff", "", "v8.5a")
TARGET_BUILTIN(__builtin_arm_rint32z, "dd", "", "v8.5a")
Expand Down
5 changes: 0 additions & 5 deletions clang/lib/Basic/Targets/AArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,6 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
if (HasMTE)
Builder.defineMacro("__ARM_FEATURE_MEMORY_TAGGING", "1");

if (HasTME)
Builder.defineMacro("__ARM_FEATURE_TME", "1");

if (HasMatMul)
Builder.defineMacro("__ARM_FEATURE_MATMUL_INT8", "1");

Expand Down Expand Up @@ -1173,8 +1170,6 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
}
if (Feature == "+mte")
HasMTE = true;
if (Feature == "+tme")
HasTME = true;
if (Feature == "+pauth")
HasPAuth = true;
if (Feature == "+i8mm")
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Basic/Targets/AArch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo {
bool HasDotProd = false;
bool HasFP16FML = false;
bool HasMTE = false;
bool HasTME = false;
bool HasPAuth = false;
bool HasLS64 = false;
bool HasRandGen = false;
Expand Down
22 changes: 0 additions & 22 deletions clang/lib/Headers/arm_acle.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,28 +821,6 @@ __arm_st64bv0(void *__addr, data512_t __value) {

#endif // __ARM_FEATURE_COPROC

/* 17 Transactional Memory Extension (TME) Intrinsics */
#if defined(__ARM_FEATURE_TME) && __ARM_FEATURE_TME

#define _TMFAILURE_REASON 0x00007fffu
#define _TMFAILURE_RTRY 0x00008000u
#define _TMFAILURE_CNCL 0x00010000u
#define _TMFAILURE_MEM 0x00020000u
#define _TMFAILURE_IMP 0x00040000u
#define _TMFAILURE_ERR 0x00080000u
#define _TMFAILURE_SIZE 0x00100000u
#define _TMFAILURE_NEST 0x00200000u
#define _TMFAILURE_DBG 0x00400000u
#define _TMFAILURE_INT 0x00800000u
#define _TMFAILURE_TRIVIAL 0x01000000u

#define __tstart() __builtin_arm_tstart()
#define __tcommit() __builtin_arm_tcommit()
#define __tcancel(__arg) __builtin_arm_tcancel(__arg)
#define __ttest() __builtin_arm_ttest()

#endif /* __ARM_FEATURE_TME */

/* 8.7 Armv8.5-A Random number generation intrinsics */
#if defined(__ARM_64BIT_STATE) && __ARM_64BIT_STATE
static __inline__ int __attribute__((__always_inline__, __nodebug__, target("rand")))
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Sema/SemaARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,6 @@ bool SemaARM::CheckAArch64BuiltinFunctionCall(const TargetInfo &TI,
l = 0;
u = 15;
break;
case AArch64::BI__builtin_arm_tcancel: l = 0; u = 65535; break;
}

return SemaRef.BuiltinConstantArgRange(TheCall, i, l, u + l);
Expand Down
42 changes: 0 additions & 42 deletions clang/test/CodeGen/AArch64/tme.cpp

This file was deleted.

1 change: 0 additions & 1 deletion clang/test/Driver/print-supported-extensions-aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,4 @@
// CHECK-NEXT: the FEAT_THE Enable Armv8.9-A Translation Hardening Extension
// CHECK-NEXT: tlbid FEAT_TLBID Enable Armv9.7-A TLBI Domains extension
// CHECK-NEXT: tlbiw FEAT_TLBIW Enable Armv9.5-A TLBI VMALL for Dirty State
// CHECK-NEXT: tme FEAT_TME Enable Transactional Memory Extension
// CHECK-NEXT: wfxt FEAT_WFxT Enable Armv8.7-A WFET and WFIT instruction
8 changes: 0 additions & 8 deletions clang/test/Sema/aarch64-tme-errors.c

This file was deleted.

9 changes: 0 additions & 9 deletions clang/test/Sema/aarch64-tme-tcancel-errors.c

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ fn:
sm4e z0.s, z0.s, z0.s // AEK_SVE2SM4
addqv v0.8h, p0, z0.h // AEK_SVE2P1 / AEK_SME2P1
rcwswp x0, x1, [x2] // AEK_THE
tcommit // AEK_TME
lbl:
.fn_end:
.size fn, .fn_end-fn
Expand All @@ -81,7 +80,7 @@ lbl:
# CHECK-NEXT: fcvt d0, s0
# CHECK-NEXT: fabs h1, h2
# CHECK-NEXT: fmlal v0.2s, v1.2h, v2.2h
# CHECK-NEXT: bc.eq 0xc8
# CHECK-NEXT: bc.eq 0xc4
# CHECK-NEXT: smmla v1.4s, v16.16b, v31.16b
# CHECK-NEXT: ld64b x0, [x13]
# CHECK-NEXT: ldaddab w0, w0, [sp]
Expand Down Expand Up @@ -116,4 +115,3 @@ lbl:
# CHECK-NEXT: sm4e z0.s, z0.s, z0.s
# CHECK-NEXT: addqv v0.8h, p0, z0.h
# CHECK-NEXT: rcwswp x0, x1, [x2]
# CHECK-NEXT: tcommit
3 changes: 3 additions & 0 deletions llvm/docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ Changes to the AArch64 Backend
Extension (vMTE)' and 'Permission Overlay Extension version 2 (POE2)'
Future Architecture Technologies extensions.

* `FEAT_TME` support has been removed, as it has been withdrawn from
all future versions of the A-profile architecture.

Changes to the AMDGPU Backend
-----------------------------

Expand Down
13 changes: 0 additions & 13 deletions llvm/include/llvm/IR/IntrinsicsAArch64.td
Original file line number Diff line number Diff line change
Expand Up @@ -943,20 +943,7 @@ let TargetPrefix = "aarch64" in {
[IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>]>;
}

// Transactional Memory Extension (TME) Intrinsics
let TargetPrefix = "aarch64" in {
def int_aarch64_tstart : ClangBuiltin<"__builtin_arm_tstart">,
Intrinsic<[llvm_i64_ty], [], [IntrWillReturn]>;

def int_aarch64_tcommit : ClangBuiltin<"__builtin_arm_tcommit">, Intrinsic<[], [], [IntrWillReturn]>;

def int_aarch64_tcancel : ClangBuiltin<"__builtin_arm_tcancel">,
Intrinsic<[], [llvm_i64_ty], [IntrWillReturn, ImmArg<ArgIndex<0>>]>;

def int_aarch64_ttest : ClangBuiltin<"__builtin_arm_ttest">,
Intrinsic<[llvm_i64_ty], [],
[IntrNoMem, IntrHasSideEffects, IntrWillReturn]>;

// Armv8.7-A load/store 64-byte intrinsics
defvar data512 = !listsplat(llvm_i64_ty, 8);
def int_aarch64_ld64b: Intrinsic<data512, [llvm_ptr_ty]>;
Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/AArch64/AArch64Features.td
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@ def FeatureTRBE : Extension<"trbe", "TRBE", "FEAT_TRBE",
def FeatureETE : Extension<"ete", "ETE", "FEAT_ETE",
"Enable Embedded Trace Extension", [FeatureTRBE]>;

def FeatureTME : ExtensionWithMArch<"tme", "TME", "FEAT_TME",
"Enable Transactional Memory Extension">;

//===----------------------------------------------------------------------===//
// Armv9.1 Architecture Extensions
//===----------------------------------------------------------------------===//
Expand Down
39 changes: 0 additions & 39 deletions llvm/lib/Target/AArch64/AArch64InstrFormats.td
Original file line number Diff line number Diff line change
Expand Up @@ -1712,28 +1712,6 @@ class RtSystemI<bit L, dag oops, dag iops, string asm, string operands,
let Inst{4-0} = Rt;
}

// System instructions for transactional memory extension
class TMBaseSystemI<bit L, bits<4> CRm, bits<3> op2, dag oops, dag iops,
string asm, string operands, list<dag> pattern>
: BaseSystemI<L, oops, iops, asm, operands, pattern>,
Sched<[WriteSys]> {
let Inst{20-12} = 0b000110011;
let Inst{11-8} = CRm;
let Inst{7-5} = op2;
let DecoderMethod = "";

let mayLoad = 1;
let mayStore = 1;
}

// System instructions for transactional memory - single input operand
class TMSystemI<bits<4> CRm, string asm, list<dag> pattern>
: TMBaseSystemI<0b1, CRm, 0b011,
(outs GPR64:$Rt), (ins), asm, "\t$Rt", pattern> {
bits<5> Rt;
let Inst{4-0} = Rt;
}

// System instructions that pass a register argument
// This class assumes the register is for input rather than output.
class RegInputSystemI<bits<4> CRm, bits<3> Op2, string asm,
Expand All @@ -1744,23 +1722,6 @@ class RegInputSystemI<bits<4> CRm, bits<3> Op2, string asm,
let Inst{7-5} = Op2;
}

// System instructions for transactional memory - no operand
class TMSystemINoOperand<bits<4> CRm, string asm, list<dag> pattern>
: TMBaseSystemI<0b0, CRm, 0b011, (outs), (ins), asm, "", pattern> {
let Inst{4-0} = 0b11111;
}

// System instructions for exit from transactions
class TMSystemException<bits<3> op1, string asm, list<dag> pattern>
: I<(outs), (ins timm64_0_65535:$imm), asm, "\t$imm", "", pattern>,
Sched<[WriteSys]> {
bits<16> imm;
let Inst{31-24} = 0b11010100;
let Inst{23-21} = op1;
let Inst{20-5} = imm;
let Inst{4-0} = 0b00000;
}

class APASI : SimpleSystemI<0, (ins GPR64:$Xt), "apas", "\t$Xt">, Sched<[]> {
bits<5> Xt;
let Inst{20-5} = 0b0111001110000000;
Expand Down
18 changes: 0 additions & 18 deletions llvm/lib/Target/AArch64/AArch64InstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ def HasBTIE : Predicate<"Subtarget->hasBTIE()">,
AssemblerPredicateWithAll<(all_of FeatureBTIE), "btie">;
def HasMTE : Predicate<"Subtarget->hasMTE()">,
AssemblerPredicateWithAll<(all_of FeatureMTE), "mte">;
def HasTME : Predicate<"Subtarget->hasTME()">,
AssemblerPredicateWithAll<(all_of FeatureTME), "tme">;
def HasETE : Predicate<"Subtarget->hasETE()">,
AssemblerPredicateWithAll<(all_of FeatureETE), "ete">;
def HasTRBE : Predicate<"Subtarget->hasTRBE()">,
Expand Down Expand Up @@ -2497,22 +2495,6 @@ def : InstAlias<"sys $op1, $Cn, $Cm, $op2",
sys_cr_op:$Cm, imm0_7:$op2, XZR)>;


let Predicates = [HasTME] in {

def TSTART : TMSystemI<0b0000, "tstart",
[(set GPR64:$Rt, (int_aarch64_tstart))]>;

def TCOMMIT : TMSystemINoOperand<0b0000, "tcommit", [(int_aarch64_tcommit)]>;

def TCANCEL : TMSystemException<0b011, "tcancel",
[(int_aarch64_tcancel timm64_0_65535:$imm)]>;

def TTEST : TMSystemI<0b0001, "ttest", [(set GPR64:$Rt, (int_aarch64_ttest))]> {
let mayLoad = 0;
let mayStore = 0;
}
} // HasTME

//===----------------------------------------------------------------------===//
// Move immediate instructions.
//===----------------------------------------------------------------------===//
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3905,7 +3905,6 @@ static const struct Extension {
{"rdma", {AArch64::FeatureRDM}},
{"sb", {AArch64::FeatureSB}},
{"ssbs", {AArch64::FeatureSSBS}},
{"tme", {AArch64::FeatureTME}},
{"fp8", {AArch64::FeatureFP8}},
{"faminmax", {AArch64::FeatureFAMINMAX}},
{"fp8fma", {AArch64::FeatureFP8FMA}},
Expand Down
44 changes: 0 additions & 44 deletions llvm/test/CodeGen/AArch64/tme.ll

This file was deleted.

4 changes: 0 additions & 4 deletions llvm/test/MC/AArch64/directive-arch_extension.s
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ sb
msr SSBS, #1
// CHECK: msr SSBS, #1

.arch_extension tme
tstart x0
// CHECK: tstart x0

.arch_extension fprcvt
fcvtns s0, d1
// CHECK: fcvtns s0, d1
Expand Down
Loading
Loading