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

compiler: remove support for memory references in AsmFull #2790

Merged
merged 2 commits into from
Apr 21, 2022

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Apr 20, 2022

Memory references (*m in LLVM IR inline assembly) need a pointer type starting in LLVM 14. This is a bit inconvenient and requires a new API in the go-llvm package.

Instead of doing that, I'd like to remove support for memory references from AsmFull (and possibly AsmFull entirely if possible: it's hard to use correctly).

This breaks tinygo.org/x/drivers/ws2812 for AVR, ARM, and RISC-V which need to be updated. Probably using CGo.

This means fewer instances of arm.AsmFull, which I'd like to remove
eventually if possible.
Memory references (`*m` in LLVM IR inline assembly) need a pointer type
starting in LLVM 14. This is a bit inconvenient and requires a new API
in the go-llvm package.

Instead of doing that, I'd like to remove support for memory references
from AsmFull (and possibly AsmFull entirely if possible: it's hard to
use correctly).

This breaks tinygo.org/x/drivers/ws2812 for AVR, ARM, and RISC-V which
need to be updated. Probably using CGo.
@deadprogram
Copy link
Member

Tested with tinygo-org/drivers#401 which was merged, and worked as expected. Is there something else I am missing here or can we merge now?

@deadprogram
Copy link
Member

Merging since it is working for me.

@deadprogram deadprogram merged commit cad6a57 into dev Apr 21, 2022
@deadprogram deadprogram deleted the inline-asm-pointer branch April 21, 2022 13:18
aykevl added a commit to tinygo-org/tinygo-site that referenced this pull request Apr 21, 2022
For details, see:
  * tinygo-org/drivers#401
  * tinygo-org/tinygo#2790

Essentially, this updates the inline assembly to the current best
practice.
@aykevl
Copy link
Member Author

aykevl commented Apr 21, 2022

Is there something else I am missing here or can we merge now?

I doubt inline assembly is used in many places. But the docs need to be updated, for which I've created a PR: tinygo-org/tinygo-site#258

deadprogram pushed a commit to tinygo-org/tinygo-site that referenced this pull request Apr 22, 2022
For details, see:
  * tinygo-org/drivers#401
  * tinygo-org/tinygo#2790

Essentially, this updates the inline assembly to the current best
practice.
deadprogram pushed a commit to tinygo-org/tinygo-site that referenced this pull request Apr 29, 2022
For details, see:
  * tinygo-org/drivers#401
  * tinygo-org/tinygo#2790

Essentially, this updates the inline assembly to the current best
practice.
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.

2 participants