Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
kirara
Compiler2023-kirara
Commits
b2830855
Commit
b2830855
authored
1 year ago
by
kirara
Browse files
Options
Download
Patches
Plain Diff
chore: add qemu flags
parent
ab169923
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script/testbench.sh
+16
-5
script/testbench.sh
with
16 additions
and
5 deletions
+16
-5
script/testbench.sh
+
16
−
5
View file @
b2830855
...
...
@@ -15,7 +15,7 @@ testbench_root=${KIRARA_BENCH:-"$kirara_root/testbench"}
sysyc
=
${
KIRARA_SYSYC
:-
"target/debug/compiler"
}
# location of (riscv) compiler (for assembly and linking)
_host
=
$(
uname
-m
)
case
$host
in
case
$
_
host
in
riscv64
)
_default_cc
=
${
KIRARA_CC
:-
"gcc"
}
;;
...
...
@@ -26,11 +26,22 @@ esac
cc
=
${
KIRARA_CC
:-
$_default_cc
}
# extra flags
cflags
=
${
KIRARA_CFLAGS
:-
"-L
$testbench_root
-lsysy"
}
# qemu config
case
$_host
in
riscv64
)
qemu
=
qemu_flags
=
;;
*
)
qemu
=
${
KIRARA_QEMU
:-
"qemu-riscv64-static"
}
qemu_flags
=
${
KIRARA_QEMU_FLAGS
:-
"-cpu rv64,zba=true,zbb=true"
}
;;
esac
# enabled benchmarks
benchmarks
=(
debug
#
debug
functional
#
hidden_functional
hidden_functional
# performance
# hidden_performance
)
...
...
@@ -104,9 +115,9 @@ function run_test_case() {
export
QEMU_LD_PREFIX
=
$kirara_sysroot
# input is optional
if
[
!
-f
$_input
]
;
then
$_out
>
$_output
$qemu
$qemu_flags
$_out
>
$_output
else
$_out
<
$_input
>
$_output
$qemu
$qemu_flags
$_out
<
$_input
>
$_output
fi
# read from _output
_exit_code
=
$?
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets