X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=blobdiff_plain;f=Alu.hs;fp=Alu.hs;h=54039084b7ac6cffbea6c369cfaed4e7ab013fb7;hp=17978204628b47ae06953944a9fbffd49c08205f;hb=52d5de13a6c89e7dbc46627888210ddcda1c3e6c;hpb=a879bbd83d5ce95e0d05aa117819edf88bc8f6d4 diff --git a/Alu.hs b/Alu.hs index 1797820..5403908 100644 --- a/Alu.hs +++ b/Alu.hs @@ -58,8 +58,8 @@ alu :: AluOp -> Word -> Word -> Word {-# NOINLINE alu #-} --alu High a b = a `hwand` b --alu Low a b = a `hwor` b -alu High a b = a -alu Low a b = b +alu High a b = a + b +alu Low a b = a - b type ExecState = (RegisterBankState, Word, Word) exec :: (RegAddr, Bit, AluOp) -> ExecState -> (ExecState, Word)