[llvm] 35bbd62 - [AArch64][llvm] Update POE2 thread-private system register names (#200428)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 03:53:25 PDT 2026


Author: Jonathan Thackray
Date: 2026-07-03T11:53:20+01:00
New Revision: 35bbd6224676b6c0464f92c9f63a7d61f9e53b2a

URL: https://github.com/llvm/llvm-project/commit/35bbd6224676b6c0464f92c9f63a7d61f9e53b2a
DIFF: https://github.com/llvm/llvm-project/commit/35bbd6224676b6c0464f92c9f63a7d61f9e53b2a.diff

LOG: [AArch64][llvm] Update POE2 thread-private system register names (#200428)

The `TPMINn_ELn` and `TPMAXn_ELn` system registers have been removed
from the 2026-06 documentation [1]. Their encodings are now used by the
`TPCRn_ELn` system registers [2].

Update the system register definitions and MC tests accordingly.
  
[1] https://developer.arm.com/documentation/111109/2026-06
[2]
https://developer.arm.com/documentation/111107/2026-06/AArch64-Registers/TPCR0-EL0--Thread-Private-State-Register-0--EL0-

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64SystemOperands.td
    llvm/test/MC/AArch64/arm-poe2.s

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64SystemOperands.td b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
index 971b57fb490f7..b394cd1eca38a 100644
--- a/llvm/lib/Target/AArch64/AArch64SystemOperands.td
+++ b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
@@ -2670,16 +2670,11 @@ def : RWSysReg<"NVHCRXMASK_EL2",    0b11, 0b100, 0b0001, 0b0101, 0b101>;
 
 // S1POE2 Thread private state extension (FEAT_TPS/TPSP).
 foreach n = 0-1 in {
-  defvar nb = !cast<bits<1>>(n);
   //                                Op0   Op1    CRn     CRm     Op2
-  def : RWSysReg<"TPMIN"#n#"_EL0",  0b11, 0b011, 0b0010, 0b0010, {0b1,nb,0}>;
-  def : RWSysReg<"TPMAX"#n#"_EL0",  0b11, 0b011, 0b0010, 0b0010, {0b1,nb,1}>;
-  def : RWSysReg<"TPMIN"#n#"_EL1",  0b11, 0b000, 0b0010, 0b0010, {0b1,nb,0}>;
-  def : RWSysReg<"TPMAX"#n#"_EL1",  0b11, 0b000, 0b0010, 0b0010, {0b1,nb,1}>;
-  def : RWSysReg<"TPMIN"#n#"_EL2",  0b11, 0b100, 0b0010, 0b0010, {0b1,nb,0}>;
-  def : RWSysReg<"TPMAX"#n#"_EL2",  0b11, 0b100, 0b0010, 0b0010, {0b1,nb,1}>;
-  def : RWSysReg<"TPMIN"#n#"_EL12", 0b11, 0b101, 0b0010, 0b0010, {0b1,nb,0}>;
-  def : RWSysReg<"TPMAX"#n#"_EL12", 0b11, 0b101, 0b0010, 0b0010, {0b1,nb,1}>;
+  def : RWSysReg<"TPCR"#n#"_EL0",   0b11, 0b011, 0b0010, 0b0010, {0b10,n}>;
+  def : RWSysReg<"TPCR"#n#"_EL1",   0b11, 0b000, 0b0010, 0b0010, {0b10,n}>;
+  def : RWSysReg<"TPCR"#n#"_EL2",   0b11, 0b100, 0b0010, 0b0010, {0b10,n}>;
+  def : RWSysReg<"TPCR"#n#"_EL12",  0b11, 0b101, 0b0010, 0b0010, {0b10,n}>;
 }
 
 class PLBIEntry<bits<3> op1, bits<4> crn, bits<4> crm, bits<3> op2, string name,

diff  --git a/llvm/test/MC/AArch64/arm-poe2.s b/llvm/test/MC/AArch64/arm-poe2.s
index b9aa734cf5b68..dbed9ba599067 100644
--- a/llvm/test/MC/AArch64/arm-poe2.s
+++ b/llvm/test/MC/AArch64/arm-poe2.s
@@ -1372,85 +1372,45 @@ mrs x0, AFGDTP15_EL3
 // CHECK-ENCODING: encoding: [0xe0,0x37,0x3e,0xd5]
 // CHECK-UNKNOWN:  d53e37e0 mrs x0, AFGDTP15_EL3
 
-mrs x2, TPMIN0_EL0
-// CHECK-INST: mrs x2, TPMIN0_EL0
+mrs x2, TPCR0_EL0
+// CHECK-INST: mrs x2, TPCR0_EL0
 // CHECK-ENCODING: encoding: [0x82,0x22,0x3b,0xd5]
-// CHECK-UNKNOWN:  d53b2282 mrs x2, TPMIN0_EL0
+// CHECK-UNKNOWN:  d53b2282 mrs x2, TPCR0_EL0
 
-mrs x2, TPMAX0_EL0
-// CHECK-INST: mrs x2, TPMAX0_EL0
+mrs x2, TPCR1_EL0
+// CHECK-INST: mrs x2, TPCR1_EL0
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x3b,0xd5]
-// CHECK-UNKNOWN:  d53b22a2 mrs x2, TPMAX0_EL0
+// CHECK-UNKNOWN:  d53b22a2 mrs x2, TPCR1_EL0
 
-mrs x2, TPMIN1_EL0
-// CHECK-INST: mrs x2, TPMIN1_EL0
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x3b,0xd5]
-// CHECK-UNKNOWN:  d53b22c2 mrs x2, TPMIN1_EL0
-
-mrs x2, TPMAX1_EL0
-// CHECK-INST: mrs x2, TPMAX1_EL0
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x3b,0xd5]
-// CHECK-UNKNOWN:  d53b22e2 mrs x2, TPMAX1_EL0
-
-mrs x2, TPMIN0_EL1
-// CHECK-INST: mrs x2, TPMIN0_EL1
+mrs x2, TPCR0_EL1
+// CHECK-INST: mrs x2, TPCR0_EL1
 // CHECK-ENCODING: encoding: [0x82,0x22,0x38,0xd5]
