Skip to content

Use la/jr pseudoinstructions for main function call #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions riscv-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- Main function no longer needs to be close to _start. A linker script may copy
all code to RAM and keep .init in flash/ROM.

## [v0.15.0] - 2025-06-10

### Added
Expand Down
3 changes: 2 additions & 1 deletion riscv-rt/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ cfg_global_asm!(
ld a1, 8 * 1(sp)
ld a2, 8 * 2(sp)
addi sp, sp, 8 * 4",
"jal zero, main
"la t0, main
jr t0
.cfi_endproc",
);

Expand Down