commit f3444ea0eccc0dc1eb9399f8085ca7eabb48eeb2 from: Benjamin Stürz date: Wed Apr 10 11:10:35 2024 UTC Port to arm64 commit - 72b297959e4fd27abedaea0b12e097d9c9060034 commit + f3444ea0eccc0dc1eb9399f8085ca7eabb48eeb2 blob - e4e6ab34f754a4c403a02e790b58320fbba2aac4 blob + bfeb1e67a903cef35097bb4b7d05e2551d92daa3 --- README +++ README @@ -29,6 +29,7 @@ Example for the cat.elf program: Due to design decisions, only 64bit archs can be supported: - amd64 +- arm64 Note: Once I get more hardware, I can port it to other architectures. blob - cc5b1e19fab3265bfb05034c4cc394d07defbbfc blob + 075f9f812a8cba378fee259e930a8050d929f4c7 --- src/cpu.c +++ src/cpu.c @@ -372,7 +372,7 @@ void cpu_exec (u32 instr) case 0b1110011: // ecall/ebreak if ((instr >> 20) & 1) { eprintf ("%08"PRIx64": ebreak\n", pc - 4); - __asm __volatile__ ("int $3"); + __builtin_trap (); } else { ecall (); }