projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d53d12
)
Add abort() for benefit of benchmark code
author
Andrew Waterman
<andrew@sifive.com>
Wed, 26 Apr 2017 19:25:01 +0000
(12:25 -0700)
committer
Andrew Waterman
<andrew@sifive.com>
Wed, 26 Apr 2017 19:25:01 +0000
(12:25 -0700)
benchmarks/common/syscalls.c
patch
|
blob
|
history
diff --git
a/benchmarks/common/syscalls.c
b/benchmarks/common/syscalls.c
index 4940aa24b9f31b02d0f81cea38ccd6be948525d1..0a7d6b728f633304d9b3aa9e01ecb2b8ddf6f57c 100644
(file)
--- 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));