-// CHECK-UNKNOWN:  d5382282 mrs x2, TPMIN0_EL1
+// CHECK-UNKNOWN:  d5382282 mrs x2, TPCR0_EL1
 
-mrs x2, TPMAX0_EL1
-// CHECK-INST: mrs x2, TPMAX0_EL1
+mrs x2, TPCR1_EL1
+// CHECK-INST: mrs x2, TPCR1_EL1
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x38,0xd5]
-// CHECK-UNKNOWN:  d53822a2 mrs x2, TPMAX0_EL1
-
-mrs x2, TPMIN1_EL1
-// CHECK-INST: mrs x2, TPMIN1_EL1
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x38,0xd5]
-// CHECK-UNKNOWN:  d53822c2 mrs x2, TPMIN1_EL1
-
-mrs x2, TPMAX1_EL1
-// CHECK-INST: mrs x2, TPMAX1_EL1
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x38,0xd5]
-// CHECK-UNKNOWN:  d53822e2 mrs x2, TPMAX1_EL1
+// CHECK-UNKNOWN:  d53822a2 mrs x2, TPCR1_EL1
 
-mrs x2, TPMIN0_EL2
-// CHECK-INST: mrs x2, TPMIN0_EL2
+mrs x2, TPCR0_EL2
+// CHECK-INST: mrs x2, TPCR0_EL2
 // CHECK-ENCODING: encoding: [0x82,0x22,0x3c,0xd5]
-// CHECK-UNKNOWN:  d53c2282 mrs x2, TPMIN0_EL2
+// CHECK-UNKNOWN:  d53c2282 mrs x2, TPCR0_EL2
 
-mrs x2, TPMAX0_EL2
-// CHECK-INST: mrs x2, TPMAX0_EL2
+mrs x2, TPCR1_EL2
+// CHECK-INST: mrs x2, TPCR1_EL2
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x3c,0xd5]
-// CHECK-UNKNOWN:  d53c22a2 mrs x2, TPMAX0_EL2
+// CHECK-UNKNOWN:  d53c22a2 mrs x2, TPCR1_EL2
 
