Enhance XIP and add XIP document (#863)

Auto detect whether file is XIP file before loading module in posix like and
linux-sgx platforms, and if yes, mmap executable memory automatically to
run the XIP file.
Add document about XIP feature.
Enable test spec cases with XIP feature.
This commit is contained in:
Wenyong Huang
2021-12-06 17:25:10 +08:00
committed by GitHub
parent 3f808d4596
commit b490a229f6
11 changed files with 184 additions and 24 deletions

View File

@ -51,6 +51,7 @@ def ignore_the_case(
multi_module_flag=False,
multi_thread_flag=False,
simd_flag=False,
xip_flag=False,
):
if case_name in ["comments", "inline-module", "names"]:
return True
@ -100,6 +101,7 @@ def test_case(
multi_module_flag=False,
multi_thread_flag=False,
simd_flag=False,
xip_flag=False,
clean_up_flag=True,
verbose_flag=True,
):
@ -114,6 +116,7 @@ def test_case(
multi_module_flag,
multi_thread_flag,
simd_flag,
xip_flag,
):
return True
@ -139,6 +142,9 @@ def test_case(
if simd_flag:
CMD.append("--simd")
if xip_flag:
CMD.append("--xip")
if not clean_up_flag:
CMD.append("--no_cleanup")
@ -195,6 +201,7 @@ def test_suite(
multi_module_flag=False,
multi_thread_flag=False,
simd_flag=False,
xip_flag=False,
clean_up_flag=True,
verbose_flag=True,
):
@ -217,6 +224,7 @@ def test_suite(
multi_module_flag,
multi_thread_flag,
simd_flag,
xip_flag,
clean_up_flag,
verbose_flag,
)
@ -239,6 +247,7 @@ def test_suite_parallelly(
multi_module_flag=False,
multi_thread_flag=False,
simd_flag=False,
xip_flag=False,
clean_up_flag=False,
verbose_flag=False,
):
@ -266,6 +275,7 @@ def test_suite_parallelly(
multi_module_flag,
multi_thread_flag,
simd_flag,
xip_flag,
clean_up_flag,
verbose_flag,
],
@ -323,6 +333,13 @@ def main():
dest="simd_flag",
help="Running with the SIMD feature",
)
parser.add_argument(
"-X",
action="store_true",
default=False,
dest="xip_flag",
help="Running with the XIP feature",
)
parser.add_argument(
"-t",
action="store_true",
@ -387,6 +404,7 @@ def main():
options.multi_module_flag,
options.multi_thread_flag,
options.simd_flag,
options.xip_flag,
options.clean_up_flag,
options.verbose_flag,
)
@ -403,6 +421,7 @@ def main():
options.multi_module_flag,
options.multi_thread_flag,
options.simd_flag,
options.xip_flag,
options.clean_up_flag,
options.verbose_flag,
)
@ -419,6 +438,7 @@ def main():
options.multi_module_flag,
options.multi_thread_flag,
options.simd_flag,
options.xip_flag,
options.clean_up_flag,
options.verbose_flag,
)