Skip to content

aarch64: add instruction forms and Cortex-A72 model coverage - #473

Open
Aurivelle wants to merge 3 commits into
slothy-optimizer:mainfrom
Aurivelle:pr-prep/instruction-support
Open

Aurivelle wants to merge 3 commits into
slothy-optimizer:mainfrom
Aurivelle:pr-prep/instruction-support

Conversation

@Aurivelle

@Aurivelle Aurivelle commented Nov 2, 2026 •

Copy link
Copy Markdown

This PR extends the AArch64 instruction model by:

  • adding parser and instruction semantics support for scalar, branch, ASIMD, and structured load/store forms;
  • extending the Cortex-A72 scheduling model with execution units, latency, and inverse-throughput data;
  • adding parse/write round-trip and Cortex-A72 model coverage tests for 28 instruction forms;
  • registering the new instruction-model test with the existing test.py CI entry point.

Instruction coverage

  • control/scalar: conditional branches, W-form add/cmp, mov with xzr, and W-form ldr/str/stp;
  • ASIMD: neg, shsub, sqrdmlah, bsl, four-register tbl, sxtl, and sxtl2;
  • structured memory: lane and multi-register ld1/st1 forms, post-increment variants, st3, and Q-register stp.

Cortex-A72 timing data is based on the Arm Cortex-A72 Software Optimization Guide:
https://documentation-service.arm.com/static/5ed75eeeca06a95ce53f93c7

The changes were validated with dedicated instruction-model tests, Cortex-A72 regression and dry-run coverage, GNU assembler checks, Black, and Flake8.

@Aurivelle

Copy link
Copy Markdown
Author

1104 update

I see overlapping matches between the generic Ldr_Q/Str_Q/Stp_Q model entries and the Cortex-A72-specific LD1/ST1 entries.

More specifically:

  • q_ld1 and q_ld1_with_postinc $\leftrightarrow$ Ldr_Q;
  • q_st1_with_postinc $\leftrightarrow$ Str_Q;
  • q_st1_2_with_postinc $\leftrightarrow$ Stp_Q.

I see two possible solutions. The first is to keep the existing class hierarchy and exclude the exact LD1/ST1 classes from the generic fallback entries in the Cortex-A72 frontend.

The second is to reorganize the structured load/store classes as siblings of Ldr_Q, Str_Q, and Stp_Q, but this requires adjusting all target frontends.

I chose the first solution for now because the second one requires broader changes.

This branch has not been deployed

No deployments
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.

1 participant