-mrs x2, TPMIN1_EL2
-// CHECK-INST: mrs x2, TPMIN1_EL2
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x3c,0xd5]
-// CHECK-UNKNOWN:  d53c22c2 mrs x2, TPMIN1_EL2
-
-mrs x2, TPMAX1_EL2
-// CHECK-INST: mrs x2, TPMAX1_EL2
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x3c,0xd5]
-// CHECK-UNKNOWN:  d53c22e2 mrs x2, TPMAX1_EL2
-
-mrs x2, TPMIN0_EL12
-// CHECK-INST: mrs x2, TPMIN0_EL12
+mrs x2, TPCR0_EL12
+// CHECK-INST: mrs x2, TPCR0_EL12
 // CHECK-ENCODING: encoding: [0x82,0x22,0x3d,0xd5]
-// CHECK-UNKNOWN:  d53d2282 mrs x2, TPMIN0_EL12
+// CHECK-UNKNOWN:  d53d2282 mrs x2, TPCR0_EL12
 
-mrs x2, TPMAX0_EL12
-// CHECK-INST: mrs x2, TPMAX0_EL12
+mrs x2, TPCR1_EL12
+// CHECK-INST: mrs x2, TPCR1_EL12
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x3d,0xd5]
-// CHECK-UNKNOWN:  d53d22a2 mrs x2, TPMAX0_EL12
-
-mrs x2, TPMIN1_EL12
-// CHECK-INST: mrs x2, TPMIN1_EL12
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x3d,0xd5]
-// CHECK-UNKNOWN:  d53d22c2 mrs x2, TPMIN1_EL12
-
-mrs x2, TPMAX1_EL12
-// CHECK-INST: mrs x2, TPMAX1_EL12
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x3d,0xd5]
-// CHECK-UNKNOWN:  d53d22e2 mrs x2, TPMAX1_EL12
+// CHECK-UNKNOWN:  d53d22a2 mrs x2, TPCR1_EL12
 
 
 msr TPIDR3_EL0, x0
@@ -2808,85 +2768,45 @@ msr AFGDTP15_EL3, x0
 // CHECK-ENCODING: encoding: [0xe0,0x37,0x1e,0xd5]
 // CHECK-UNKNOWN:  d51e37e0 msr AFGDTP15_EL3, x0
 
-msr TPMIN0_EL0, x2
-// CHECK-INST: msr TPMIN0_EL0, x2
+msr TPCR0_EL0, x2
+// CHECK-INST: msr TPCR0_EL0, x2
 // CHECK-ENCODING: encoding: [0x82,0x22,0x1b,0xd5]
-// CHECK-UNKNOWN:  d51b2282 msr TPMIN0_EL0, x2
+// CHECK-UNKNOWN:  d51b2282 msr TPCR0_EL0, x2
 
-msr TPMAX0_EL0, x2
-// CHECK-INST: msr TPMAX0_EL0, x2
+msr TPCR1_EL0, x2
+// CHECK-INST: msr TPCR1_EL0, x2
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x1b,0xd5]
-// CHECK-UNKNOWN:  d51b22a2 msr TPMAX0_EL0, x2
+// CHECK-UNKNOWN:  d51b22a2 msr TPCR1_EL0, x2
 
-msr TPMIN1_EL0, x2
-// CHECK-INST: msr TPMIN1_EL0, x2
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x1b,0xd5]
-// CHECK-UNKNOWN:  d51b22c2 msr TPMIN1_EL0, x2
-
-msr TPMAX1_EL0, x2
-// CHECK-INST: msr TPMAX1_EL0, x2
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x1b,0xd5]
-// CHECK-UNKNOWN:  d51b22e2 msr TPMAX1_EL0, x2
-
-msr TPMIN0_EL1, x2
-// CHECK-INST: msr TPMIN0_EL1, x2
+msr TPCR0_EL1, x2
+// CHECK-INST: msr TPCR0_EL1, x2
 // CHECK-ENCODING: encoding: [0x82,0x22,0x18,0xd5]
