Repository navigation
AArch64: SYSL writes its Rt operand, it does not read it - #3045
Merged
Merged
Conversation
gaul
force-pushed
the
aarch64-sysl-rt-access
branch
from
August 27, 2026 20:11
40e8a2c to
05fead1
Compare
2 tasks done
gaul
force-pushed
the
aarch64-sysl-rt-access
branch
from
August 28, 2026 15:43
05fead1 to
f6ea0d6
Compare
Rot127
requested changes
Aug 31, 2026
gaul
force-pushed
the
aarch64-sysl-rt-access
branch
from
August 31, 2026 16:18
f6ea0d6 to
60baf74
Compare
SYSL was generated with CS_AC_READ on Rt, but Rt is the destination.
"SYSL <Xt>, #<op1>, <Cn>, <Cm>{, #<op2>}" is the system instruction
WITH RESULT, and the Arm ARM names Xt "the 64-bit name of the
general-purpose destination register", encoded in the Rt field.
Before:
sysl x0, #0, c0, c0, #0
operands[0].type: REG = x0
operands[0].access: READ
Registers read: x0
After:
sysl x0, #0, c0, c0, #0
operands[0].type: REG = x0
operands[0].access: WRITE
Registers modified: x0
A consumer tracking register liveness saw a use where there is a
definition, which is the unsafe direction: a value written into Xt
looked like it was still needed.
SYS (without the L) is the opposite direction -- its Xt is a source,
and it takes it as the last operand -- and is already CS_AC_READ; it is
untouched.
gaul
force-pushed
the
aarch64-sysl-rt-access
branch
from
August 31, 2026 16:21
60baf74 to
00c1666
Compare
Rot127
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
Detailed description
SYSL was generated with CS_AC_READ on Rt, but Rt is the destination. "SYSL , #, , {, #}" is the system instruction WITH RESULT, and the Arm ARM names Xt "the 64-bit name of the general-purpose destination register", encoded in the Rt field.
Before:
After:
A consumer tracking register liveness saw a use where there is a definition, which is the unsafe direction: a value written into Xt looked like it was still needed.
SYS (without the L) is the opposite direction -- its Xt is a source, and it takes it as the last operand -- and is already CS_AC_READ; it is untouched.
Test plan
Adds the correction to suite/auto-sync/inc_patches so it survives regeneration, plus a regression case. That case asserts regs_write rather than the operand list because two of SYSL's five operands are AARCH64_OP_CIMM, which cstest's operand comparison does not handle (it would take the default branch and report "op type not handled").
Closing issues