public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
	Java Patch List <java-patches@gcc.gnu.org>,
		bdwgc@lists.opendylan.org
Subject: [PATCH] Implement boehm-gc for AARCH64:ILP32
Date: Wed, 11 Feb 2015 06:04:00 -0000	[thread overview]
Message-ID: <CA+=Sn1=rXCGm9sqidGNvCgik98O5Uk_w075Sw4j3qQ5w6C6ADg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

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.

[-- Attachment #2: fixboehm-gc-gcc.diff.txt --]
[-- Type: text/plain, Size: 834 bytes --]

commit 7d15d08c61991c3f7fea822fb567106dde83a166
Author: Andrew Pinski <apinski@cavium.com>
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/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

[-- Attachment #3: fixboehm-gc-upstream.diff.txt --]
[-- Type: text/plain, Size: 508 bytes --]

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

                 reply	other threads:[~2015-02-11  6:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+=Sn1=rXCGm9sqidGNvCgik98O5Uk_w075Sw4j3qQ5w6C6ADg@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=bdwgc@lists.opendylan.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).