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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/isa.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
52 changes: 51 additions & 1 deletion tests/checks/test_gen_minst_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down Expand Up @@ -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(
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion tools/isa/gen_minst_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading