X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3a_asm%2FDT.hs;h=d4ad4901ea6130abd1550fd430a923e1dd639a14;hb=83b7ca00d6632a98db8b465f4d504650b9ba199c;hp=713f1779c3f7d4840ef0a135419c093ffddf6312;hpb=ec384cf9084dfa2fe29b12867b14e76d93ce8ef2;p=calu.git diff --git a/3a_asm/DT.hs b/3a_asm/DT.hs index 713f177..d4ad490 100644 --- a/3a_asm/DT.hs +++ b/3a_asm/DT.hs @@ -50,7 +50,7 @@ iLit (_,d) = do iLit5 d = do i <- iLit d; return $ i .&. 0x001f iLit12 d = do i <- iLit d; return $ i .&. 0x0fff -iLit15 d = do i <- iLit d; return $ i .&. 0xefff +iLit15 d = do i <- iLit d; return $ i .&. 0x7fff iLit16 d = do i <- iLit d; return $ i .&. 0xffff imm4 :: Parser String @@ -198,7 +198,7 @@ bform opcd typ s cond bp imm = pack [(cond,28),(opcd,23),(imm,7),(free,4),(typ,2 where free = 0 bform' opcd typ cond bp = bform opcd typ 0 cond bp 0 -sform opcd typ rd cond = pack [(cond,28),(opcd,23),(rd,19),(typ,17)] +sform opcd typ cond rd = pack [(cond,28),(opcd,23),(rd,19),(typ,17)] brrform opcd typ cond ra = pack [(cond,28),(opcd,23),(ra,19),(typ,2)]