spec-test-script: Add xtensa case (#3643)

This commit is contained in:
YAMAMOTO Takashi
2024-07-18 21:15:12 +09:00
committed by GitHub
parent 7c9686df5f
commit 583fa52226
3 changed files with 11 additions and 2 deletions

View File

@ -66,6 +66,7 @@ AVAILABLE_TARGETS = [
"RISCV64_LP64D",
"THUMBV7",
"THUMBV7_VFP",
"XTENSA",
]
def ignore_the_case(

View File

@ -58,6 +58,7 @@ aot_target_options_map = {
"riscv64": ["--target=riscv64", "--target-abi=lp64", "--cpu=generic-rv64", "--cpu-features=+m,+a,+c"],
"riscv64_lp64f": ["--target=riscv64", "--target-abi=lp64f", "--cpu=generic-rv64", "--cpu-features=+m,+a,+c,+f"],
"riscv64_lp64d": ["--target=riscv64", "--target-abi=lp64d", "--cpu=generic-rv64", "--cpu-features=+m,+a,+c,+f,+d"],
"xtensa": ["--target=xtensa"],
}
def debug(data):
@ -1185,6 +1186,8 @@ def run_wasm_with_repl(wasm_tempfile, aot_tempfile, opts, r):
elif opts.target.startswith("riscv64"):
cmd = "qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 1 -nographic -bios none -kernel".split()
cmd.append(opts.qemu_firmware)
elif opts.target.startswith("xtensa"):
cmd = f"qemu-system-xtensa -semihosting -nographic -serial mon:stdio -machine esp32s3 -drive file={opts.qemu_firmware},if=mtd,format=raw".split()
else:
raise Exception("Unknwon target for QEMU: %s" % opts.target)