[Git][ghc/ghc][wip/T23002] ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTs

Zubin (@wz1000) gitlab at gitlab.haskell.org
Wed Feb 22 11:55:33 UTC 2023



Zubin pushed to branch wip/T23002 at Glasgow Haskell Compiler / GHC


Commits:
96e153bd by Zubin Duggal at 2023-02-22T17:12:56+05:30
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

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/AArch64/Instr.hs


Changes:

=====================================
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)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/96e153bd9d1a8d4f3fe4c6273b44ec2c0ae2d24c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/96e153bd9d1a8d4f3fe4c6273b44ec2c0ae2d24c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230222/dc933cb4/attachment-0001.html>


More information about the ghc-commits mailing list