From fd8b666acfee5524a2d7c8b845a3782f6a89bec7 Mon Sep 17 00:00:00 2001 From: Stefan Schulze Frielinghaus Date: Tue, 8 Oct 2019 12:32:15 +0200 Subject: Implement s390x LLVM backend. This patch adds support for the s390x architecture for the LLVM code generator. The patch includes a register mapping of STG registers onto s390x machine registers which enables a registerised build. --- compiler/llvmGen/LlvmCodeGen/Data.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/llvmGen') diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index 70a04e6bc9..4c07f8ee8f 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -71,6 +71,7 @@ genLlvmData (sec, Statics lbl xs) = do label <- strCLabel_llvm lbl static <- mapM genData xs lmsec <- llvmSection sec + platform <- getLlvmPlatform let types = map getStatType static strucTy = LMStruct types @@ -79,7 +80,8 @@ genLlvmData (sec, Statics lbl xs) = do struct = Just $ LMStaticStruc static tyAlias link = linkage lbl align = case sec of - Section CString _ -> Just 1 + Section CString _ -> if (platformArch platform == ArchS390X) + then Just 2 else Just 1 _ -> Nothing const = if isSecConstant sec then Constant else Global varDef = LMGlobalVar label tyAlias link lmsec align const -- cgit v1.2.1