Closed Kuratius closed 1 week ago
This may be an issue with these instructions not being supported in devKitPro, but could also be an issue with the makefile. I reused the helloworld makefile from this project, which seems to target the arm9 cpu.
Talked to someone else, apparently the issue is that the Makefile for this example is missing -march=armv5te in the ARCH section. In addition, the assembly needs the information that the label is a function label via .type LABELNAME, %function.
Sorry to take a while getting back round to this. We've had a big refactor in the works for a while that we had hoped to make public much earlier. Amongst the many fixes and refactors we did was moving the architecture flags to the ARCH variable in the Makefiles where it probably should have been in the first place. See https://github.com/devkitPro/nds-examples/commit/bd322e3a5eabcfb52384f897e34684f83b7b00ce
We also provide a BEGIN_ASM_FUNC macro in libnds which provides the necessary type as well as putting the function in it's own section to support the linker in stripping unused functions from the final binary. https://github.com/devkitPro/libnds/blob/master/include/nds/asminc.h
Bug Report
What's the issue you encountered?
I tried to use an arm assembly function written using custom instructions only avaible on the arm9 core of the dsi in the hello world program in this project. http://www.coranac.com/2009/07/sines/
How can the issue be reproduced?
put this into a file called sin.s
and try to compile the following using the make command:
Environment?