|
|
@@ -1,16 +1,10 @@
|
|
|
/*
|
|
|
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
+ * Copyright (C) 2019-21 Intel Corporation and others. All rights reserved.
|
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
*/
|
|
|
|
|
|
-/**
|
|
|
- * The byte array buffer is the file content of a test wasm binary file,
|
|
|
- * which is compiled by wasi-sdk toolchain from C source file of:
|
|
|
- * product-mini/app-samples/hello-world/main.c.
|
|
|
- */
|
|
|
-unsigned char __aligned(4) wasm_test_file[] = {
|
|
|
-// binary for the interpreter
|
|
|
-#if WAMR_BUILD_INTERP != 0
|
|
|
+#if WASM_ENABLE_INTERP != 0
|
|
|
+unsigned char __aligned(4) wasm_test_file_interp[] = {
|
|
|
0x00, 0x61, 0x73, 0x6D, 0x01, 0x00, 0x00, 0x00, 0x01, 0x10, 0x03, 0x60,
|
|
|
0x01, 0x7F, 0x01, 0x7F, 0x60, 0x02, 0x7F, 0x7F, 0x01, 0x7F, 0x60, 0x01,
|
|
|
0x7F, 0x00, 0x02, 0x31, 0x04, 0x03, 0x65, 0x6E, 0x76, 0x04, 0x70, 0x75,
|
|
|
@@ -45,8 +39,13 @@ unsigned char __aligned(4) wasm_test_file[] = {
|
|
|
0x3A, 0x20, 0x25, 0x73, 0x00, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x77,
|
|
|
0x6F, 0x72, 0x6C, 0x64, 0x21, 0x00, 0x6D, 0x61, 0x6C, 0x6C, 0x6F, 0x63,
|
|
|
0x20, 0x62, 0x75, 0x66, 0x20, 0x66, 0x61, 0x69, 0x6C, 0x65, 0x64, 0x00
|
|
|
-// binary for the xtensa aot compiler
|
|
|
-#elif WAMR_BUILD_TARGET_XTENSA != 0
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if WASM_ENABLE_AOT != 0
|
|
|
+#if BUILD_TARGET_XTENSA != 0
|
|
|
+// XTENSA
|
|
|
+unsigned char __aligned(4) wasm_test_file_aot[] = {
|
|
|
0x00, 0x61, 0x6F, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5E, 0x00,
|
|
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
@@ -156,8 +155,10 @@ unsigned char __aligned(4) wasm_test_file[] = {
|
|
|
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
|
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
|
|
-// binary for the riscv aot compiler
|
|
|
+};
|
|
|
#else
|
|
|
+// RISC-V
|
|
|
+unsigned char __aligned(4) wasm_test_file_aot[] = {
|
|
|
0x00, 0x61, 0x6F, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xF3, 0x00,
|
|
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
@@ -282,5 +283,6 @@ unsigned char __aligned(4) wasm_test_file[] = {
|
|
|
0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
|
0xE8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
|
|
0x02, 0x00, 0x00, 0x00
|
|
|
-#endif
|
|
|
};
|
|
|
+#endif
|
|
|
+#endif
|