aboutsummaryrefslogtreecommitdiffstats
path: root/Notes.org
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-03 17:49:32 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-03 17:49:32 +0000
commit2592ee34545fb3e358acb16114b6e74107024a5e (patch)
tree74d5e5e0e7a7411a929e5c9d87cfd515451a25d2 /Notes.org
parent5936d1c7f62c17a0d12c2d1de90c5ee9f1e437c5 (diff)
downloadCompiler-2592ee34545fb3e358acb16114b6e74107024a5e.tar.gz
Compiler-2592ee34545fb3e358acb16114b6e74107024a5e.zip
Working AST
Diffstat (limited to 'Notes.org')
-rw-r--r--Notes.org14
1 files changed, 13 insertions, 1 deletions
diff --git a/Notes.org b/Notes.org
index 0b37cbb..a52de5b 100644
--- a/Notes.org
+++ b/Notes.org
@@ -75,14 +75,26 @@
DEADLINE: <2017-03-28 Tue>
*** Task
-
+
*** Mips Assembly
+ - %hi(id) :: loads the upper address of the global variable id
+ - %lo(id) :: loads the lower address of the global variable id
- addiu :: Add Immediate Unsigned
- jr :: Jump Register
- li :: Pseudo instruction interpreted as ( lui $rd, LabelAddr[31:16]
ori $rd,$rd, LabelAddr[15:0] )
+ - lui :: loads uppper immediate.
- lw :: Load Word
- move :: Pseudo instruction interpreted as (add $rt, $rs, $zero)
- nop :: No Operation
- sw :: Store Word
+
+
+*** TODOs
+
+ - Change parser to have two vectors with global variables and functions.
+ - Analyse tree with map including "name", and struct with "type" and "stack
+ position", and a counter passed by reference.
+ - This function will be called by printasm() in the base class and will only be
+ implemented by function.