Merge branch 'riscv64-sdi' into 'master'

am: add riscv64-sdi

See merge request projectn/nexus-am!41
This commit is contained in:
Zihao Yu 2020-04-22 16:45:56 +08:00
commit 5548c7d541
3 changed files with 5 additions and 1 deletions

3
am/arch/riscv64-sdi.mk Normal file
View File

@ -0,0 +1,3 @@
include $(AM_HOME)/am/arch/isa/riscv64.mk
include $(AM_HOME)/am/arch/platform/sdi.mk
AM_SRCS += nemu/isa/riscv/boot/start.S

View File

@ -0,0 +1 @@
#include "riscv64-nemu.h"

View File

@ -25,7 +25,7 @@ void _halt(int code) {
asm volatile (".byte 0xd6" : :"a"(code));
#elif defined(__ISA_MIPS32__)
asm volatile ("move $v0, %0; .word 0xf0000000" : :"r"(code));
#elif defined(__ISA_RISCV32__)
#elif defined(__ISA_RISCV32__) || defined(__ISA_RISCV64__)
asm volatile("mv a0, %0; .word 0x0000006b" : :"r"(code));
#else
#error unsupport ISA