aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in3
-rw-r--r--README.md61
-rwxr-xr-xscripts/generate_target_board24
-rwxr-xr-xscripts/wrapper/spike/riscv64-unknown-linux-gnu-run3
4 files changed, 74 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in
index a1f677a..c849d77 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -996,7 +996,8 @@ stamps/check-gcc-linux: stamps/build-gcc-linux-stage2 $(SIM_STAMP) stamps/build-
mkdir -p $(dir $@)
date > $@
-stamps/check-glibc-linux-%: $(addprefix stamps/build-glibc-linux-,$(GLIBC_MULTILIB_NAMES))
+stamps/check-glibc-linux-%: stamps/build-gcc-linux-stage2 $(SIM_STAMP) stamps/build-dejagnu \
+ $(addprefix stamps/build-glibc-linux-,$(GLIBC_MULTILIB_NAMES))
$(eval $@_BUILD_DIR := $(notdir $@))
$(eval $@_BUILD_DIR := $(subst check-,build-,$($@_BUILD_DIR)))
$(SIM_PREPARE) $(MAKE) -C $($@_BUILD_DIR) check
diff --git a/README.md b/README.md
index 0284268..7aab3c1 100644
--- a/README.md
+++ b/README.md
@@ -289,14 +289,59 @@ even multilib is disable, but the user must ensure extra multilib test
configuration can be work with existing lib/multilib, e.g. rv32gcv/ilp32 test
can't work if multilib didn't have any rv32 multilib.
-`--with-extra-multilib-test` also allow you append additional build flags after
-the arch/ABI, for example: built a linux toolchain with `rv64gc/lp64d`, and you
-can test more configuration like `rv64gcv/lp64d` with one additional build config
-`--param=riscv-autovec-lmul=dynamic`, then you can use --with-extra-multilib-test
-to specify that via
-`--with-extra-multilib-test="rv64gcv-lp64d:--param=riscv-autovec-lmul=dynamic"`.
-Then the testing will build the run test with option `--param=riscv-autovec-lmul=dynamic`
-before run the `rv64gcv-lp64d` test.
+`--with-extra-multilib-test` also support more complicated format to fit the
+requirements of end-users. First of all, the argument is a list of test
+configurations. Each test configuration are separated by `;`. For example:
+
+ `rv64gcv-lp64d;rv64_zvl256b_zvfh-lp64d`
+
+For each test configuration, it has two parts, aka required arch-abi part and
+optional build flags. We leverage `:` to separate them with some restrictions.
+
+ * arch-abi should be required and there must be only one at the begining of
+ the test configuration.
+ * build flags is a array-like flags after the arch-abi, there will be two
+ ways to arrange them, aka AND, OR operation.
+ * If you would like the flags in build flags array acts on arch-abi
+ __simultaneously__, you can use `:` to separate them. For example:
+
+ ```
+ rv64gcv-lp64d:--param=riscv-autovec-lmul=dynamic:--param=riscv-autovec-preference=fixed-vlmax
+ ```
+
+ will be consider as one target board same as below:
+
+ ```
+ riscv-sim/-march=rv64gcv/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=dynamic/--param=riscv-autovec-preference=fixed-vlmax
+ ```
+
+ * If you would like the flags in build flags array acts on arch-abi
+ __respectively__, you can use ',' to separate them. For example:
+
+ ```
+ rv64gcv-lp64d:--param=riscv-autovec-lmul=dynamic,--param=riscv-autovec-preference=fixed-vlmax
+ ```
+
+ will be consider as two target boards same as below:
+
+ ```
+ riscv-sim/-march=rv64gcv/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-preference=fixed-vlmax
+ riscv-sim/-march=rv64gcv/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=dynamic
+ ```
+
+ * However, you can also leverage AND(`:`), OR(`,`) operator together but the
+ OR(`,`) will always have the higher priority. For example:
+
+ ```
+ rv64gcv-lp64d:--param=riscv-autovec-lmul=dynamic:--param=riscv-autovec-preference=fixed-vlmax,--param=riscv-autovec-lmul=m2
+ ```
+
+ will be consider as tow target boars same as below:
+
+ ```
+ riscv-sim/-march=rv64gcv/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=dynamic/--param=riscv-autovec-preference=fixed-vlmax
+ riscv-sim/-march=rv64gcv/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=m2
+ ```
### LLVM / clang
diff --git a/scripts/generate_target_board b/scripts/generate_target_board
index 00d8e9f..9996f7e 100755
--- a/scripts/generate_target_board
+++ b/scripts/generate_target_board
@@ -29,17 +29,16 @@ def parse_options(argv):
# riscv-sim/-march=rv64gcv_zvl256b/-mabi=lp64d/-mcmodel=medlow
# From the config_string like below, --param is optional
# rv64gcv_zvl128b-lp64d:--param=riscv-autovec-lmul=m1
-def generate_one_target_board(config_string, options):
- configs = config_string.split(":")
- arch_and_abi = configs[0].split("-")
+def generate_one_target_board(arch_abi, flags, options):
+ arch_and_abi = arch_abi.split("-")
arch = arch_and_abi[0]
abi = arch_and_abi[1]
- if len (configs) == 1:
+ if len(flags) == 0:
return "{0}/-march={1}/-mabi={2}/-mcmodel={3}".format(
options.sim_name, arch, abi, options.cmodel)
- flags = '/'.join(configs[1:])
+ flags = flags.replace(":", "/")
return "{0}/-march={1}/-mabi={2}/-mcmodel={3}/{4}".format(
options.sim_name, arch, abi, options.cmodel, flags)
@@ -52,14 +51,25 @@ def main(argv):
return
target_board_list = [
- generate_one_target_board(options.build_arch_abi, options)
+ generate_one_target_board(options.build_arch_abi, "", options)
]
if options.extra_test_arch_abi_flags_list:
extra_test_list = options.extra_test_arch_abi_flags_list.split (";")
for extra_test in extra_test_list:
- target_board_list.append(generate_one_target_board(extra_test, options))
+ idx = extra_test.find(":")
+
+ if idx == -1:
+ one_target_board = generate_one_target_board(extra_test, "", options)
+ target_board_list.append(one_target_board)
+ else:
+ arch_abi = extra_test[:idx - 1]
+ flags = extra_test[idx + 1:]
+
+ for flag in flags.split(","):
+ one_target_board = generate_one_target_board(arch_abi, flag, options)
+ target_board_list.append(one_target_board)
print(' '.join(target_board_list))
diff --git a/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run b/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run
index fb569f1..29f9bf3 100755
--- a/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run
+++ b/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run
@@ -6,7 +6,8 @@ varch="$(march-to-cpu-opt --elf-file-path $1 --print-spike-varch)"
isa_option="--isa=${isa}"
varch_option=""
+memory_option="--misaligned"
[[ ! -z ${varch} ]] && varch_option="--varch=${varch}"
-spike ${isa_option} ${varch_option} ${PK_PATH}/pk${xlen} "$@"
+spike ${memory_option} ${isa_option} ${varch_option} ${PK_PATH}/pk${xlen} "$@"