From: Andrew Waterman Date: Wed, 26 Apr 2017 19:25:01 +0000 (-0700) Subject: Add abort() for benefit of benchmark code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3999a33b7bf9c115b095b56976394b19f825ff3;p=riscv-tests.git Add abort() for benefit of benchmark code --- 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 #include #include +#include #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));