summaryrefslogtreecommitdiff
path: root/includes/stg
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-09-13 17:55:31 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-17 19:24:20 -0400
commitc77fc3b20e93ba3215791d8d087a096853c4dd67 (patch)
tree20e9a500dace9446c33bc1aa125fb55ec4e3a3b1 /includes/stg
parent1c3af277582be677a11b1f292acb8c88ca3368b1 (diff)
downloadhaskell-c77fc3b20e93ba3215791d8d087a096853c4dd67.tar.gz
Deduplicate `HaskellMachRegs.h` and `RtsMachRegs.h` headers
Until 0472f0f6a92395d478e9644c0dbd12948518099f there was a meaningful host vs target distinction (though it wasn't used right, in genapply). After that, they did not differ in meaningful ways, so it's best to just only keep one.
Diffstat (limited to 'includes/stg')
-rw-r--r--includes/stg/HaskellMachRegs.h66
-rw-r--r--includes/stg/MachRegsForHost.h (renamed from includes/stg/RtsMachRegs.h)6
2 files changed, 3 insertions, 69 deletions
diff --git a/includes/stg/HaskellMachRegs.h b/includes/stg/HaskellMachRegs.h
deleted file mode 100644
index 917365778b..0000000000
--- a/includes/stg/HaskellMachRegs.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -----------------------------------------------------------------------------
- *
- * (c) The GHC Team, 1998-2011
- *
- * Registers used in STG code. Might or might not correspond to
- * actual machine registers.
- *
- * Do not #include this file directly: #include "Rts.h" instead.
- *
- * To understand the structure of the RTS headers, see the wiki:
- * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes
- *
- * ---------------------------------------------------------------------------*/
-
-#pragma once
-
-/*
- * Defining NO_REGS causes no global registers to be used. NO_REGS is
- * typically defined by GHC, via a command-line option passed to gcc,
- * when the -funregisterised flag is given.
- *
- * NB. When NO_REGS is on, calling & return conventions may be
- * different. For example, all function arguments will be passed on
- * the stack, and components of an unboxed tuple will be returned on
- * the stack rather than in registers.
- */
-#if defined(NO_REGS)
-
-#define MACHREGS_NO_REGS 1
-
-#else
-
-#define MACHREGS_NO_REGS 0
-
-#if defined(i386_HOST_ARCH)
-#define MACHREGS_i386 1
-#endif
-
-#if defined(x86_64_HOST_ARCH)
-#define MACHREGS_x86_64 1
-#endif
-
-#if defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \
- || defined(powerpc64le_HOST_ARCH) || defined(rs6000_HOST_ARCH)
-#define MACHREGS_powerpc 1
-#endif
-
-#if defined(sparc_HOST_ARCH)
-#define MACHREGS_sparc 1
-#endif
-
-#if defined(arm_HOST_ARCH)
-#define MACHREGS_arm 1
-#endif
-
-#if defined(aarch64_HOST_ARCH)
-#define MACHREGS_aarch64 1
-#endif
-
-#if defined(darwin_HOST_OS)
-#define MACHREGS_darwin 1
-#endif
-
-#endif
-
-#include "MachRegs.h"
diff --git a/includes/stg/RtsMachRegs.h b/includes/stg/MachRegsForHost.h
index dff389aa93..135c7974bd 100644
--- a/includes/stg/RtsMachRegs.h
+++ b/includes/stg/MachRegsForHost.h
@@ -2,10 +2,10 @@
*
* (c) The GHC Team, 1998-2011
*
- * Registers used in STG code. Might or might not correspond to
- * actual machine registers.
+ * This header includes MachRegs.h "selecting" regs for the current host
+ * platform.
*
- * Do not #include this file directly: #include "Rts.h" instead.
+ * Don't #include this in the RTS directly, instead include "RTS.h".
*
* To understand the structure of the RTS headers, see the wiki:
* https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes