You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/vmcalls.md
+3-74
Original file line number
Diff line number
Diff line change
@@ -272,79 +272,8 @@ inline std::optional<Script::sgaddr_t> Script::call(gaddr_t address, Args&&... a
272
272
```
273
273
From `script.call(...)` as implemented in the [gamedev example](https://github.com/libriscv/libriscv/blob/master/examples/gamedev/script.hpp). `ScriptDepthMeter` measures the current call depth in order to avoid too many recursive calls back into the script, while also using the faster `vmcall()` on the first call.
274
274
275
-
## VM Calls with the C API
276
275
277
-
In the C API each argument register has to be populated manually, and the return value(s) have to be read as well.
276
+
## Examples
278
277
279
-
A general rule for passing data to a function is that:
280
-
1. Each integer goes into the next free integer register
281
-
2. Each pointer goes into the next free integer register
0 commit comments