diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-05-21 23:16:45 +0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-02-04 19:02:19 -0500 |
commit | b9249c461c72b35dd9b6f274406c336f6a68ae98 (patch) | |
tree | 2f2314445c8c95e8dc1c3c8de6d824e9042b15fe /sim/common | |
parent | a9ab6e2ea07829d89b97d1f47ecb524c251252e7 (diff) | |
download | gdb-b9249c461c72b35dd9b6f274406c336f6a68ae98.zip gdb-b9249c461c72b35dd9b6f274406c336f6a68ae98.tar.gz gdb-b9249c461c72b35dd9b6f274406c336f6a68ae98.tar.bz2 |
sim: riscv: new port
This is a hand-written implementation that should have fairly complete
coverage for the base integer instruction set ("i"), and for the atomic
("a") and integer multiplication+division ("m") extensions. It also
covers 32-bit & 64-bit targets.
The unittest coverage is a bit weak atm, but should get better.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 6 | ||||
-rwxr-xr-x | sim/common/gennltvals.py | 2 | ||||
-rw-r--r-- | sim/common/nltvals.def | 48 |
3 files changed, 56 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 6b07d2f..d1a1526 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2021-02-04 Mike Frysinger <vapier@gentoo.org> + + * gennltvals.py (TARGETS): Add riscv. + (TARGET_DIRS): Likewise. + * nltvals.def: Regenerate from the latest libgloss sources. + 2021-01-31 Mike Frysinger <vapier@gentoo.org> * cgen-trace.c (cgen_trace_insn): Add "%s" argument. diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py index 3ca510d..23b2187 100755 --- a/sim/common/gennltvals.py +++ b/sim/common/gennltvals.py @@ -50,6 +50,7 @@ TARGET_DIRS = { 'd10v': 'newlib/libc/sys/d10v/sys', 'i960': 'libgloss/i960', 'mcore': 'libgloss/mcore', + 'riscv': 'libgloss/riscv/machine', 'v850': 'libgloss/v850/sys', } TARGETS = { @@ -66,6 +67,7 @@ TARGETS = { 'mn10300', 'msp430', 'pru', + 'riscv', 'sparc', 'v850', } diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def index 4ab0564..6f93316 100644 --- a/sim/common/nltvals.def +++ b/sim/common/nltvals.def @@ -546,6 +546,54 @@ /* end pru sys target macros */ #endif #endif +#ifdef NL_TARGET_riscv +#ifdef sys_defs +/* from syscall.h */ +/* begin riscv sys target macros */ + { "SYS_access", 1033 }, + { "SYS_brk", 214 }, + { "SYS_chdir", 49 }, + { "SYS_close", 57 }, + { "SYS_dup", 23 }, + { "SYS_exit", 93 }, + { "SYS_exit_group", 94 }, + { "SYS_faccessat", 48 }, + { "SYS_fcntl", 25 }, + { "SYS_fstat", 80 }, + { "SYS_fstatat", 79 }, + { "SYS_getcwd", 17 }, + { "SYS_getdents", 61 }, + { "SYS_getegid", 177 }, + { "SYS_geteuid", 175 }, + { "SYS_getgid", 176 }, + { "SYS_getmainvars", 2011 }, + { "SYS_getpid", 172 }, + { "SYS_gettimeofday", 169 }, + { "SYS_getuid", 174 }, + { "SYS_kill", 129 }, + { "SYS_link", 1025 }, + { "SYS_lseek", 62 }, + { "SYS_lstat", 1039 }, + { "SYS_mkdir", 1030 }, + { "SYS_mmap", 222 }, + { "SYS_mremap", 216 }, + { "SYS_munmap", 215 }, + { "SYS_open", 1024 }, + { "SYS_openat", 56 }, + { "SYS_pread", 67 }, + { "SYS_pwrite", 68 }, + { "SYS_read", 63 }, + { "SYS_rt_sigaction", 134 }, + { "SYS_stat", 1038 }, + { "SYS_time", 1062 }, + { "SYS_times", 153 }, + { "SYS_uname", 160 }, + { "SYS_unlink", 1026 }, + { "SYS_write", 64 }, + { "SYS_writev", 66 }, +/* end riscv sys target macros */ +#endif +#endif #ifdef NL_TARGET_sparc #ifdef sys_defs /* from syscall.h */ |