aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/common
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/common')
-rw-r--r--benchmarks/common/crt-mt.S6
-rw-r--r--benchmarks/common/syscalls.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/benchmarks/common/crt-mt.S b/benchmarks/common/crt-mt.S
index 283b3bf..7f35f9b 100644
--- a/benchmarks/common/crt-mt.S
+++ b/benchmarks/common/crt-mt.S
@@ -96,7 +96,7 @@ _start:
mfpcr a0,cr10
lw a1, 4(zero)
- slli a2, a0, 13
+ slli a2, a0, 16
la sp, stacktop
sub sp, sp, a2
@@ -110,7 +110,7 @@ _start:
.globl tlstop
.align 4
- .skip 32768
+ .skip 131072
stacktop:
- .skip 65536
+ .skip 131072
tlstop:
diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c
index f95dde4..a882462 100644
--- a/benchmarks/common/syscalls.c
+++ b/benchmarks/common/syscalls.c
@@ -6,7 +6,7 @@
void exit(int code)
{
volatile uint64_t magic_mem[8] = {0};
- magic_mem[0] = 1;
+ magic_mem[0] = 93;
magic_mem[1] = code;
__sync_synchronize();
mtpcr(PCR_TOHOST, (long)magic_mem);
@@ -16,7 +16,7 @@ void exit(int code)
void printstr(const char* s)
{
volatile uint64_t magic_mem[8] = {0};
- magic_mem[0] = 4;
+ magic_mem[0] = 64;
magic_mem[1] = 1;
magic_mem[2] = (unsigned long)s;
magic_mem[3] = strlen(s);
@@ -28,8 +28,8 @@ void printstr(const char* s)
int putchar(int ch)
{
#define buffered_putch_bufsize 64
- static char buf[buffered_putch_bufsize];
- static int buflen = 0;
+ static __thread char buf[buffered_putch_bufsize];
+ static __thread int buflen = 0;
if(ch != -1)
buf[buflen++] = ch;
@@ -37,7 +37,7 @@ int putchar(int ch)
if(ch == -1 || buflen == buffered_putch_bufsize)
{
volatile uint64_t magic_mem[8] = {0};
- magic_mem[0] = 4;
+ magic_mem[0] = 64;
magic_mem[1] = 1;
magic_mem[2] = (long)buf;
magic_mem[3] = buflen;