Repository navigation
[AUTOMATED] Follow explicit same-instruction call continuations - #1989
Merged
Merged
Conversation
An unconditional branch immediately after a call in the same instruction is its resume edge. Keep conditional tails and separately encoded tail jumps eligible.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
…e the rule applies A `ta 0x10` in the delay slot of `ba` lifts to the trap's call followed by the branch's goto, the one vendored-ISA shape the rule changes. The new stage test declares a function at the branch target and checks that the trap prints once and the resumed code's value is returned (it fails on main). Spec 02 now names the code path, the CALLOTHER and no-return cases, and the SPARC trap case, including its limit when the target is genuinely another function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Resolves the stage-corpus count (935) and merges baseline-stages.json key by key: main's assertions plus this PR's three SPARC-TRAP-RESUME keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Contributor
|
[AUTOMATED] Pushed three commits on top of 0071858; the code change is untouched.
|
Resolves the stage-corpus count (936) and re-records docs/baseline-stages.json on the merged tree: main's 5,536 assertions plus this PR's three SPARC-TRAP-RESUME keys (5,539). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Resolves the stage-corpus count (937) and re-records docs/baseline-stages.json on the merged tree: main's 5,540 assertions plus this PR's three SPARC-TRAP-RESUME keys (5,543). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Keeps the stage-corpus count at 937 and re-records docs/baseline-stages.json on the merged tree: main's 5,542 assertions plus this PR's three SPARC-TRAP-RESUME keys (5,545). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
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.
A machine instruction can call a helper and then explicitly resume at a non-fallthrough address. If that address also names a function, Kuna emits a false tail call.
On a clean
maincheckout, apply only the test fixture and run it:git fetch https://github.com/thotypous/kuna.git kuna-post-call-resume git diff 477cb29ed FETCH_HEAD -- \ decompiler/crates/kuna-cli/tests/{integration,post_call_resume}.rs | git apply cd decompiler cargo test -p kuna-cli --test integration post_call_resume:: -- --nocaptureThe direct and indirect cases emit
return direct_resume();andreturn indirect_resume();. They should return0x2aand0x11from the resumed instructions.main.Dependency for the Carmel PR (#1936): this follows a call’s encoded resume edge during lifting.
Model:
openai-codex/gpt-6.2-sol