From cd5ff1e105c7aa4fe1d31a106205cf1ecaa415d6 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 10 Nov 2019 11:33:29 +0000 Subject: [PATCH] Fix parsing of LDVR/STVR --- src/Mima/Assembler/Parser/RawInstruction.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mima/Assembler/Parser/RawInstruction.hs b/src/Mima/Assembler/Parser/RawInstruction.hs index 7ecf2c8..b50aef7 100644 --- a/src/Mima/Assembler/Parser/RawInstruction.hs +++ b/src/Mima/Assembler/Parser/RawInstruction.hs @@ -27,6 +27,8 @@ parseByLiteral = foldl (<|>) empty . map (\(a, b) -> b <$ C.string' a) smallOpcode' :: Parser SmallOpcode smallOpcode' = parseByLiteral [ ( "LDC", LDC) + , ("LDVR", LDVR) -- Needs to be before LDV + , ("STVR", STVR) -- Needs to be before STV , ( "LDV", LDV) , ( "STV", STV) , ( "ADD", ADD) @@ -39,8 +41,6 @@ smallOpcode' = parseByLiteral , ("LDIV", LDIV) , ("STIV", STIV) , ("CALL", CALL) - , ("LDVR", LDVR) - , ("STVR", STVR) ] largeOpcode' :: Parser LargeOpcode