summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-08 19:42:07 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-08 19:42:07 +0100
commitb8df2847aa60728b72a9a48769c8662214ba30c8 (patch)
tree115cdfa63d12117aa4e6c1b82a3ebfdfd42a9d31 /asm
parent9139862d65f5aa720812173decaa8c0f0abf26c6 (diff)
downloadSystDigit-Projet-b8df2847aa60728b72a9a48769c8662214ba30c8.tar.gz
SystDigit-Projet-b8df2847aa60728b72a9a48769c8662214ba30c8.zip
Remove useless D initialization, remove LA instruction (actually, it is LI)
Diffstat (limited to 'asm')
-rw-r--r--asm/asmlex.mll1
-rw-r--r--asm/asmpars.mly3
-rw-r--r--asm/test.asm3
3 files changed, 2 insertions, 5 deletions
diff --git a/asm/asmlex.mll b/asm/asmlex.mll
index 1c7e3e7..22f77d7 100644
--- a/asm/asmlex.mll
+++ b/asm/asmlex.mll
@@ -23,7 +23,6 @@
"liu",LIU;
"liuz",LIUZ;
"lra",LRA;
- "la",LA;
"li",LI;
"move",MOVE;
"jz",JZ;
diff --git a/asm/asmpars.mly b/asm/asmpars.mly
index 8dbf665..d15c8af 100644
--- a/asm/asmpars.mly
+++ b/asm/asmpars.mly
@@ -38,7 +38,7 @@
%}
%token EOF,COLON,TEXT,DATA,BYTE,WORD,ASCIIZ,MINUS,MOVE,JZ,JNZ,LP,RP
-%token POP,PUSH,INCRI,SHI,JJ,JAL,JR,JALR,LW,SW,LB,SB,NOT,LIL,LILZ,LIU,LIUZ,LRA,LA,LI
+%token POP,PUSH,INCRI,SHI,JJ,JAL,JR,JALR,LW,SW,LB,SB,NOT,LIL,LILZ,LIU,LIUZ,LRA,LI
%token<Asm.reg> REG
%token<Asm.fmt_r> ROP,RIOP
%token<string> ID
@@ -120,7 +120,6 @@ _instr:
| LRA i=int { assert (i > -(1 lsl 10) && i < 1 lsl 10);
add pc 2; [Lra (Imm i)] }
| LRA l=ID { add pc 2; [Lra (Lab l)] }
- | LA r=REG l=ID { li false r (Lab l) }
| LIL r=REG i=int { add pc 2; [Lil (r,Imm i)] }
| LILZ r=REG i=int { add pc 2; [Lilz (r,Imm i)] }
| LIU r=REG i=int { add pc 2; [Liu (r,Imm i)] }
diff --git a/asm/test.asm b/asm/test.asm
index 78a56c4..2a9dd80 100644
--- a/asm/test.asm
+++ b/asm/test.asm
@@ -1,12 +1,11 @@
.text
- add D Z Z
init:
liuz B 0x40
lw B 0(B)
jz B init
add D D B
push D
- la A msgtick
+ li A msgtick
jal ser_out_msg
pop D
j init