diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-09-21 23:35:32 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-09-21 23:35:32 +0200 |
| commit | daec506ed3f90e61c6a3c4d5b38c19e28ebb1978 (patch) | |
| tree | 147a08333e608e1c57471075ccbd7a06a8c542cf /lib/Language/Elna/Architecture/RiscV.hs | |
| parent | 0a8d3fce2f2797b95b22ea3577d2514621c850fc (diff) | |
| download | elna-daec506ed3f90e61c6a3c4d5b38c19e28ebb1978.tar.gz | |
Put _start and main call into builtins
Diffstat (limited to 'lib/Language/Elna/Architecture/RiscV.hs')
| -rw-r--r-- | lib/Language/Elna/Architecture/RiscV.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Language/Elna/Architecture/RiscV.hs b/lib/Language/Elna/Architecture/RiscV.hs index 4ee516d..808e19e 100644 --- a/lib/Language/Elna/Architecture/RiscV.hs +++ b/lib/Language/Elna/Architecture/RiscV.hs @@ -148,7 +148,7 @@ data RelocationType deriving Eq data Instruction - = Instruction BaseOpcode Type + = BaseInstruction BaseOpcode Type | RelocatableInstruction BaseOpcode RelocationType | CallInstruction Text deriving Eq @@ -305,11 +305,11 @@ relocationType (Higher20 rd _) = type' $ U rd 0 instruction :: Instruction -> ByteString.Builder.Builder instruction = \case - (Instruction base instructionType) -> go base $ type' instructionType + (BaseInstruction base instructionType) -> go base $ type' instructionType (RelocatableInstruction base instructionType) -> go base $ relocationType instructionType (CallInstruction _) -> foldMap instruction - [ Instruction Auipc $ U RA 0 - , Instruction Jalr $ I RA JALR RA 0 + [ BaseInstruction Auipc $ U RA 0 + , BaseInstruction Jalr $ I RA JALR RA 0 ] where go base instructionType |
