diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-05-25 15:36:46 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-05-25 15:36:46 -0700 |
commit | 959218673db6737d65014f93208b9240c85eb8a6 (patch) | |
tree | 2e04fac274f527072108bb42850a360134cd8027 /benchmarks/common | |
parent | 7917324486685f738ea165642e25bfb997a69c2d (diff) | |
download | riscv-tests-959218673db6737d65014f93208b9240c85eb8a6.zip riscv-tests-959218673db6737d65014f93208b9240c85eb8a6.tar.gz riscv-tests-959218673db6737d65014f93208b9240c85eb8a6.tar.bz2 |
Keep tohost/fromhost at deterministic address
Diffstat (limited to 'benchmarks/common')
-rw-r--r-- | benchmarks/common/crt.S | 8 | ||||
-rw-r--r-- | benchmarks/common/syscalls.c | 4 | ||||
-rw-r--r-- | benchmarks/common/test.ld | 10 |
3 files changed, 15 insertions, 7 deletions
diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index 634b864..7c8fc19 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -223,3 +223,11 @@ _tdata_end: .section ".tbss.end" .globl _tbss_end _tbss_end: + +.section ".tohost","aw",@progbits +.align 6 +.globl tohost +tohost: .dword 0 +.align 6 +.globl fromhost +fromhost: .dword 0 diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c index 9c72e36..0a43878 100644 --- a/benchmarks/common/syscalls.c +++ b/benchmarks/common/syscalls.c @@ -14,8 +14,8 @@ // initialized in crt.S int have_vec; -volatile uint64_t tohost __attribute__((aligned(64))); -volatile uint64_t fromhost __attribute__((aligned(64))); +extern volatile uint64_t tohost; +extern volatile uint64_t fromhost; static long handle_frontend_syscall(long which, long arg0, long arg1, long arg2) { diff --git a/benchmarks/common/test.ld b/benchmarks/common/test.ld index 7ee56b6..dd32bb1 100644 --- a/benchmarks/common/test.ld +++ b/benchmarks/common/test.ld @@ -22,11 +22,11 @@ SECTIONS /* text: test code section */ . = 0x80000000; - .text : - { - crt.o(.text) - *(.text) - } + .text.init : { crt.o(.text) } + + .tohost ALIGN(0x1000) : { *(.tohost) } + + .text : { *(.text) } /* data segment */ .data : { *(.data) } |