Has anyone compiled angelscript on aarch64?

Started by
11 comments, last by WitchLord 2 years ago

For last week I've trying to launch native calling on armv8a, and wrote brutal asm ( https://www.codepile.net/pile/Y2xR7p1x​ ), and always lost some of the references in runtime.

Since I'm not really good at ASM, and obviously ASM in ARM, maybe someone in the community has done this in the past

--Alex

Advertisement

I don't think anyone has. At least nobody has shared any code for native calling conventions in arm64 with me so far.

How far have you got it to work?

I always recommend starting small, e.g. start with getting a call to a global function without any arguments working first. Then incrementally add complexity to the function signature, e.g. call an object method without any arguments, then add integer arguments, then float arguments.

Only when you're able to call functions with primitive arguments properly should you worry about calling functions with objects by value. These are usually the trickiest part to get working.

In the test_feature regression test suite I have several tests written to try to cover as much complexity as possible for native calling convention.

Look for the following code in the main function in the test_feature code.

http://svn.code.sf.net/p/angelscript/code/trunk/sdk/tests/test_feature/source/main.cpp

	// The following tests are designed specifically to test the native calling conventions.
	// These are grouped by calling convention and ordered in increasing complexity.
	{
		// cdecl
		if( TestExecute()                 ) goto failed; else PRINTF("-- TestExecute passed\n");
		if( TestCDeclReturn::Test()       ) goto failed; else PRINTF("-- TestCDeclReturn passed\n");

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Hi, I was just ponderind the very same thing as I'm trying to port some Linux code to 64-bit Android. I've done 32-bit ARM assembly in the past, I suppose I could collaborate on this one to get this working.

That would be great. I don't have much time to spend on AngelScript at the moment, but if you post here on your progress I'll check on it and help when I can.

If we can just get the ball going I'm sure others would be willing to help out too.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Indeed. Its not super high priority for me yet, as we can work on 32-bit JNI with 64-bit Android, but it will become certainly an issue soon.

Best thing would probably to do a github fork for this, so all could collaborate. olexandr, sisnce you've done work already, would you like to fork and push your changes?

I'm also thinking about the development environment for this, Android kinda sucks for this type of work. Probably should install 64-bit debian to raspberry, I believe there are some experimental distros for that.

Max Waine from Night Dive Studios has implemented the support for native calling conventions on Linux with arm64.

It is available in revision 2666.

Other OS's should be relatively easy to add now based on this first implementation.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Go Max!

I'll try recompile as soon as I'm back from summer vacation.

Hi, to continue on this - I did integrate that 64-bit port.

But it also crashes often, so I'm not convinced that its totally 64-bit pure.

I've had to fall back so far to 32-bit.

Is there any other users here with aarch64 - on Android?

Note, the arm64 support implemented by Max is for Linux. Android is very likely to have some differences in the ABI as was the case for arm32.

Can you run the regression test suite from the angelscript repository on your Android with arm64?

http://svn.code.sf.net/p/angelscript/code/trunk/sdk/tests/test_feature/

It has a android project, but it was for arm32, and it has been a while since I ran it so it may need some updates.

If you can help get that up and running, I may be able to help point out what needs to be modified to get the arm64 support on Android fully working.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I will face the same problem in the future, so I decide to bind all function calls with asCALL_GENERIC. Hopefully this would avoid most ABI issues.

This topic is closed to new replies.

Advertisement