aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2007-03-29 01:44:26 +0000
committerMike Stump <mrs@gcc.gnu.org>2007-03-29 01:44:26 +0000
commit4beb5c4bd1e60a4bd7549795b39aa7ea16302b3d (patch)
tree8d0fca958d51ac19398d31feea8bba54ba658ec2 /gcc
parent77da2b7671205867709c00f31ae584047b55c826 (diff)
downloadgcc-4beb5c4bd1e60a4bd7549795b39aa7ea16302b3d.zip
gcc-4beb5c4bd1e60a4bd7549795b39aa7ea16302b3d.tar.gz
gcc-4beb5c4bd1e60a4bd7549795b39aa7ea16302b3d.tar.bz2
darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Add.
* config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Add. * config/darwin.h (MAX_OFILE_ALIGNMENT): Fix. testsuite: * gcc.dg/darwin-comm.c: Add. From-SVN: r123321
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/darwin.h6
-rw-r--r--gcc/config/darwin9.h11
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/darwin-comm.c4
5 files changed, 27 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1df1435..380c533 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-28 Mike Stump <mrs@apple.com>
+
+ * config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Add.
+ * config/darwin.h (MAX_OFILE_ALIGNMENT): Fix.
+
2007-03-28 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
* config.gcc: Accept barcelona as a variant of amdfam10.
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 07cc776..6512a0f 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -674,11 +674,11 @@ extern GTY(()) int darwin_ms_struct;
} \
} while (0)
-/* The maximum alignment which the object file format can support.
- For Mach-O, this is 2^15. */
+/* The maximum alignment which the object file format can support in
+ bits. For Mach-O, this is 2^15 bytes. */
#undef MAX_OFILE_ALIGNMENT
-#define MAX_OFILE_ALIGNMENT 0x8000
+#define MAX_OFILE_ALIGNMENT (0x8000 * 8)
/* Declare the section variables. */
#ifndef USED_FOR_TARGET
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
index 7431cfb..522bbcd 100644
--- a/gcc/config/darwin9.h
+++ b/gcc/config/darwin9.h
@@ -20,3 +20,14 @@
/* The linker can generate branch islands. */
#define DARWIN_LINKER_GENERATES_ISLANDS 1
+
+#undef ASM_OUTPUT_ALIGNED_COMMON
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+ do { \
+ unsigned HOST_WIDE_INT _new_size = SIZE; \
+ fprintf ((FILE), ".comm "); \
+ assemble_name ((FILE), (NAME)); \
+ if (_new_size == 0) _new_size = 1; \
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
+ (SIZE), floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
+ } while (0)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a869fb6..91b8a60 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-28 Mike Stump <mrs@apple.com>
+
+ * gcc.dg/darwin-comm.c: Add.
+
2007-03-28 Eric Christopher <echristo@apple.com>
* lib/target-supports.exp (check_effective_target_fstack_protector): New.
diff --git a/gcc/testsuite/gcc.dg/darwin-comm.c b/gcc/testsuite/gcc.dg/darwin-comm.c
new file mode 100644
index 0000000..74d5086
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/darwin-comm.c
@@ -0,0 +1,4 @@
+/* { dg-do compile { target *-*-darwin9* } } */
+/* { dg-final { scan-assembler ".comm _foo,1,15" } } */
+
+char foo __attribute__ ((aligned(32768)));