-// CHECK-UNKNOWN:  d5182282 msr TPMIN0_EL1, x2
+// CHECK-UNKNOWN:  d5182282 msr TPCR0_EL1, x2
 
-msr TPMAX0_EL1, x2
-// CHECK-INST: msr TPMAX0_EL1, x2
+msr TPCR1_EL1, x2
+// CHECK-INST: msr TPCR1_EL1, x2
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x18,0xd5]
-// CHECK-UNKNOWN:  d51822a2 msr TPMAX0_EL1, x2
-
-msr TPMIN1_EL1, x2
-// CHECK-INST: msr TPMIN1_EL1, x2
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x18,0xd5]
-// CHECK-UNKNOWN:  d51822c2 msr TPMIN1_EL1, x2
-
-msr TPMAX1_EL1, x2
-// CHECK-INST: msr TPMAX1_EL1, x2
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x18,0xd5]
-// CHECK-UNKNOWN:  d51822e2 msr TPMAX1_EL1, x2
+// CHECK-UNKNOWN:  d51822a2 msr TPCR1_EL1, x2
 
-msr TPMIN0_EL2, x2
-// CHECK-INST: msr TPMIN0_EL2, x2
+msr TPCR0_EL2, x2
+// CHECK-INST: msr TPCR0_EL2, x2
 // CHECK-ENCODING: encoding: [0x82,0x22,0x1c,0xd5]
-// CHECK-UNKNOWN:  d51c2282 msr TPMIN0_EL2, x2
+// CHECK-UNKNOWN:  d51c2282 msr TPCR0_EL2, x2
 
-msr TPMAX0_EL2, x2
-// CHECK-INST: msr TPMAX0_EL2, x2
+msr TPCR1_EL2, x2
+// CHECK-INST: msr TPCR1_EL2, x2
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x1c,0xd5]
-// CHECK-UNKNOWN:  d51c22a2 msr TPMAX0_EL2, x2
+// CHECK-UNKNOWN:  d51c22a2 msr TPCR1_EL2, x2
 
-msr TPMIN1_EL2, x2
-// CHECK-INST: msr TPMIN1_EL2, x2
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x1c,0xd5]
-// CHECK-UNKNOWN:  d51c22c2 msr TPMIN1_EL2, x2
-
-msr TPMAX1_EL2, x2
-// CHECK-INST: msr TPMAX1_EL2, x2
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x1c,0xd5]
-// CHECK-UNKNOWN:  d51c22e2 msr TPMAX1_EL2, x2
-
-msr TPMIN0_EL12, x2
-// CHECK-INST: msr TPMIN0_EL12, x2
+msr TPCR0_EL12, x2
+// CHECK-INST: msr TPCR0_EL12, x2
 // CHECK-ENCODING: encoding: [0x82,0x22,0x1d,0xd5]
-// CHECK-UNKNOWN:  d51d2282 msr TPMIN0_EL12, x2
+// CHECK-UNKNOWN:  d51d2282 msr TPCR0_EL12, x2
 
-msr TPMAX0_EL12, x2
-// CHECK-INST: msr TPMAX0_EL12, x2
+msr TPCR1_EL12, x2
+// CHECK-INST: msr TPCR1_EL12, x2
 // CHECK-ENCODING: encoding: [0xa2,0x22,0x1d,0xd5]
-// CHECK-UNKNOWN:  d51d22a2 msr TPMAX0_EL12, x2
-
-msr TPMIN1_EL12, x2
-// CHECK-INST: msr TPMIN1_EL12, x2
-// CHECK-ENCODING: encoding: [0xc2,0x22,0x1d,0xd5]
-// CHECK-UNKNOWN:  d51d22c2 msr TPMIN1_EL12, x2
-
-msr TPMAX1_EL12, x2
-// CHECK-INST: msr TPMAX1_EL12, x2
-// CHECK-ENCODING: encoding: [0xe2,0x22,0x1d,0xd5]
-// CHECK-UNKNOWN:  d51d22e2 msr TPMAX1_EL12, x2
+// CHECK-UNKNOWN:  d51d22a2 msr TPCR1_EL12, x2
 
 
 tchangef x0, x1


        


More information about the llvm-commits mailing list