summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorCarter Schonwald <carter.schonwald@gmail.com>2019-04-10 20:28:41 -0400
committerCarter Schonwald <carter.schonwald@gmail.com>2019-04-10 20:28:41 -0400
commit42504f4a575395a35eec5c3fd7c9ef6e2b54e68e (patch)
treedc68a9ce346a6dd88203b2e70a0eb727082045a3 /includes
parentbe0dde8e3c27ca56477d1d1801bb77621f3618e1 (diff)
downloadhaskell-42504f4a575395a35eec5c3fd7c9ef6e2b54e68e.tar.gz
removing x87 register support from native code gen
* simplifies registers to have GPR, Float and Double, by removing the SSE2 and X87 Constructors * makes -msse2 assumed/default for x86 platforms, fixing a long standing nondeterminism in rounding behavior in 32bit haskell code * removes the 80bit floating point representation from the supported float sizes * theres still 1 tiny bit of x87 support needed, for handling float and double return values in FFI calls wrt the C ABI on x86_32, but this one piece does not leak into the rest of NCG. * Lots of code thats not been touched in a long time got deleted as a consequence of all of this all in all, this change paves the way towards a lot of future further improvements in how GHC handles floating point computations, along with making the native code gen more accessible to a larger pool of contributors.
Diffstat (limited to 'includes')
-rw-r--r--includes/CodeGen.Platform.hs102
1 files changed, 48 insertions, 54 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
index 2a373283d4..867dd14fb0 100644
--- a/includes/CodeGen.Platform.hs
+++ b/includes/CodeGen.Platform.hs
@@ -41,65 +41,59 @@ import Reg
# define r15 15
# endif
-# define fake0 16
-# define fake1 17
-# define fake2 18
-# define fake3 19
-# define fake4 20
-# define fake5 21
-- N.B. XMM, YMM, and ZMM are all aliased to the same hardware registers hence
-- being assigned the same RegNos.
-# define xmm0 24
-# define xmm1 25
-# define xmm2 26
-# define xmm3 27
-# define xmm4 28
-# define xmm5 29
-# define xmm6 30
-# define xmm7 31
-# define xmm8 32
-# define xmm9 33
-# define xmm10 34
-# define xmm11 35
-# define xmm12 36
-# define xmm13 37
-# define xmm14 38
-# define xmm15 39
+# define xmm0 16
+# define xmm1 17
+# define xmm2 18
+# define xmm3 19
+# define xmm4 20
+# define xmm5 21
+# define xmm6 22
+# define xmm7 23
+# define xmm8 24
+# define xmm9 25
+# define xmm10 26
+# define xmm11 27
+# define xmm12 28
+# define xmm13 29
+# define xmm14 30
+# define xmm15 31
-# define ymm0 24
-# define ymm1 25
-# define ymm2 26
-# define ymm3 27
-# define ymm4 28
-# define ymm5 29
-# define ymm6 30
-# define ymm7 31
-# define ymm8 32
-# define ymm9 33
-# define ymm10 34
-# define ymm11 35
-# define ymm12 36
-# define ymm13 37
-# define ymm14 38
-# define ymm15 39
+# define ymm0 16
+# define ymm1 17
+# define ymm2 18
+# define ymm3 19
+# define ymm4 20
+# define ymm5 21
+# define ymm6 22
+# define ymm7 23
+# define ymm8 24
+# define ymm9 25
+# define ymm10 26
+# define ymm11 27
+# define ymm12 28
+# define ymm13 29
+# define ymm14 30
+# define ymm15 31
-# define zmm0 24
-# define zmm1 25
-# define zmm2 26
-# define zmm3 27
-# define zmm4 28
-# define zmm5 29
-# define zmm6 30
-# define zmm7 31
-# define zmm8 32
-# define zmm9 33
-# define zmm10 34
-# define zmm11 35
-# define zmm12 36
-# define zmm13 37
-# define zmm14 38
-# define zmm15 39
+# define zmm0 16
+# define zmm1 17
+# define zmm2 18
+# define zmm3 19
+# define zmm4 20
+# define zmm5 21
+# define zmm6 22
+# define zmm7 23
+# define zmm8 24
+# define zmm9 25
+# define zmm10 26
+# define zmm11 27
+# define zmm12 28
+# define zmm13 29
+# define zmm14 30
+# define zmm15 31
-- Note: these are only needed for ARM/ARM64 because globalRegMaybe is now used in CmmSink.hs.
-- Since it's only used to check 'isJust', the actual values don't matter, thus