Landing: e3457d211e27

Project / Subsystem

gcc / target/riscv

Date

2026-09-13

Author

Jeff Law

Commit

e3457d211e2720dd0f8070fe7600be4b026ed1ef

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
target/riscv
patch_id
—
commit_hash
e3457d211e2720dd0f8070fe7600be4b026ed1ef
source_type
github
headline
RISC-V: Correctly attach DEF_CFA note to stack pointer copy instruction.
tldr
The DEF_CFA debugging information is now attached to the correct instruction on RISC-V, fixing a correctness issue.
author
Jeff Law
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • RISC-V
  • • debugging
  • • correctness
discussion_id_link
—
bugzilla_pr
—
date
2026-09-13T00:00:00.000Z

This commit corrects an issue on the RISC-V architecture where the REG_CFA_DEF_CFA debugging note was being attached to the wrong instruction. Specifically, the note, which defines the Call Frame Address (CFA), should be associated with the instruction that copies the stack pointer to a temporary register, but it was previously attached to the instruction preceding this copy.

This incorrect placement could lead to inaccurate stack unwinding information. The fix ensures the note is correctly associated with the stack pointer copy, improving the reliability of debugging information, although it does not affect code generation itself.