This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Add x32 support to boehm-gc


Hi,

This patch adds x32 support to boehm-gc.  The same patch has been
sent to the boehm-gc mailing list. Tested on Linux/x32 and Linux/x86-64.
OK for trunk?

Thanks.


H.J.
----- Forwarded message from "H.J. Lu" <hongjiu.lu@intel.com> -----
Date: Mon, 16 Apr 2012 09:39:20 -0700
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Hans_Boehm@hp.com, gc@linux.hpl.hp.com
Subject: [bdwgc] PATCH: Add x32 support
User-Agent: Mutt/1.5.21 (2010-09-15)

Hi,

Here are 2 small patches to add x32 support to bdwgc.  X32 info can be
found at

https://sites.google.com/site/x32abi/

They are fully tested on Linux/x32 and Linux/x86-64.

Thanks.


H.J.
---
>From 16ea9de35f16f0859c40862f8ef310c0dde6082c Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 16 Apr 2012 09:26:07 -0700
Subject: [PATCH 1/2] Define ALIGNMENT and CPP_WORDSZ for x32

	* include/private/gcconfig.h: (ALIGNMENT): Set to 4 for x32.
	(CPP_WORDSZ): Set to 32 for x32.
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index a163e47..918d100 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -2117,8 +2117,13 @@
 
 # ifdef X86_64
 #   define MACH_TYPE "X86_64"
-#   define ALIGNMENT 8
-#   define CPP_WORDSZ 64
+#   ifdef __ILP32__
+#     define ALIGNMENT 4
+#     define CPP_WORDSZ 32
+#   else
+#     define ALIGNMENT 8
+#     define CPP_WORDSZ 64
+#   endif
 #   ifndef HBLKSIZE
 #     define HBLKSIZE 4096
 #   endif
-- 
1.7.6.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]