summaryrefslogtreecommitdiff
path: root/lib/Language/Elna/Architecture
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-10-11 16:14:01 +0200
committerEugen Wissner <belka@caraus.de>2024-10-11 16:14:01 +0200
commit0850f0a8d66af028e32a79063cdad328b70db909 (patch)
tree8c1fa49d5476e706e94a7af62ce37b12ef65e32d /lib/Language/Elna/Architecture
parent87f183baad01f2b572f5f9051895b5876a56dd4c (diff)
downloadelna-0850f0a8d66af028e32a79063cdad328b70db909.tar.gz
Implement if statements with equality
Diffstat (limited to 'lib/Language/Elna/Architecture')
-rw-r--r--lib/Language/Elna/Architecture/RiscV.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Language/Elna/Architecture/RiscV.hs b/lib/Language/Elna/Architecture/RiscV.hs
index 03895a3..6619160 100644
--- a/lib/Language/Elna/Architecture/RiscV.hs
+++ b/lib/Language/Elna/Architecture/RiscV.hs
@@ -146,6 +146,7 @@ data RelocationType
| RLower12S Text Funct3 XRegister XRegister
| RHigher20 XRegister Text -- Type U.
| RBranch Text Funct3 XRegister XRegister -- Type B.
+ | RJal XRegister Text -- Type J.
deriving Eq
data Instruction
@@ -304,6 +305,7 @@ relocationType (RLower12I rd funct3' rs1 _) = type' $ I rd funct3' rs1 0
relocationType (RLower12S _ funct3' rs1 rs2) = type' $ S 0 funct3' rs1 rs2
relocationType (RHigher20 rd _) = type' $ U rd 0
relocationType (RBranch _ funct3' rs1 rs2) = type' $ B 0 funct3' rs1 rs2
+relocationType (RJal rd _) = type' $ J rd 0
instruction :: Instruction -> ByteString.Builder.Builder
instruction = \case