Add address deref, syntax, and deref sizes

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-25 12:07:24 -05:00
parent bdd08c6c5b
commit 5619c9dc87
11 changed files with 308 additions and 99 deletions

21
vm.md
View File

@@ -228,7 +228,6 @@ the section contents.
* 8 bits - Section kind
* 0x00 - Data
* 0x10 - Code
* 0xFF - Meta
* 64 bits - Length of the section
@@ -239,15 +238,6 @@ The data section contains static data that is initialized to some known value.
* 64 bits - section load start - where in memory the content of this section begins
* 64 bits - section length - how long the memory content is
### Code section
The code section contains executable code.
* 64 bits - section load start - where in memory the content of this section begins
* 64 bits - section load end - where in memory the content of this section ends
The remaining length of the section is the code itself.
### Meta section
The meta section holds a table of metadata about the binary in a key-value format of strings mapping
@@ -273,3 +263,14 @@ A VM must provide support for the following meta-values:
* Interrupts
* MMIO regions
* Paging?
* Determine how address sizes are determined
* source size <= dest size - zero extend source and copy
* mov %r0, (label)u32
* source size > dest size - truncate to dest size
* mov (label)u32, %r0
* source size with unknown dest size - use dest size == source size
* mov %r0, (label)
* unknown source size with dest size - use dest size == source size
* mov (label), %r0
* unknown source size with unknown dest size - 64 bits
* mov (label), (%r0)