Skip to content

Reserve LoongArch64 fiber stack space before saving registers - #14030

Merged
cfallin merged 1 commit into
bytecodealliance:mainfrom
subotac:fix/loongarch64-stackswitch-reserve-first
Jul 30, 2026
Merged

Reserve LoongArch64 fiber stack space before saving registers#14030
cfallin merged 1 commit into
bytecodealliance:mainfrom
subotac:fix/loongarch64-stackswitch-reserve-first

Conversation

@subotac

@subotac subotac commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #13885.

Decrement the LoongArch64 fiber stack pointer before saving callee-saved registers, then address each save within the reserved 0xa0-byte frame. This avoids writing below the current stack pointer before the frame is
allocated and matches the existing restore layout.

Testing

  • cargo check -p wasmtime-internal-fiber --target loongarch64-unknown-linux-gnu
  • cargo clippy -p wasmtime-internal-fiber --target loongarch64-unknown-linux-gnu -- -D warnings
  • cargo fmt --manifest-path crates/fiber/Cargo.toml -- --check

@subotac
subotac requested a review from a team as a code owner July 30, 2026 18:00
@subotac
subotac requested review from pchickey and removed request for a team July 30, 2026 18:00
@pchickey
pchickey requested review from cfallin and removed request for pchickey July 30, 2026 18:21
@cfallin
cfallin added this pull request to the merge queue Jul 30, 2026
Merged via the queue into bytecodealliance:main with commit fb8c8df Jul 30, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack switching routine for loongarch64 needs to decrement stack pointer before saving regsters

2 participants