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: doc/src/atomvm-internals.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ Following BEAM, there are two flavors of the emulator: jit and emu, but eventual
137
137
- Native: the VM only runs native code and all code must be precompiled on the desktop using the JIT compiler (which effectively is a AOT or Ahead-of-Time compiler). In this mode, it is not necessary to bundle the jit compiler on the embedded target.
138
138
- Hybrid: the VM can run native code as well as emulated BEAM code and some code is precompiled on the desktop.
139
139
140
-
JIT is available on some platforms (currently only x86_64, aarch64and armv6m) and compiles Erlang bytecode at runtime. Erlang bytecode is never interpreted. EMU is available on all platforms and Erlang bytecode is interpreted.
140
+
JIT is available on some platforms (currently x86_64, aarch64, armv6m and riscv32) and compiles Erlang bytecode at runtime. Erlang bytecode is never interpreted. EMU is available on all platforms and Erlang bytecode is interpreted.
141
141
142
142
Modules can include precompiled code in a dedicated beam chunk with name 'avmN'. The chunk can contain native code for several architectures, however it may only contain native code for a given version of the native interface. Current version is 1. This native code is executed by the jit-flavor of the emulator as well as the emu flavor if execution of precompiled is enabled.
143
143
@@ -154,9 +154,16 @@ The JIT compiler is written in Erlang and is therefore precompiled. When a proce
154
154
155
155
JIT compiler is composed of two main interfaces : backend and stream.
156
156
157
-
A backend implementation is required for each architecture. The backend is called by jit module as it translates bytecodes to machine code. The current implementations are `jit_x86_64` and `jit_aarch64` which are suitable for systems with System V X86 64 ABI or AArch64 ABI.
157
+
A backend implementation is required for each architecture. The backend is called by jit module as it translates bytecodes to machine code. The current implementations are :
158
+
-`jit_x86_64` for System V X86 64 ABI
159
+
-`jit_aarch64` for AArch64 ABI
160
+
-`jit_armv6m` for AArch32 ABI
161
+
-`jit_riscv32` for rv32imc ilp32 ABI.
158
162
159
-
A stream implementation is responsible for streaming the machine code, especially in the context of low memory. Two implementations currently exist: `jit_stream_binary` that streams assembly code to an Erlang binary, suitable for tests and precompilation on the desktop, and `jit_stream_mmap` that streams assembly code in an `mmap(2)` allocated page, suitable for JIT compilation on Unix.
163
+
A stream implementation is responsible for streaming the machine code, especially in the context of low memory. Three implementations currently exist:
164
+
-`jit_stream_binary` that streams assembly code to an Erlang binary, suitable for tests and precompilation on the desktop
165
+
-`jit_stream_mmap` that streams assembly code in an `mmap(2)` allocated page, suitable for JIT compilation on Unix
166
+
-`jit_stream_flash` available on Pico that allows for embedded JIT.
0 commit comments