Remove reserved_reg functionality. (#424)
* Remove reserved_reg functionality. This wasn't implemented, and if we need it in the future, it seems like it would be better to extend the concept of global values to cover this. * Use GlobalValue::reserved_value() for sentinal values.
This commit is contained in:
@@ -689,16 +689,13 @@ trap when accessed.
|
||||
|
||||
Declare a static heap in the preamble.
|
||||
|
||||
:arg Base: Global value holding the heap's base address or
|
||||
``reserved_reg``.
|
||||
:arg Base: Global value holding the heap's base address.
|
||||
:arg MinBytes: Guaranteed minimum heap size in bytes. Accesses below this
|
||||
size will never trap.
|
||||
:arg BoundBytes: Fixed heap bound in bytes. This defines the amount of
|
||||
address space reserved for the heap, not including the guard pages.
|
||||
:arg GuardBytes: Size of the guard pages in bytes.
|
||||
|
||||
The ``reserved_reg`` option is not yet implemented.
|
||||
|
||||
Dynamic heaps
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
@@ -710,15 +707,12 @@ is resized. The bound of a dynamic heap is stored in a global value.
|
||||
|
||||
Declare a dynamic heap in the preamble.
|
||||
|
||||
:arg Base: Global value holding the heap's base address or
|
||||
``reserved_reg``.
|
||||
:arg Base: Global value holding the heap's base address.
|
||||
:arg MinBytes: Guaranteed minimum heap size in bytes. Accesses below this
|
||||
size will never trap.
|
||||
:arg BoundGV: Global value containing the current heap bound in bytes.
|
||||
:arg GuardBytes: Size of the guard pages in bytes.
|
||||
|
||||
The ``reserved_reg`` option is not yet implemented.
|
||||
|
||||
Heap examples
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -52,11 +52,11 @@ ebb0:
|
||||
|
||||
; Declare static heaps.
|
||||
function %sheap(i32, i64 vmctx) -> i64 {
|
||||
heap1 = static reserved_reg, min 0x1_0000, bound 0x1_0000_0000, guard 0x8000_0000
|
||||
heap1 = static gv5, min 0x1_0000, bound 0x1_0000_0000, guard 0x8000_0000
|
||||
heap2 = static gv5, guard 0x1000, bound 0x1_0000
|
||||
gv5 = vmctx+64
|
||||
|
||||
; check: heap1 = static reserved_reg, min 0x0001_0000, bound 0x0001_0000_0000, guard 0x8000_0000
|
||||
; check: heap1 = static gv5, min 0x0001_0000, bound 0x0001_0000_0000, guard 0x8000_0000
|
||||
; check: heap2 = static gv5, min 0, bound 0x0001_0000, guard 4096
|
||||
ebb0(v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap1, v1, 0
|
||||
@@ -66,12 +66,12 @@ ebb0(v1: i32, v2: i64):
|
||||
|
||||
; Declare dynamic heaps.
|
||||
function %dheap(i32, i64 vmctx) -> i64 {
|
||||
heap1 = dynamic reserved_reg, min 0x1_0000, bound gv6, guard 0x8000_0000
|
||||
heap1 = dynamic gv5, min 0x1_0000, bound gv6, guard 0x8000_0000
|
||||
heap2 = dynamic gv5, bound gv6, guard 0x1000
|
||||
gv5 = vmctx+64
|
||||
gv6 = vmctx+72
|
||||
|
||||
; check: heap1 = dynamic reserved_reg, min 0x0001_0000, bound gv6, guard 0x8000_0000
|
||||
; check: heap1 = dynamic gv5, min 0x0001_0000, bound gv6, guard 0x8000_0000
|
||||
; check: heap2 = dynamic gv5, min 0, bound gv6, guard 4096
|
||||
ebb0(v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap2, v1, 0
|
||||
|
||||
Reference in New Issue
Block a user