From 8b9b8f61aa1b95569f7f0e016982ab919adfcaac Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Mon, 3 Nov 2025 12:50:01 -0600 Subject: [PATCH 1/2] fix(data): profiles: clean up after multiple inheritance Za64rs ("Reservation sets are a maximum of 64 bytes.") conflicts with Za128rs ("Reservation sets must be at most 128 bytes in size."). Most profiles don't automatically incorporate optional extensions from "ancestors", so more extensions need to be removed after profile inheritance. For example, in UDB, profile RVA23S64 inherits from both RVB23S64 and RVA23U64. However, in the profiles documentation it (roughly) inherits from only RVA23U64, and then only "all the mandatory unprivileged extensions". So, the optional extensions need to be handled more explicitly, and many need to be removed. Signed-off-by: Paul A. Clarke --- spec/std/isa/ext/Za64rs.yaml | 1 + spec/std/isa/profile/RVA22S64.yaml | 6 ++++++ spec/std/isa/profile/RVA22U64.yaml | 6 ++++++ spec/std/isa/profile/RVA23S64.yaml | 18 ++++++++++++++++++ spec/std/isa/profile/RVB23S64.yaml | 23 +++++++++++++++++++++++ spec/std/isa/profile/RVB23U64.yaml | 6 ------ 6 files changed, 54 insertions(+), 6 deletions(-) diff --git a/spec/std/isa/ext/Za64rs.yaml b/spec/std/isa/ext/Za64rs.yaml index ce24a5980a..f31566e561 100644 --- a/spec/std/isa/ext/Za64rs.yaml +++ b/spec/std/isa/ext/Za64rs.yaml @@ -17,6 +17,7 @@ description: | [NOTE] The minimum reservation set size is effectively determined by the size of atomic accesses in the A extension. +conflicts: Za128rs versions: - version: "1.0.0" state: ratified diff --git a/spec/std/isa/profile/RVA22S64.yaml b/spec/std/isa/profile/RVA22S64.yaml index 24f540e214..4924a32893 100644 --- a/spec/std/isa/profile/RVA22S64.yaml +++ b/spec/std/isa/profile/RVA22S64.yaml @@ -20,6 +20,12 @@ extensions: $inherits: - "profile/RVA20S64.yaml#/extensions" - "profile/RVA22U64.yaml#/extensions" + $remove: + - Za128rs + - Zfh + - V + - Zkn + - Zks S: presence: mandatory version: "= 1.12" diff --git a/spec/std/isa/profile/RVA22U64.yaml b/spec/std/isa/profile/RVA22U64.yaml index f84c532d7e..03c3545b6e 100644 --- a/spec/std/isa/profile/RVA22U64.yaml +++ b/spec/std/isa/profile/RVA22U64.yaml @@ -18,6 +18,12 @@ introduction: | terms of the amount of software that targets this profile. extensions: $inherits: "profile/RVA20U64.yaml#/extensions" + $remove: Za128rs + Za64rs: + presence: mandatory + version: "~>1.0" + note: | + Reservation sets are contiguous, naturally aligned, and a maximum of 64 bytes Zihpm: presence: mandatory version: "= 2.0" diff --git a/spec/std/isa/profile/RVA23S64.yaml b/spec/std/isa/profile/RVA23S64.yaml index 641a59c149..04d2494b66 100644 --- a/spec/std/isa/profile/RVA23S64.yaml +++ b/spec/std/isa/profile/RVA23S64.yaml @@ -23,6 +23,24 @@ extensions: $inherits: - "profile/RVB23S64.yaml#/extensions" - "profile/RVA23U64.yaml#/extensions" + $remove: + - Zfh + - Zkn + - Zks + - Zvkng + - Zvksg + - Zabha + - Zacas + - Ziccamoc + - Zvbc + - Zama16b + - Zbc + - Zicfilp + - Zicfiss + - Zvfh + - Zfbfmin + - Zvfbfmin + - Zvfbfwma ######################################################################### # MANDATORY extensions in RVA23S64 (that were optional in RVB23S64) diff --git a/spec/std/isa/profile/RVB23S64.yaml b/spec/std/isa/profile/RVB23S64.yaml index 0ad6d5ba7d..3518fc946e 100644 --- a/spec/std/isa/profile/RVB23S64.yaml +++ b/spec/std/isa/profile/RVB23S64.yaml @@ -23,6 +23,29 @@ extensions: $inherits: - "profile/RVA22S64.yaml#/extensions" - "profile/RVB23U64.yaml#/extensions" + $remove: + - V + - Zvfhmin + - Zvbb + - Zvkt + - Supm + - Zvkng + - Zvksg + - Zvkg + - Zvknc + - Zvksc + - Zabha + - Zacas + - Ziccamoc + - Zvbc + - Zama16b + - Zbc + - Zicfilp + - Zicfiss + - Zvfh + - Zfbfmin + - Zvfbfmin + - Zvfbfwma ######################################################################### # MANDATORY extensions in RVB23 (and RVA23) diff --git a/spec/std/isa/profile/RVB23U64.yaml b/spec/std/isa/profile/RVB23U64.yaml index b57fb74ab6..00a256165a 100644 --- a/spec/std/isa/profile/RVB23U64.yaml +++ b/spec/std/isa/profile/RVB23U64.yaml @@ -21,7 +21,6 @@ extensions: # imported from RVA22U64 ######################################################################### $inherits: "profile/RVA22U64.yaml#/extensions" - $remove: Za128rs ######################################################################### # MANDATORY extensions in RVB23 (and RVA23) @@ -61,11 +60,6 @@ extensions: version: "~>1.0" note: | Wait-on-reservation-set (WRS) instructions - Za64rs: - presence: mandatory - version: "~>1.0" - note: | - Reservation sets are contiguous, naturally aligned, and a maximum of 64 bytes ######################################################################### # OPTIONAL LOCALIZED extensions From 431ea1e4ca5ffc5897b201d9e6105e18a8fb4d3d Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Thu, 6 Nov 2025 21:01:47 -0600 Subject: [PATCH 2/2] fix(data): extension Za64rs implies Za128rs --- spec/std/isa/ext/Za64rs.yaml | 4 +++- spec/std/isa/profile/RVA22S64.yaml | 1 - spec/std/isa/profile/RVA22U64.yaml | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/std/isa/ext/Za64rs.yaml b/spec/std/isa/ext/Za64rs.yaml index f31566e561..abf4f1d426 100644 --- a/spec/std/isa/ext/Za64rs.yaml +++ b/spec/std/isa/ext/Za64rs.yaml @@ -17,11 +17,13 @@ description: | [NOTE] The minimum reservation set size is effectively determined by the size of atomic accesses in the A extension. -conflicts: Za128rs versions: - version: "1.0.0" state: ratified ratification_date: null + implies: + - name: Za128rs + version: "1.0.0" param_constraints: LRSC_RESERVATION_STRATEGY: schema: diff --git a/spec/std/isa/profile/RVA22S64.yaml b/spec/std/isa/profile/RVA22S64.yaml index 4924a32893..96bc9724c9 100644 --- a/spec/std/isa/profile/RVA22S64.yaml +++ b/spec/std/isa/profile/RVA22S64.yaml @@ -21,7 +21,6 @@ extensions: - "profile/RVA20S64.yaml#/extensions" - "profile/RVA22U64.yaml#/extensions" $remove: - - Za128rs - Zfh - V - Zkn diff --git a/spec/std/isa/profile/RVA22U64.yaml b/spec/std/isa/profile/RVA22U64.yaml index 03c3545b6e..6b358584d3 100644 --- a/spec/std/isa/profile/RVA22U64.yaml +++ b/spec/std/isa/profile/RVA22U64.yaml @@ -18,7 +18,6 @@ introduction: | terms of the amount of software that targets this profile. extensions: $inherits: "profile/RVA20U64.yaml#/extensions" - $remove: Za128rs Za64rs: presence: mandatory version: "~>1.0"