From: Bernhard Urban Date: Thu, 13 Jan 2011 23:28:09 +0000 (+0100) Subject: 3a_asm: FIX: disc erwartet kein register X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=calu.git;a=commitdiff_plain;h=48de8a90471559126c929bc7253e6edf34da28fa 3a_asm: FIX: disc erwartet kein register --- diff --git a/3a_asm/DT.hs b/3a_asm/DT.hs index e065c71..213a5c3 100644 --- a/3a_asm/DT.hs +++ b/3a_asm/DT.hs @@ -111,6 +111,7 @@ ins m form e = do {mnem m; form e} csv0i_p dict f = f<$>condition<*>branchpred<*>(iLabel dict) csv0i_p' f = f<$>condition<*>branchpred csv1 f = f<$>condition<%>reg +csv1' f = f<$>condition csv1_p f = f<$>condition<%>reg csv2 f = f<$>condition<%>reg<.>reg csv2i dict f = f<$>condition<%>reg<.>(iLit16 dict) @@ -157,7 +158,7 @@ lrs dict = ins "lrs" (csv2i_cd dict) $ shiform 0x0a 1 0 ars dict = ins "ars" (csv2i_d dict) $ shiform 0x0a 1 1 0 -- memory pop _ = ins "pop" csv1 $ sform 0x0b 0x0 -disc _ = ins "disc" csv1 $ sform 0x0b 0x1 +disc _ = ins "disc" csv1' $ sform' 0x0b 0x1 0 fetch _ = ins "fetch" csv1 $ sform 0x0b 0x2 push _ = ins "push" csv1 $ sform 0x0b 0x3 movpf _ = ins "movpf" csv1 $ sform 0x0c 0x2 @@ -204,6 +205,7 @@ bform opcd typ s cond bp imm = pack [(cond,28),(opcd,23),(imm,7),(free,4),(typ,2 bform' opcd typ cond bp = bform opcd typ 0 cond bp 0 sform opcd typ cond rd = pack [(cond,28),(opcd,23),(rd,19),(typ,17)] +sform' opcd typ rd cond = sform opcd typ cond rd brrform opcd typ cond ra = pack [(cond,28),(opcd,23),(ra,19),(typ,2)] diff --git a/3a_asm/notes b/3a_asm/notes index be78258..c1cdc8a 100644 --- a/3a_asm/notes +++ b/3a_asm/notes @@ -1,3 +1,17 @@ +BUGS: +- parsers2/eval: kann nur "0-1" und ned "-1" auswerten +- parsers1: fail bei zeile mit tab/blanks only +- parsers2/eval: aufloesen von zwei labels x und y funktioniert nicht, wenn x ein + echter prefix von y ist (longest input match anyone?) +- parsers2/eval: klammern bei ausdruecken (und zwar im asm, ned expr selbst...) +- parsers2: bei instr branches addresse durch 4 rechnen (ldi vorm brr -> RAGE) + +WUENSCHE: +- vernuenftige zeilenangabe bei fehlermeldungen +- eval: bitoperatoren + + +=============================================================================== Beschreibung: Der Parser braucht zwei Durchlaeufe. Der erste Durchlauf loest z.b. Labels auf @@ -12,8 +26,7 @@ Adressenaufloesung nicht mehr viel schief gehen. - .data <- done (wenn man nett ist, springt man nicht lustig zwischen diesen - .text <- done (sections hin und her... es *sollte* zwar gehen, aber [...] :p) -- .include <- TODO: zu umstaendlich? :/ Mal schaun ob mir eine einfache Loesung - einfaellt. Eventuell mit gcc drueberfahren +- .include <- done (thx @ gcc) - .org <- done - .fill aufloesen <- TODO: atm nur einmalig 32bit moeglich - .define tabelle <- done @@ -28,7 +41,3 @@ Adressenaufloesung nicht mehr viel schief gehen. einschraenkungen atm: - gleicher Namensraum fuer labels in .text und .data! wenn einer ein Label aus .data laedt und dann aber eigentlich auf .text zugreift ist er selber schuld :/ -- Expr geht zwar, aber nicht geklammert -- In manchen situationen kanns den parser noch an den einen oder anderen Space - oder Tab herhauen, also lieb sein! -- viele viele mehr *testbench schreiben muss* diff --git a/progs/deepjit.s b/progs/deepjit.s index c0f6680..c0352d8 100644 --- a/progs/deepjit.s +++ b/progs/deepjit.s @@ -89,7 +89,7 @@ prog_imm: .ifill push r6 prog_pop: -.ifill disc r6 +.ifill disc prog_xch: .ifill pop r6