summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2023-02-22 17:09:53 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-02 22:44:35 -0500
commit68dd64ffa6f164dce4ac010b9f5e1adfefeae7c7 (patch)
tree2643e5ea3160cb516a2120b51f4818706244ac55 /compiler/GHC
parenta86aae8b562c12bb3cee8dcae5156b647f1a74ad (diff)
downloadhaskell-68dd64ffa6f164dce4ac010b9f5e1adfefeae7c7.tar.gz
ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTs
Commit 7566fd9de38c67360c090f828923d41587af519c with the fix for #22798 was incomplete as it failed to handle MULTILINE_COMMENT pseudo-instructions, and didn't completly fix the compiler panics when compiling with `-fregs-graph`. Fixes #23002
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/CmmToAsm/AArch64/Instr.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/GHC/CmmToAsm/AArch64/Instr.hs b/compiler/GHC/CmmToAsm/AArch64/Instr.hs
index ce28163477..6c5a6194fa 100644
--- a/compiler/GHC/CmmToAsm/AArch64/Instr.hs
+++ b/compiler/GHC/CmmToAsm/AArch64/Instr.hs
@@ -73,6 +73,7 @@ regUsageOfInstr :: Platform -> Instr -> RegUsage
regUsageOfInstr platform instr = case instr of
ANN _ i -> regUsageOfInstr platform i
COMMENT{} -> usage ([], [])
+ MULTILINE_COMMENT{} -> usage ([], [])
PUSH_STACK_FRAME -> usage ([], [])
POP_STACK_FRAME -> usage ([], [])
DELTA{} -> usage ([], [])
@@ -207,11 +208,12 @@ callerSavedRegisters
patchRegsOfInstr :: Instr -> (Reg -> Reg) -> Instr
patchRegsOfInstr instr env = case instr of
-- 0. Meta Instructions
- ANN d i -> ANN d (patchRegsOfInstr i env)
- COMMENT{} -> instr
- PUSH_STACK_FRAME -> instr
- POP_STACK_FRAME -> instr
- DELTA{} -> instr
+ ANN d i -> ANN d (patchRegsOfInstr i env)
+ COMMENT{} -> instr
+ MULTILINE_COMMENT{} -> instr
+ PUSH_STACK_FRAME -> instr
+ POP_STACK_FRAME -> instr
+ DELTA{} -> instr
-- 1. Arithmetic Instructions ----------------------------------------------
ADD o1 o2 o3 -> ADD (patchOp o1) (patchOp o2) (patchOp o3)
CMN o1 o2 -> CMN (patchOp o1) (patchOp o2)