From patchwork Wed Feb 11 06:03:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 438692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 00B3C14012E for ; Wed, 11 Feb 2015 17:04:34 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=WGfcbM1kB63IZJhuUQRVFOTvY7oIa/Qt6C8yzkGus4EBDk UD9uNmmaRaLuZQbDRljOK1XqLgsh7TTQu86OAzhM7FrJh0TE1kzUShQ45lxcauMT OBz6M4iUOrs3kVtAg/BdHnacdc6htQGdFd0p9iNOGKP2YVq04DBbDYItbpEhU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=8geXlRIptAqMiG3HmCH8IDoBw2E=; b=GulQSlMM3e3ftIrz5gCr yfH4QLy6gyt/iKovHue3OR0sfJqjXxE4hiGJgbY3GJjBFjDy5ArXPxY23utilM6M GXfXrQupIKvWE9K00zjWtqnCsPrzoJJ8hZo11kCacIFTYKtN4oeRKYuOeUkJUb6d Mun7D7+DL05IiDie/nAWoYM= Received: (qmail 5292 invoked by alias); 11 Feb 2015 06:04:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5273 invoked by uid 89); 11 Feb 2015 06:04:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-la0-f48.google.com Received: from mail-la0-f48.google.com (HELO mail-la0-f48.google.com) (209.85.215.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 11 Feb 2015 06:04:00 +0000 Received: by lamq1 with SMTP id q1so1323961lam.5; Tue, 10 Feb 2015 22:03:56 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.148.34 with SMTP id tp2mr26279441lbb.94.1423634636487; Tue, 10 Feb 2015 22:03:56 -0800 (PST) Received: by 10.25.21.213 with HTTP; Tue, 10 Feb 2015 22:03:56 -0800 (PST) Date: Tue, 10 Feb 2015 22:03:56 -0800 Message-ID: Subject: [PATCH] Implement boehm-gc for AARCH64:ILP32 From: Andrew Pinski To: GCC Patches , Java Patch List , bdwgc@lists.opendylan.org X-IsSubscribed: yes Hi, This is a simple patch which allows all of the boehm-gc testsuite that is included with GCC to pass for AARCH64:ILP32. Basically we need to set CPP_WORDSZ to 32 and the alignment to 4 so we detect pointers correctly. OK for GCC? Bootstrapped and tested for aarch64-linux-gnu with no regressions and many libjava testcases now pass. OK for boehm-gc upstream? I don't have write access to upstream sources though, if approved there please apply it also. Thanks, Andrew Pinski GCC ChangeLog: * include/private/gcconfig.h (CPP_WORDSZ): Correct for AARCH64:ILP32. (ALIGNMENT): Correct for AARCH64:ILP32. commit 7d15d08c61991c3f7fea822fb567106dde83a166 Author: Andrew Pinski Date: Wed Feb 11 02:35:45 2015 +0000 Fix boehm-gc for AARCH64:ILP32 * include/private/gcconfig.h (CPP_WORDSZ): Correct for AARCH64:ILP32. (ALIGNMENT): Correct for AARCH64:ILP32. diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index aa80d53..989a734 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2020,9 +2020,14 @@ # endif # ifdef AARCH64 -# define CPP_WORDSZ 64 # define MACH_TYPE "AARCH64" -# define ALIGNMENT 8 +# ifdef __ILP32__ +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# else +# define CPP_WORDSZ 64 +# define ALIGNMENT 8 +# endif # ifndef HBLKSIZE # define HBLKSIZE 4096 # endif diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index 7e081d9..049e24c 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -1854,9 +1854,14 @@ # endif # ifdef AARCH64 -# define CPP_WORDSZ 64 # define MACH_TYPE "AARCH64" -# define ALIGNMENT 8 +# ifdef __ILP32__ +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# else +# define CPP_WORDSZ 64 +# define ALIGNMENT 8 +# endif # ifndef HBLKSIZE # define HBLKSIZE 4096 # endif