From 006a34cfda9d744b0308fe6d74fa46598eb873ac Mon Sep 17 00:00:00 2001 From: Debian Haskell Group Date: Wed, 5 Oct 2016 19:27:23 +0000 Subject: [PATCH] sparc64-initial-platform-support Gbp-Pq: Name sparc64-initial-platform-support.patch --- aclocal.m4 | 6 +++++- compiler/main/DriverPipeline.hs | 1 + compiler/nativeGen/AsmCodeGen.hs | 1 + compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | 4 ++++ compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs | 1 + compiler/nativeGen/RegAlloc/Linear/Main.hs | 1 + compiler/nativeGen/TargetReg.hs | 5 +++++ compiler/utils/Platform.hs | 1 + 8 files changed, 19 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 75ac0f6e..535613e0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -193,6 +193,10 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], sparc) test -z "[$]2" || eval "[$]2=ArchSPARC" ;; + sparc64) + test -z "[$]2" || eval "[$]2=ArchSPARC64" + ;; + arm) GET_ARM_ISA() test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\"" @@ -209,7 +213,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], mipsel) test -z "[$]2" || eval "[$]2=ArchMipsel" ;; - hppa|hppa1_1|ia64|m68k|powerpc64le|rs6000|s390|s390x|sh4|sparc64|vax) + hppa|hppa1_1|ia64|m68k|powerpc64le|rs6000|s390|s390x|sh4|vax) test -z "[$]2" || eval "[$]2=ArchUnknown" ;; *) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index ff71cb4d..4c40805e 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -2208,6 +2208,7 @@ joinObjectFiles dflags o_files output_fn = do -- -r and --relax are incompatible for ld, so -- disable --relax explicitly. ++ (if platformArch (targetPlatform dflags) == ArchSPARC + || platformArch (targetPlatform dflags) == ArchSPARC64 && ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] else []) diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs index ac657dd5..08240778 100644 --- a/compiler/nativeGen/AsmCodeGen.hs +++ b/compiler/nativeGen/AsmCodeGen.hs @@ -171,6 +171,7 @@ nativeCodeGen dflags this_mod modLoc h us cmms ArchX86_64 -> nCG' (x86_64NcgImpl dflags) ArchPPC -> nCG' (ppcNcgImpl dflags) ArchSPARC -> nCG' (sparcNcgImpl dflags) + ArchSPARC64 -> panic "nativeCodeGen: No NCG for SPARC64" ArchARM {} -> panic "nativeCodeGen: No NCG for ARM" ArchARM64 -> panic "nativeCodeGen: No NCG for ARM64" ArchPPC_64 -> panic "nativeCodeGen: No NCG for PPC 64" diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs index eba2e431..52da77a7 100644 --- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs +++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs @@ -111,6 +111,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcInteger conflicts excl ArchX86_64 -> 5 ArchPPC -> 16 ArchSPARC -> 14 + ArchSPARC64 -> panic "trivColorable ArchSPARC64" ArchPPC_64 -> panic "trivColorable ArchPPC_64" ArchARM _ _ _ -> panic "trivColorable ArchARM" ArchARM64 -> panic "trivColorable ArchARM64" @@ -136,6 +137,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclus ArchX86_64 -> 0 ArchPPC -> 0 ArchSPARC -> 22 + ArchSPARC64 -> panic "trivColorable ArchSPARC64" ArchPPC_64 -> panic "trivColorable ArchPPC_64" ArchARM _ _ _ -> panic "trivColorable ArchARM" ArchARM64 -> panic "trivColorable ArchARM64" @@ -161,6 +163,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu ArchX86_64 -> 0 ArchPPC -> 26 ArchSPARC -> 11 + ArchSPARC64 -> panic "trivColorable ArchSPARC64" ArchPPC_64 -> panic "trivColorable ArchPPC_64" ArchARM _ _ _ -> panic "trivColorable ArchARM" ArchARM64 -> panic "trivColorable ArchARM64" @@ -186,6 +189,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDoubleSSE conflicts ex ArchX86_64 -> 10 ArchPPC -> 0 ArchSPARC -> 0 + ArchSPARC64 -> panic "trivColorable ArchSPARC64" ArchPPC_64 -> panic "trivColorable ArchPPC_64" ArchARM _ _ _ -> panic "trivColorable ArchARM" ArchARM64 -> panic "trivColorable ArchARM64" diff --git a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs index a1a00ba5..a8180d10 100644 --- a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs @@ -74,6 +74,7 @@ maxSpillSlots dflags ArchX86_64 -> X86.Instr.maxSpillSlots dflags ArchPPC -> PPC.Instr.maxSpillSlots dflags ArchSPARC -> SPARC.Instr.maxSpillSlots dflags + ArchSPARC64 -> panic "maxSpillSlots ArchSPARC64" ArchARM _ _ _ -> panic "maxSpillSlots ArchARM" ArchARM64 -> panic "maxSpillSlots ArchARM64" ArchPPC_64 -> panic "maxSpillSlots ArchPPC_64" diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs index d602d60d..0e0e7bf1 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Main.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs @@ -209,6 +209,7 @@ linearRegAlloc dflags entry_ids block_live sccs ArchX86_64 -> go $ (frInitFreeRegs platform :: X86_64.FreeRegs) ArchSPARC -> go $ (frInitFreeRegs platform :: SPARC.FreeRegs) ArchPPC -> go $ (frInitFreeRegs platform :: PPC.FreeRegs) + ArchSPARC64 -> panic "linearRegAlloc ArchSPARC64" ArchARM _ _ _ -> panic "linearRegAlloc ArchARM" ArchARM64 -> panic "linearRegAlloc ArchARM64" ArchPPC_64 -> panic "linearRegAlloc ArchPPC_64" diff --git a/compiler/nativeGen/TargetReg.hs b/compiler/nativeGen/TargetReg.hs index 96c17777..5b2df5c4 100644 --- a/compiler/nativeGen/TargetReg.hs +++ b/compiler/nativeGen/TargetReg.hs @@ -44,6 +44,7 @@ targetVirtualRegSqueeze platform ArchX86_64 -> X86.virtualRegSqueeze ArchPPC -> PPC.virtualRegSqueeze ArchSPARC -> SPARC.virtualRegSqueeze + ArchSPARC64 -> panic "targetVirtualRegSqueeze ArchSPARC64" ArchPPC_64 -> panic "targetVirtualRegSqueeze ArchPPC_64" ArchARM _ _ _ -> panic "targetVirtualRegSqueeze ArchARM" ArchARM64 -> panic "targetVirtualRegSqueeze ArchARM64" @@ -61,6 +62,7 @@ targetRealRegSqueeze platform ArchX86_64 -> X86.realRegSqueeze ArchPPC -> PPC.realRegSqueeze ArchSPARC -> SPARC.realRegSqueeze + ArchSPARC64 -> panic "targetRealRegSqueeze ArchSPARC64" ArchPPC_64 -> panic "targetRealRegSqueeze ArchPPC_64" ArchARM _ _ _ -> panic "targetRealRegSqueeze ArchARM" ArchARM64 -> panic "targetRealRegSqueeze ArchARM64" @@ -77,6 +79,7 @@ targetClassOfRealReg platform ArchX86_64 -> X86.classOfRealReg platform ArchPPC -> PPC.classOfRealReg ArchSPARC -> SPARC.classOfRealReg + ArchSPARC64 -> panic "targetClassOfRealReg ArchSPARC64" ArchPPC_64 -> panic "targetClassOfRealReg ArchPPC_64" ArchARM _ _ _ -> panic "targetClassOfRealReg ArchARM" ArchARM64 -> panic "targetClassOfRealReg ArchARM64" @@ -93,6 +96,7 @@ targetMkVirtualReg platform ArchX86_64 -> X86.mkVirtualReg ArchPPC -> PPC.mkVirtualReg ArchSPARC -> SPARC.mkVirtualReg + ArchSPARC64 -> panic "targetMkVirtualReg ArchSPARC64" ArchPPC_64 -> panic "targetMkVirtualReg ArchPPC_64" ArchARM _ _ _ -> panic "targetMkVirtualReg ArchARM" ArchARM64 -> panic "targetMkVirtualReg ArchARM64" @@ -109,6 +113,7 @@ targetRegDotColor platform ArchX86_64 -> X86.regDotColor platform ArchPPC -> PPC.regDotColor ArchSPARC -> SPARC.regDotColor + ArchSPARC64 -> panic "targetRegDotColor ArchSPARC64" ArchPPC_64 -> panic "targetRegDotColor ArchPPC_64" ArchARM _ _ _ -> panic "targetRegDotColor ArchARM" ArchARM64 -> panic "targetRegDotColor ArchARM64" diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 2e1ace85..9cc2acca 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -48,6 +48,7 @@ data Arch | ArchPPC | ArchPPC_64 | ArchSPARC + | ArchSPARC64 | ArchARM { armISA :: ArmISA , armISAExt :: [ArmISAExt] -- 2.30.2