Skip to content
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

exception & syscall handler improvements #91

Merged
merged 8 commits into from
Nov 2, 2024
Merged

Conversation

Freax13
Copy link
Owner

@Freax13 Freax13 commented Nov 2, 2024

No description provided.

Regular asm! blocks are tricky because there's no guarantee that the
compiler will emit them exactly once into the binary. This guarantee
doesn't technically exist for global_asm! either, but the compiler is
much more restricted in the optimizations (e.g. inlining) it can
perform.
There's no good reason to save and restore caller-saved registers.
Previously we have to initialize it everytime because the compiler was
allowed to instantiate the inline assembly more than once. This is
technically still true, but doesn't matter much because there's no
surrounding relevant context (e.g. code in a function the asm block was
inlined into that could be present for normal inline assembling block).
Much like with the syscall entrypoint, now that we use global_asm! we
can rely on a single address for the label.
The Rust compiler assumes that the direction flag is unset.
@Freax13 Freax13 force-pushed the fix/exception-handlers branch from e136217 to 351dcba Compare November 2, 2024 08:46
@Freax13 Freax13 merged commit 27f7ade into main Nov 2, 2024
50 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.

1 participant