Skip to content

Add testsuite for ARM64 logical immediate encoding/decoding#47

Closed
xclerc wants to merge 1 commit intomshinwell:arm64-typed-dslfrom
xclerc:arm64-typed-dsl-plus-imm-tests
Closed

Add testsuite for ARM64 logical immediate encoding/decoding#47
xclerc wants to merge 1 commit intomshinwell:arm64-typed-dslfrom
xclerc:arm64-typed-dsl-plus-imm-tests

Conversation

@xclerc
Copy link
Copy Markdown

@xclerc xclerc commented Jan 13, 2026

Add a comprehensive test for the ARM64 logical immediate encoding and decoding implementation in backend/arm64/ast/logical_immediates.ml.

The test:

  • Exhaustively tests all 8,192 possible (n, immr, imms) field combinations
  • Verifies that valid encodings can be decoded and re-encoded correctly
  • Tests 10 million random values to ensure proper rejection of invalid immediates (takes approximately 4 seconds)
  • Includes a reference decoder implementation for validation

The test is located in oxcaml/tests/backend/arm64-logical-immediate/ and uses dune to reference the arm64_ast library, avoiding code duplication by using the actual logical_immediates module.

🤖 Generated with Claude Code

Add a comprehensive test for the ARM64 logical immediate encoding and
decoding implementation in backend/arm64/ast/logical_immediates.ml.

The test:
- Exhaustively tests all 8,192 possible (n, immr, imms) field combinations
- Verifies that valid encodings can be decoded and re-encoded correctly
- Tests 10 million random values to ensure proper rejection of invalid
  immediates (takes approximately 4 seconds)
- Includes a reference decoder implementation for validation

The test is located in oxcaml/tests/backend/arm64-logical-immediate/
and uses dune to reference the arm64_ast library, avoiding code
duplication by using the actual logical_immediates module.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@mshinwell
Copy link
Copy Markdown
Owner

Has been cherry-picked and merged to main

@mshinwell mshinwell closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants