Commit c77fc3b2 authored by John Ericson's avatar John Ericson Committed by Marge Bot

Deduplicate `HaskellMachRegs.h` and `RtsMachRegs.h` headers

Until 0472f0f6 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.
parent 1c3af277
......@@ -358,7 +358,7 @@
* Need MachRegs, because some of the RTS code is conditionally
* compiled based on REG_R1, REG_R2, etc.
*/
#include "stg/RtsMachRegs.h"
#include "stg/MachRegsForHost.h"
#include "rts/prof/LDV.h"
......
......@@ -314,7 +314,7 @@ external prototype return neither of these types to workaround #11395.
-------------------------------------------------------------------------- */
#include "stg/DLL.h"
#include "stg/RtsMachRegs.h"
#include "stg/MachRegsForHost.h"
#include "stg/Regs.h"
#include "stg/Ticky.h"
......
/* -----------------------------------------------------------------------------
*
* (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"
......@@ -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
......
......@@ -168,12 +168,11 @@ library
rts/storage/MBlock.h
rts/storage/TSO.h
stg/DLL.h
stg/HaskellMachRegs.h
stg/MachRegs.h
stg/MachRegsForHost.h
stg/MiscClosures.h
stg/Prim.h
stg/Regs.h
stg/RtsMachRegs.h
stg/SMP.h
stg/Ticky.h
stg/Types.h
......
......@@ -16,7 +16,7 @@ module Main(main) where
#include "../../includes/ghcconfig.h"
-- .. so that this header defines the right stuff.
#include "../../includes/stg/HaskellMachRegs.h"
#include "../../includes/stg/MachRegsForHost.h"
#include "../../includes/rts/Constants.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment