arm64: support register-extend operands#13
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
+ Coverage 69.48% 69.55% +0.07%
==========================================
Files 57 57
Lines 16380 16431 +51
==========================================
+ Hits 11382 11429 +47
- Misses 3683 3685 +2
- Partials 1315 1317 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request implements support for ARM64 register extensions (e.g., R2.UXTB) by introducing the OpRegExtend operand kind. The changes include updates to the operand parser, string representation, and the evaluation logic to generate appropriate truncation and extension IR. Feedback was provided to optimize the parseRegExtend function by avoiding redundant string transformations.
|
Clean, well-scoped addition. The parser, eval, and |
Summary
R2.UXTBarm64eval soCMP R2.UXTB, R5translates directlyWhy
Go 1.26's
internal/bytealg/count_arm64.susesCMP R2.UXTB, R5.llgowas carrying a downstream source rewrite to normalize that operand before translation. This change moves the support intoplan9asmso downstream users can translate the stdlib source as-is.Testing
go test ./...go test ./... -run 'TestStdlibInternalBytealg_ARM64_Compile'