-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Arm 64-bit port #4176
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
Comments
What would need to be changed for 64-bit port? |
Well, it's a completely different instruction set. |
On a PI3-B (old version without "+") running Devuan2 ...
... MicroPython builds without problems:
|
So micropython works even without an assembly emitter for the architecture? I saw that there are only for x86, x86_64 and arm, and it looked like a new arm64 emitter was needed. |
Actually, you may still be compiling it for 32-bit. Can you run |
|
Interesting. How does micropython work there? Is it just a pure interpreter? |
Summary of
I have no idea how severe the 2 fails are. Let's wait for the MicroPython demigods explaining it. |
By default code is compiled to bytecode which is interpreted. However it can emit native machine code using @micropython.native or @micropython.viper decorators, and it also enables writing inline assembler. Clearly these features would need to be ported to a new instruction set. @dpgeorge is the FP guru but I guess that by default MicroPython assumes a 32 bit hardware FPU. This is just a guess - I haven't studied the code. |
I've just compiled the minimal unix target it in my RPi3+ with Fedora (aarch64) and it works out of the box indeed. I guess it's slower than having the machine code compiler but it does the trick for me. |
uPy works also on a Renesas RCar-M3 (AArch64), compiled with linaro-toolchain. no big changes necessary. But FPU does not work. |
@AntonioND I'm not saying this is exhaustive but here's the two major configurations you have to set up that depend on 32- vs 64-bit.
|
Is anyone working on porting py/dynruntime.mk and all it requires to aarch64? |
@egbit you can try do add something like the following to
|
@jonnor I get the impression that @egbit's question is about cross-compiling. To support aarch64 for dynamic native modules there's more work to be done, mostly in I'm going to close this issue because the original issue is solved (there's NLR and GC support for aarch64). There is not yet a native emitter, but as @peterhinch has pointed out this is not necessary. MicroPython just uses the compiler's floating point support (and optionally you can use our libm) so setting |
Is there anyone working on a AArch64 port? I know that you can run a 32-bit binary in a 64-bit system, but there are some restrictions so it would still be nice to have it.
The text was updated successfully, but these errors were encountered: