Can this run in Switch?
RandyGaul opened this issue · 2 comments
Probably a super easy question to answer, but I'm sort of a noob at this. Wikipedia says (https://en.wikipedia.org/wiki/ARM_Cortex-A57) the CPU is ARMv8-A 64-bit instruction set
, does that mean it would fall under the ARM64 assembly implementation?
I think so. I usually test aarch64, arm and other architectures with QEMU, here is an example confirming that minicoro seems to work on ARM_Cortex-A57:
$ aarch64-linux-gnu-gcc tests/testsuite.c -I. -o test -O3 -march=armv8-a -mtune=cortex-a57 -static
$ qemu-aarch64 ./test
hello
world!
hello 2
world! 2
Test suite succeeded!
Note that I've used -march=armv8-a -mtune=cortex-a57
to force generating instructions for ARM Cortex A57.
But sometimes testing outside the actual OS that will be running is not enough, for example the Windows x86_64 assembly implementation is different from Linux x86_64 assembly implementation, despite both running on the same hardware, because Windows OS has some ABI rules that must be respected when switching the context, otherwise some internal Windows functions would break.
Also using another compiler is not ideal, different compilers may handle/generate assembly in different way, so to actually confirm if minicoro works on Nintendo Switch is best if someone could use the actual Nintendo Switch compiler, and run it in its actual hardware or in the official emulator. I think there are some free Nintendo Switch emulators out there, maybe one could be used for testing.
Okay makes sense, I won't be testing it myself anytime soon but was curious. Closing for now :)