[Git][ghc/ghc][wip/T23030] Deleted 1 commit: nativeGen/AArch64: Improve codegen for MO_Xor immediates

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Mar 9 14:35:51 UTC 2023



Ben Gamari pushed to branch wip/T23030 at Glasgow Haskell Compiler / GHC


WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.


Deleted commits:
97a2e97e by Ben Gamari at 2023-03-08T18:46:08-05:00
nativeGen/AArch64: Improve codegen for MO_Xor immediates

This extends the codegen to allow MO_Xor operands to be encoded as
bitmask immediates.

- - - - -


1 changed file:

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


Changes:

=====================================
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
=====================================
@@ -783,6 +783,11 @@ getRegister' config plat expr
       where w' = formatToWidth (cmmTypeFormat (cmmRegType reg))
             r' = getRegisterReg plat reg
 
+    CmmMachOp (MO_Xor w) [(CmmReg reg), CmmLit (CmmInt n _)] | isAArch64Bitmask (fromIntegral n) ->
+      return $ Any (intFormat w) (\d -> unitOL $ annExpr expr (EOR (OpReg w d) (OpReg w' r') (OpImm (ImmInteger n))))
+      where w' = formatToWidth (cmmTypeFormat (cmmRegType reg))
+            r' = getRegisterReg plat reg
+
     -- Generic case.
     CmmMachOp op [x, y] -> do
       -- alright, so we have an operation, and two expressions. And we want to essentially do



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97a2e97e67c549c4476b41a283aa0b372a51db7d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97a2e97e67c549c4476b41a283aa0b372a51db7d
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/20230309/39bb9e0a/attachment.html>


More information about the ghc-commits mailing list