[Git][ghc/ghc][master] cmm: Don't parse MO_BSwap for W8

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Jun 20 11:26:36 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00
cmm: Don't parse MO_BSwap for W8

Don't support parsing bswap8, since bswap8 is not really an operation
and would have to be implemented as a no-op (and currently is not
implemented at all).

Fixes #25002

- - - - -


1 changed file:

- compiler/GHC/Cmm/Parser.y


Changes:

=====================================
compiler/GHC/Cmm/Parser.y
=====================================
@@ -1146,12 +1146,15 @@ callishMachOps platform = listToUFM $
         ( "prefetch0", (MO_Prefetch_Data 0,)),
         ( "prefetch1", (MO_Prefetch_Data 1,)),
         ( "prefetch2", (MO_Prefetch_Data 2,)),
-        ( "prefetch3", (MO_Prefetch_Data 3,))
+        ( "prefetch3", (MO_Prefetch_Data 3,)),
+
+        ( "bswap16", (MO_BSwap W16,) ),
+        ( "bswap32", (MO_BSwap W32,) ),
+        ( "bswap64", (MO_BSwap W64,) )
     ] ++ concat
     [ allWidths "popcnt" MO_PopCnt
     , allWidths "pdep" MO_Pdep
     , allWidths "pext" MO_Pext
-    , allWidths "bswap" MO_BSwap
     , allWidths "cmpxchg" MO_Cmpxchg
     , allWidths "xchg" MO_Xchg
     , allWidths "load_relaxed" (\w -> MO_AtomicRead w MemOrderAcquire)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a8ff8f2bc115f00adfa4a1ed823e8375cb72132

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a8ff8f2bc115f00adfa4a1ed823e8375cb72132
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/20240620/eca2b6c7/attachment.html>


More information about the ghc-commits mailing list