aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-06-14 15:11:08 +0200
committerNicholas Rodrigues Lordello <[email protected]>2025-06-14 15:11:08 +0200
commite3a1beda8665f4757aa7cab727fcf3b09419a451 (patch)
treeb27346d31cd74484295b99acf827d668513e37e1 /lib
parent47a60f0f1c71d6e5bca5d8ee72f0ad7c63e1817c (diff)
Embed Sysroot Into Binary
We now embed the PICO-w sysroot files (the WASM blob, data pod and boot rom) into the final `picow` binary in order to simplify distribution. This commit adds a new `generate-sysroot` tool to achieve it.
Diffstat (limited to 'lib')
-rw-r--r--lib/wamr/test/fibonacci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/wamr/test/fibonacci.c b/lib/wamr/test/fibonacci.c
index ddb5f9c..6effd51 100644
--- a/lib/wamr/test/fibonacci.c
+++ b/lib/wamr/test/fibonacci.c
@@ -10,12 +10,12 @@ __asm__(".global maxint\n"
".import_module maxint, env\n"
".import_name maxint, maxint\n"
".globaltype maxint, i32, immutable\n");
-static inline int getmaxint() {
- int val;
+static inline int32_t getmaxint() {
+ int32_t val;
__asm__("global.get maxint\n"
- "local.set %0"
+ "local.set %w0"
: "=r"(val));
- return val;
+ return val > 0 ? val : INT32_MAX;
}
WASM_IMPORT("env", "lognumber")