Skip to content

[RISCV] Fix post-ALIGN JAL rollback to use post-ALIGN layout - #1689

Merged
Shankar Easwaran (quic-seaswara) merged 1 commit into
mainfrom
jal_unroll
Aug 12, 2026
Merged

[RISCV] Fix post-ALIGN JAL rollback to use post-ALIGN layout#1689
Shankar Easwaran (quic-seaswara) merged 1 commit into
mainfrom
jal_unroll

Conversation

@quic-seaswara

Copy link
Copy Markdown
Contributor

The ALIGN pass commits byte deletions inline (via
deleteInstruction), shrinking fragments and shifting VMAs, but createProgramHdrs() is not called again until the next outer-loop iteration. So the range check (isInt<21>(X)) saw pre-ALIGN VMAs and missed calls that were actually out of range after the ALIGN deletions.

Fixes #1688

The ALIGN pass commits byte deletions inline (via
deleteInstruction), shrinking fragments and shifting VMAs,
but createProgramHdrs() is not called again until the next
outer-loop iteration. So the range check (isInt<21>(X)) saw
pre-ALIGN VMAs and missed calls that were actually out of
range after the ALIGN deletions.

Fixes #1688.

Signed-off-by: Shankar Easwaran <seaswara@qti.qualcomm.com>
@quic-seaswara Shankar Easwaran (quic-seaswara) added the zephyr-check Run Zephyr build/check workflow on this PR label Aug 12, 2026
@quic-seaswara
Shankar Easwaran (quic-seaswara) merged commit 5fd859e into main Aug 12, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel-check zephyr-check Run Zephyr build/check workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

another case : call relaxation needs to be properly rolled back

1 participant