Mark loads from globals aligned and notrap.
Mark loads from globals generated by cton_wasm or by legalization as `aligned` and `notrap`, since memory for these globals should be allocated by the runtime environment for that purpose. This reduces the number of potentially trapping instructions, which can reduce the amount of metadata required by embedding environments.
This commit is contained in:
@@ -654,6 +654,9 @@ trap when accessed.
|
||||
address space reserved for the heap, not including the guard pages.
|
||||
:arg GuardBytes: Size of the guard pages in bytes.
|
||||
|
||||
When the base is a global variable, it must be :term:`accessible` and naturally
|
||||
aligned for a pointer value.
|
||||
|
||||
The ``reserved_reg`` option is not yet implemented.
|
||||
|
||||
Dynamic heaps
|
||||
@@ -674,6 +677,9 @@ is resized. The bound of a dynamic heap is stored in a global variable.
|
||||
:arg BoundGV: Global variable containing the current heap bound in bytes.
|
||||
:arg GuardBytes: Size of the guard pages in bytes.
|
||||
|
||||
When the base is a global variable, it must be :term:`accessible` and naturally
|
||||
aligned for a pointer value.
|
||||
|
||||
The ``reserved_reg`` option is not yet implemented.
|
||||
|
||||
Heap examples
|
||||
|
||||
Reference in New Issue
Block a user