[Git][ghc/ghc][wip/prelude-for] 3 commits: ghc-internal: Update prologue.txt to reflect package description

Melanie Brown (@mixphix) gitlab at gitlab.haskell.org
Sun Jun 9 13:46:02 UTC 2024



Melanie Brown pushed to branch wip/prelude-for at Glasgow Haskell Compiler / GHC


Commits:
391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00
ghc-internal: Update prologue.txt to reflect package description

- - - - -
3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00
compiler: Clarify comment regarding need for MOVABS

The comment wasn't clear in stating that it was only applicable to
immediate source and memory target operands.

- - - - -
a8184e1b by Melanie Brown at 2024-06-09T13:45:58+00:00
export GHC.Internal.Data.Traversable.for from Prelude

- - - - -


3 changed files:

- compiler/GHC/CmmToAsm/X86/Instr.hs
- libraries/base/src/Prelude.hs
- libraries/ghc-internal/prologue.txt


Changes:

=====================================
compiler/GHC/CmmToAsm/X86/Instr.hs
=====================================
@@ -198,10 +198,13 @@ data Instr
 
         -- Moves.
         | MOV         Format Operand Operand
-             -- ^ N.B. when used with the 'II64' 'Format', the source
+             -- ^ N.B. Due to AT&T assembler quirks, when used with 'II64'
+             -- 'Format' immediate source and memory target operand, the source
              -- operand is interpreted to be a 32-bit sign-extended value.
-             -- True 64-bit operands need to be moved with @MOVABS@, which we
-             -- currently don't use.
+             -- True 64-bit operands need to be either first moved to a register or moved
+             -- with @MOVABS@; we currently do not use this instruction in GHC.
+             -- See https://stackoverflow.com/questions/52434073/whats-the-difference-between-the-x86-64-att-instructions-movq-and-movabsq.
+
         | MOVD   Format Operand Operand -- ^ MOVD/MOVQ SSE2 instructions
                                         -- (bitcast between a general purpose
                                         -- register and a float register).


=====================================
libraries/base/src/Prelude.hs
=====================================
@@ -94,7 +94,7 @@ module Prelude (
              sum),      -- :: Num a => t a -> a
              -- toList) -- :: Foldable t => t a -> [a]
 
-    Traversable(traverse, sequenceA, mapM, sequence),
+    Traversable(traverse, sequenceA, mapM, sequence), for,
 
     -- ** Miscellaneous functions
     id, const, (.), flip, ($), until,
@@ -173,7 +173,7 @@ import GHC.Internal.Data.Foldable    ( Foldable(..) )
 import qualified GHC.Internal.Data.Foldable as Foldable
 import GHC.Internal.Data.Functor     ( (<$>) )
 import GHC.Internal.Data.Maybe
-import GHC.Internal.Data.Traversable ( Traversable(..) )
+import GHC.Internal.Data.Traversable ( Traversable(..), for )
 import GHC.Internal.Data.Tuple
 
 import GHC.Internal.Base hiding ( foldr, mapM, sequence )


=====================================
libraries/ghc-internal/prologue.txt
=====================================
@@ -1,3 +1,2 @@
-This package contains the @Prelude@ and its support libraries, and a large
-collection of useful libraries ranging from data structures to parsing
-combinators and debugging utilities.
+This package contains the implementation of GHC's standard libraries and is
+not intended for use by end-users.



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/57585b5817e3aec532e53ec60b1760fcebfbf927...a8184e1bdd247d7145976431823b47bc8b39bede

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/57585b5817e3aec532e53ec60b1760fcebfbf927...a8184e1bdd247d7145976431823b47bc8b39bede
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/20240609/2580e85a/attachment-0001.html>


More information about the ghc-commits mailing list