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

Port some platforms from llvm_asm to asm #33

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

niluxv
Copy link

@niluxv niluxv commented Jan 30, 2022

Only ports platforms where the required changes are trivial.

The reason for this change is that llvm_asm is removed from nightly, so it
doesn't compile any more on any current compiler, while asm is being stabilised
(currently stable on beta).

The major omission in this commit is the linux x86 (32 bit) platform. The new asm
macro doesn't allow the esi and ebp registers to be used as inputs or outputs or
clobbers, which makes the port non-trivial for this platform. Similarly on armeabi
the r6 register is not allowed as input, output or clobber.

…rivial

The reason for this change is that `llvm_asm` is removed from nightly, so it
doesn't compile anymore on any current compiler, while `asm` is being stabilised
(currently stable on beta).

The major omission in this commit is the linux x86 (32 bit) platform. The new `asm`
macro doesn't allow the esi and ebp registers to be used as inputs or outputs or
clobbers, which makes the port non-trivial for this platform. Similarly on armeabi
the r6 register is not allowed as input, output or clobber.
@niluxv
Copy link
Author

niluxv commented Jan 30, 2022

The issues mentioned for x86 and armeabi can be worked around by a trick similar to what is already deployed for syscall6 on x86, with the added limitation that we can clobber esi and ebp (so they need to be pushed and pulled to/from the stack). But some experimenting on Godbolt shows that such an approach turns into every inefficient assembly.

@japaric
Copy link
Owner

japaric commented Feb 4, 2022

Thanks!

@japaric japaric merged commit c0ab4c2 into japaric:master Feb 4, 2022
@japaric
Copy link
Owner

japaric commented Feb 4, 2022

release v0.2.6 includes this PR

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.

None yet

2 participants