[Git][ghc/ghc][master] compiler: Clarify comment regarding need for MOVABS
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sun Jun 9 05:28:27 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
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.
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/X86/Instr.hs
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).
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3dca3b7dbb35ed44250448b8f4ff15aa1c118280
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3dca3b7dbb35ed44250448b8f4ff15aa1c118280
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/3316d0cd/attachment-0001.html>
More information about the ghc-commits
mailing list