summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/X86
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/CmmToAsm/X86')
-rw-r--r--compiler/GHC/CmmToAsm/X86/CodeGen.hs12
-rw-r--r--compiler/GHC/CmmToAsm/X86/Instr.hs7
-rw-r--r--compiler/GHC/CmmToAsm/X86/Ppr.hs8
3 files changed, 10 insertions, 17 deletions
diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
index 52f2a52123..028887a56f 100644
--- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
@@ -129,7 +129,6 @@ cmmTopCodeGen (CmmData sec dat) =
{- Note [Verifying basic blocks]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
We want to guarantee a few things about the results
of instruction selection.
@@ -231,7 +230,6 @@ addSpUnwindings instr = return $ unitOL instr
{- Note [Keeping track of the current block]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
When generating instructions for Cmm we sometimes require
the current block for things like retry loops.
@@ -2906,7 +2904,7 @@ evalArgs bid actuals
newLocalReg ty = LocalReg <$> getUniqueM <*> pure ty
-- Note [DIV/IDIV for bytes]
---
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~
-- IDIV reminder:
-- Size Dividend Divisor Quotient Remainder
-- byte %ax r/m8 %al %ah
@@ -2990,7 +2988,7 @@ genCCall32' target dest_regs args = do
let
-- Align stack to 16n for calls, assuming a starting stack
-- alignment of 16n - word_size on procedure entry. Which we
- -- maintiain. See Note [rts/StgCRun.c : Stack Alignment on X86]
+ -- maintiain. See Note [Stack Alignment on X86] in rts/StgCRun.c.
sizes = map (arg_size_bytes . cmmExprType platform) (reverse args)
raw_arg_size = sum sizes + platformWordSizeInBytes platform
arg_pad_size = (roundTo 16 $ raw_arg_size) - raw_arg_size
@@ -3605,10 +3603,8 @@ condIntReg cond x y = do
return (Any II32 code)
------------------------------------------------------------
---- Note [SSE Parity Checks] ---
------------------------------------------------------------
-
+-- Note [SSE Parity Checks]
+-- ~~~~~~~~~~~~~~~~~~~~~~~~
-- We have to worry about unordered operands (eg. comparisons
-- against NaN). If the operands are unordered, the comparison
-- sets the parity flag, carry flag and zero flag.
diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs
index 947a25b2d8..1f1515b0c9 100644
--- a/compiler/GHC/CmmToAsm/X86/Instr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Instr.hs
@@ -120,7 +120,7 @@ Hence GLDZ and GLD1. Bwahahahahahahaha!
{-
Note [x86 Floating point precision]
-
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Intel's internal floating point registers are by default 80 bit
extended precision. This means that all operations done on values in
registers are done at 80 bits, and unless the intermediate values are
@@ -795,6 +795,8 @@ mkJumpInstr id
= [JXX ALWAYS id]
-- Note [Windows stack layout]
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
-- | On most OSes the kernel will place a guard page after the current stack
-- page. If you allocate larger than a page worth you may jump over this
-- guard page. Not only is this a security issue, but on certain OSes such
@@ -896,9 +898,8 @@ mkStackDeallocInstr platform amount
_ -> panic "X86.mkStackDeallocInstr"
---
-- Note [extra spill slots]
---
+-- ~~~~~~~~~~~~~~~~~~~~~~~~
-- If the register allocator used more spill slots than we have
-- pre-allocated (rESERVED_C_STACK_BYTES), then we must allocate more
-- C stack space on entry and exit from this proc. Therefore we
diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs
index 15e1b961df..49b6988c1d 100644
--- a/compiler/GHC/CmmToAsm/X86/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs
@@ -48,12 +48,8 @@ import GHC.Utils.Panic
import Data.Word
--- -----------------------------------------------------------------------------
--- Printing this stuff out
---
---
-- Note [Subsections Via Symbols]
---
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- If we are using the .subsections_via_symbols directive
-- (available on recent versions of Darwin),
-- we have to make sure that there is some kind of reference
@@ -163,7 +159,7 @@ pprBasicBlock config info_env (BasicBlock blockid instrs)
ppWhen (ncgDwarfEnabled config) (pdoc platform (mkAsmTempEndLabel infoLbl) <> colon)
-- Make sure the info table has the right .loc for the block
- -- coming right after it. See [Note: Info Offset]
+ -- coming right after it. See Note [Info Offset]
infoTableLoc = case instrs of
(l@LOCATION{} : _) -> pprInstr platform l
_other -> empty