Skip to content

Fix linux-raw inline asm for thumb-mode. #416

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

Merged
merged 5 commits into from
Sep 27, 2022
Merged

Conversation

sunfishcode
Copy link
Member

In thumb-mode, r7 is reserved as the frame pointer and isn't permitted as an inline asm operand. It's still the syscall-number operand in syscalls though, so pass the syscall-number operand in in a separate register, copy it into r7 inside the inline asm, and then restore the value of r7 when we're done.

In thumb-mode, r7 is reserved as the frame pointer and isn't permitted
as an inline asm operand. It's still the syscall-number operand in
syscalls though, so pass the syscall-number operand in in a separate
register, copy it into r7 inside the inline asm, and then restore the
value of r7 when we're done.
@sunfishcode
Copy link
Member Author

In theory this fixes #415, but I haven't tested it yet.

@sunfishcode
Copy link
Member Author

I've now tested this with some custom target configuration.

@sunfishcode sunfishcode merged commit ebf562f into main Sep 27, 2022
@sunfishcode sunfishcode deleted the sunfishcode/thumb branch September 27, 2022 22:11
sunfishcode added a commit that referenced this pull request Sep 27, 2022
* Fix linux-raw inline asm for thumb-mode.

In thumb-mode, r7 is reserved as the frame pointer and isn't permitted
as an inline asm operand. It's still the syscall-number operand in
syscalls though, so pass the syscall-number operand in in a separate
register, copy it into r7 inside the inline asm, and then restore the
value of r7 when we're done.

* Add a thumbv7neon-unknown-linux-gnueabihf line to CI.
sunfishcode added a commit that referenced this pull request Sep 27, 2022
* Fix linux-raw inline asm for thumb-mode.

In thumb-mode, r7 is reserved as the frame pointer and isn't permitted
as an inline asm operand. It's still the syscall-number operand in
syscalls though, so pass the syscall-number operand in in a separate
register, copy it into r7 inside the inline asm, and then restore the
value of r7 when we're done.

* Add a thumbv7neon-unknown-linux-gnueabihf line to CI.
sunfishcode added a commit that referenced this pull request Sep 27, 2022
* Fix linux-raw inline asm for thumb-mode.

In thumb-mode, r7 is reserved as the frame pointer and isn't permitted
as an inline asm operand. It's still the syscall-number operand in
syscalls though, so pass the syscall-number operand in in a separate
register, copy it into r7 inside the inline asm, and then restore the
value of r7 when we're done.

* Add a thumbv7neon-unknown-linux-gnueabihf line to CI.
nibon7 added a commit to nibon7/nushell that referenced this pull request Sep 28, 2022
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