asmjit icon indicating copy to clipboard operation
asmjit copied to clipboard

ARM Port

Open kobalicek opened this issue 10 years ago • 20 comments

Long time planned feature to have also backend for 32-bit and 64-bit ARM, including NEON.

kobalicek avatar Feb 15 '15 16:02 kobalicek

Just out of curiosity, what ARM device do you have? Just in case, know that testing low-level ARM stuff on Android is more painful that it seems.

refi64 avatar Feb 15 '15 20:02 refi64

I'm gonna buy ODroid for testing; it seems it's the easiest way and it's just ~$30. I have cyanogenmod on my phone, but I didn't find it friendly for development.

kobalicek avatar Feb 15 '15 20:02 kobalicek

Well, I have a Raspberry Pi running Pidora, and another one that I'm going to put Plan 9 on, and I can completely say that it is great for any kind of development.

refi64 avatar Feb 15 '15 20:02 refi64

Cool, you should then try asmjit on plan9 ;)

RPI would be an alternative if there is no ODroid; I have actually worked with ODroid before and it has really nice specs, that's the only reason I'm gonna buy ODroid instead of RPi. And, it has more cores, so I can do more testing with blend2d.com

kobalicek avatar Feb 15 '15 21:02 kobalicek

@kobalicek I have a TX1 running Ubuntu to which I could probably provide access if it would help this effort.

jrk avatar Jan 09 '16 19:01 jrk

I bought RPi 2 for experimenting with ARM, but haven't have the time to actually start porting asmjit. I'm planning to start writing ARM assembly soon (in 1 to 2 months). I don't know yet architecture differences, but it would try to support both 32-bit and 64-bit ARMs. However, I didn't read AArch64 spec yet, so I don't know how much they share.

kobalicek avatar Jan 10 '16 02:01 kobalicek

Just to inform people watching this. I'm able to compile asmjit on ARM, but it can only generate x86/x64 code. I started designing a single backend that can target ARM32 and ARM64 (like X86 backend does). There are huge differences between these two architectures, so I'm still not sure if I should split them or not.

kobalicek avatar Jan 21 '16 19:01 kobalicek

@jrk I checked this TX1 and it's damn expensive and powerful machine. When I finish my ARM work I'm definitely interested to try it out, SSH access with MC installed would be enough I guess :)

kobalicek avatar Jan 21 '16 19:01 kobalicek

Would also appreciate an ARM backend :+1:

feliwir avatar Mar 05 '16 17:03 feliwir

i already started working on it, but no schedule yet

kobalicek avatar Mar 06 '16 00:03 kobalicek

Hi @kobalicek. I'm interested in contributing to this and would like to know if there is anything I can do to help out. Is the branch you're working on for the ARM port available? I have hardware for ARM v6/v7/v8 as well as Cortex .

jamesclampffer avatar Jan 15 '17 22:01 jamesclampffer

The branch with some ARM code is next-wip, but it's not working (it won't compile if you enable ARM). I mean it's an experimental branch where I work on a new register allocator for asmjit's CodeCompiler, and also occasionally on ARM port, but I haven't finished even ARM instructions database yet.

You can join asmjit's gitter if you want to chat about it, but in short, to make ARM working the generate-arm.js tool would need to be completed and some functionality added to A32Assembler. I'm still undecided whether it should have a single ArmAssembler for both A32 and A64 or if they should be separate assemblers, as A64 is quite different.

kobalicek avatar Jan 15 '17 23:01 kobalicek

A32 and A64 really have little in common, A64 is more like a MIPS with a bit of ARM flavour than an upgraded ARM32. While a few things make sense to reuse between the backends (like computing of NEON constants), two separate backends with shared utility code makes more sense than trying to make an awkwardly merged one.

hrydgard avatar Apr 20 '17 20:04 hrydgard

Yeah it's pity I cannot create something that was working really well in X86 backend. I would like to share instruction database at least, but also I'm not sure whether it's possible. Not all things are different, but changing instruction names and operand attributes is kinda insane. Different aliasing of NEON registers also complicates the situation a bit, so it seems that there will really be separate backends for A32 and A64.

kobalicek avatar Apr 20 '17 20:04 kobalicek

Do you know possibly ewhen the x86/64 ARM library will be available for use?

AndroDevcd avatar Sep 10 '19 13:09 AndroDevcd

Very low priority at the moment unless there is a company that wants to sponsor the effort at least partially.

kobalicek avatar Sep 10 '19 20:09 kobalicek

aarch64 & x64 is urgent need, very i this project.

zhuguangxiang avatar Feb 09 '21 03:02 zhuguangxiang

There is already aarch64 branch that provides Assembler/Builder/Compiler support for AArch64.

kobalicek avatar Feb 09 '21 08:02 kobalicek

Maybe there is some place to leverage the SIMDe header-only library (not just for ARM, but PPC etc.).

And maybe also for Blend2D...

dumblob avatar Apr 17 '21 10:04 dumblob

No that's a totally different thing than what AsmJit does.

kobalicek avatar Apr 29 '21 15:04 kobalicek

Closing in favor of https://github.com/asmjit/asmjit/issues/430

kobalicek avatar Feb 13 '24 20:02 kobalicek