diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-04-26 12:25:01 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-04-26 12:25:01 -0700 |
commit | b3999a33b7bf9c115b095b56976394b19f825ff3 (patch) | |
tree | 77d97aebb98a087c1260bfcc8e3b283d613f571d | |
parent | 0d53d12133bd3f7dce0e3731a5bc7dc0c1facc9d (diff) | |
download | riscv-tests-b3999a33b7bf9c115b095b56976394b19f825ff3.zip riscv-tests-b3999a33b7bf9c115b095b56976394b19f825ff3.tar.gz riscv-tests-b3999a33b7bf9c115b095b56976394b19f825ff3.tar.bz2 |
Add abort() for benefit of benchmark code
-rw-r--r-- | benchmarks/common/syscalls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c index 4940aa2..0a7d6b7 100644 --- a/benchmarks/common/syscalls.c +++ b/benchmarks/common/syscalls.c @@ -5,6 +5,7 @@ #include <stdarg.h> #include <stdio.h> #include <limits.h> +#include <sys/signal.h> #include "util.h" #define SYS_write 64 @@ -68,6 +69,11 @@ void exit(int code) tohost_exit(code); } +void abort() +{ + exit(128 + SIGABRT); +} + void printstr(const char* s) { syscall(SYS_write, 1, (uintptr_t)s, strlen(s)); |