-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Feature request: inline assembly clobbering #1996
Comments
Do you have any suggested syntax? |
not at all but here goes some:
another thing i though was explicit input/output operands maybe using attributes style? |
Umm.. did you test the asm syntax yet? |
i haven't figure out how to do blocks and i think processing asm blocks at the end is a bad idea in some cases like: u32 cr0;
asm volatile ("mov %%cr0, %0" : "=r" (cr0));
cr0 |= 1 << 31;
asm volatile ("mov %0, %%cr0" : : "r" (cr0)); |
this is an example in C |
The way asm works in C3 is like: int x;
asm
{
in $eax, 3;
in $ax, $dx;
incb $al;
incl [&x];
...
} A clobber would perhaps look like asm
{
@invalidate($eax);
@invalidate(mem);
} |
yeah that looks nice |
No description provided.
The text was updated successfully, but these errors were encountered: