From 4bf97b4c5c43f60d76defce8c4819cb5882a3067 Mon Sep 17 00:00:00 2001 From: RuoyuZhou Date: Sun, 23 Aug 2026 14:01:46 +0800 Subject: [PATCH] linxisa: refresh final PTO 0.58.3 authority --- .github/workflows/ci.yml | 4 +-- docs/isa.md | 4 +-- tests/checks/test_gen_minst_codec.py | 52 +++++++++++++++++++++++++++- tools/isa/gen_minst_codec.py | 2 +- 4 files changed, 56 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b724f56..a7f7014 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: uses: actions/checkout@v4 with: repository: LinxISA/linx-isa - ref: 81bfd0e42f20f5be10af3bd3a17492d586ca42a1 + ref: 1926864fed9405761f783b130674c45f92210d3d path: linxisa-authority - name: Install toolchain run: sudo apt-get update && sudo apt-get install -y clang-format cmake ninja-build g++ @@ -104,7 +104,7 @@ jobs: uses: actions/checkout@v4 with: repository: LinxISA/linx-isa - ref: 81bfd0e42f20f5be10af3bd3a17492d586ca42a1 + ref: 1926864fed9405761f783b130674c45f92210d3d path: linxisa-authority - name: Install toolchain run: sudo apt-get update && sudo apt-get install -y clang-format cmake ninja-build clang diff --git a/docs/isa.md b/docs/isa.md index 17ebce6..30eff5c 100644 --- a/docs/isa.md +++ b/docs/isa.md @@ -116,9 +116,9 @@ form/field/piece/constraint cardinalities before writing. `check-isa-codec` also rejects stale committed output without modifying it. It additionally authenticates the complete authority bytes against the -immutable LinxISA v0.58.3 authority at `81bfd0e42f20f5be10af3bd3a17492d586ca42a1`: +immutable LinxISA v0.58.3 authority at `1926864fed9405761f783b130674c45f92210d3d`: compiled catalog -`34ecbcfa075166490b622647eb53c13a9c360848d6c7acb2e034d3e47f8c9a8a`, PTO +`e003d9a8e8e68de63afe0e8662e59658c173bb651e90f670c490aec2121ad1c8`, PTO lock `d5c17fd6f893267b43ed88ec157cc18ee9848eee6cf1801eaf3fe99358300a4d`, and release manifest `6f1b3fdc81e8be591d74427663a5747e6b2aa884c7d9787b2852b8eba4b5ed4d`. diff --git a/tests/checks/test_gen_minst_codec.py b/tests/checks/test_gen_minst_codec.py index e336802..97cbe91 100644 --- a/tests/checks/test_gen_minst_codec.py +++ b/tests/checks/test_gen_minst_codec.py @@ -156,6 +156,32 @@ def remove_transpose_operand(spec) -> None: self._assert_catalog_mutation_rejected(remove_transpose_operand) + def test_hl_lui_high_half_semantic_regression_fails_content_authentication( + self, + ) -> None: + def restore_sign_extension(spec) -> None: + semantics = spec["semantics_conventions"]["immediate_materialization"][ + "hl_lui" + ] + semantics["imm_kind"] = "signed" + semantics["note"] = "No <<12 in HL.LUI." + semantics["rule"] = "Write(RegDst, SignExtend(imm32))" + + self._assert_catalog_mutation_rejected(restore_sign_extension) + + def test_csel_srcrtype_semantic_regression_fails_content_authentication( + self, + ) -> None: + def restore_legacy_neg_encoding(spec) -> None: + semantics = spec["semantics_conventions"]["srcrtype"]["csel"] + semantics["description"] = ( + "CSEL encodes an optional .neg on SrcR; other SrcRType values " + "are treated as 00." + ) + semantics["policy"] = "11_as_neg_else_00" + + self._assert_catalog_mutation_rejected(restore_legacy_neg_encoding) + def test_explicit_authority_root_supports_standalone_freshness(self) -> None: checked = subprocess.run( [ @@ -213,7 +239,7 @@ def test_every_ctest_job_uses_exact_immutable_authority(self) -> None: with self.subTest(job=job_name): self.assertIn("repository: LinxISA/linx-isa", body) self.assertIn( - "ref: 81bfd0e42f20f5be10af3bd3a17492d586ca42a1", body + "ref: 1926864fed9405761f783b130674c45f92210d3d", body ) self.assertIn("path: linxisa-authority", body) self.assertIn( @@ -229,6 +255,30 @@ def test_exact_v0583_authority_and_codec_shape_are_accepted(self) -> None: counts, {"forms": 757, "fields": 2643, "pieces": 3375, "constraints": 792}, ) + self.assertEqual( + self.spec["semantics_conventions"]["immediate_materialization"][ + "hl_lui" + ], + { + "imm_kind": "bit-pattern", + "note": ( + "The split immediate occupies result bits 63:32; result bits " + "31:0 are zero." + ), + "rule": "Write(RegDst, ZeroExtend(imm32) << 32)", + }, + ) + self.assertEqual( + self.spec["semantics_conventions"]["srcrtype"]["csel"], + { + "description": ( + "CSEL encodes its optional .neg as SrcRType=10; the canonical " + "unmodified spelling uses SrcRType=11 and every other value is " + "also treated as unmodified." + ), + "policy": "10_as_neg_else_00", + }, + ) forms, *_ = gen_minst_codec.build_forms(self.spec) by_name = {form["mnemonic"]: form for form in forms} diff --git a/tools/isa/gen_minst_codec.py b/tools/isa/gen_minst_codec.py index 375daea..52dc928 100755 --- a/tools/isa/gen_minst_codec.py +++ b/tools/isa/gen_minst_codec.py @@ -42,7 +42,7 @@ "pieces": 3375, "constraints": 792, } -EXPECTED_CATALOG_CONTENT_SHA256 = "34ecbcfa075166490b622647eb53c13a9c360848d6c7acb2e034d3e47f8c9a8a" +EXPECTED_CATALOG_CONTENT_SHA256 = "e003d9a8e8e68de63afe0e8662e59658c173bb651e90f670c490aec2121ad1c8" EXPECTED_LOCK_CONTENT_SHA256 = "d5c17fd6f893267b43ed88ec157cc18ee9848eee6cf1801eaf3fe99358300a4d" EXPECTED_RELEASE_MANIFEST_CONTENT_SHA256 = ( "6f1b3fdc81e8be591d74427663a5747e6b2aa884c7d9787b2852b8eba4b5ed4d"