aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2007-11-05 17:13:46 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2007-11-05 17:13:46 +0000
commitb76c3c4beeae8e72d009d9a37d655f79cd580804 (patch)
treed9b1db9abf800db89044e66cfd259861dd9e81a8 /gcc
parent04e0cb885cfba02870a9c00debc68ef2a86ce8a7 (diff)
downloadgcc-b76c3c4beeae8e72d009d9a37d655f79cd580804.zip
gcc-b76c3c4beeae8e72d009d9a37d655f79cd580804.tar.gz
gcc-b76c3c4beeae8e72d009d9a37d655f79cd580804.tar.bz2
config.gcc (arm*-*-*): Set c_target_objs and cxx_target_objs.
2007-11-05 Paul Brook <paul@codesourcery.com> gcc/ * config.gcc (arm*-*-*): Set c_target_objs and cxx_target_objs. * config/arm/arm.c (arm_lang_output_object_attributes_hook): New. (arm_file_start): Don't set Tag_ABI_PCS_wchar_t. Call arm_lang_output_object_attributes_hook. * config/arm/arm.h (arm_lang_output_object_attributes_hook): Declare. (REGISTER_TARGET_PRAGMAS): Call arm_lang_object_attributes_init. * config/arm/arm-protos.h (arm_lang_object_attributes_init): Add prototype. * config/arm/t-arm.c (arm.o): New rule. * config/arm/arm-c.c: New file. From-SVN: r129904
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config/arm/arm-c.c27
-rw-r--r--gcc/config/arm/arm-protos.h2
-rw-r--r--gcc/config/arm/arm.c9
-rw-r--r--gcc/config/arm/arm.h4
-rw-r--r--gcc/config/arm/t-arm5
7 files changed, 62 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0a5f2d8..5c27131 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+2007-11-05 Paul Brook <paul@codesourcery.com>
+
+ * Makefile.target: Add ssd0303.o, pl022.o and ssd0323.o.
+ * vl.c (register_machines): Add lm3s6965evb_machine.
+ * vl.h (armv7m_init): Add.
+ (lm3s6965evb_machine): Declare.
+ (pl022_init): New prototype.
+ (ssd0323_xfer_ssi, ssd0323_init): New prototype.
+ * hw/ssd0323.c: New file.
+ * hw/armv7m.c (armv7m_init): Remove board init code.
+ (lm3s811evb_machine): Remove.
+ * hw/osram_oled.c: Rename...
+ * hw/ssd0303.c: ... to this.
+ * hw/pl022.c: New file.
+ * hw/stellaris.c: Define and use stellaris_boards.
+ (lm3s811evb_machine, lm3s6965evb_machine): New.
+
2007-11-05 Nick Clifton <nickc@redhat.com>
Sebastian Pop <sebastian.pop@amd.com>
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3c23c25..a46dbd6 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -259,6 +259,8 @@ strongarm*-*-*)
arm*-*-*)
cpu_type=arm
extra_headers="mmintrin.h arm_neon.h"
+ c_target_objs="arm-c.o"
+ cxx_target_objs="arm-c.o"
;;
bfin*-*)
cpu_type=bfin
diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c
new file mode 100644
index 0000000..60cf5a9
--- /dev/null
+++ b/gcc/config/arm/arm-c.c
@@ -0,0 +1,27 @@
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tm_p.h"
+#include "tree.h"
+#include "output.h"
+#include "c-common.h"
+
+
+/* Output C specific EABI object attributes. These can not be done in
+ arm.c because they require information from the C frontend. */
+
+static void arm_output_c_attributes(void)
+{
+ /* Tag_ABI_PCS_wchar_t. */
+ asm_fprintf (asm_out_file, "\t.eabi_attribute 18, %d\n",
+ (int)(TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT));
+}
+
+
+/* Setup so that common code calls arm_output_c_attributes. */
+
+void arm_lang_object_attributes_init(void)
+{
+ arm_lang_output_object_attributes_hook = arm_output_c_attributes;
+}
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index a13b82a..3a71744 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -207,6 +207,8 @@ extern void arm_pr_long_calls (struct cpp_reader *);
extern void arm_pr_no_long_calls (struct cpp_reader *);
extern void arm_pr_long_calls_off (struct cpp_reader *);
+extern void arm_lang_object_attributes_init(void);
+
extern const char *arm_mangle_type (const_tree);
#endif /* ! GCC_ARM_PROTOS_H */
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index e4b30b3..f09606c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -59,6 +59,8 @@ typedef struct minipool_fixup Mfix;
const struct attribute_spec arm_attribute_table[];
+void (*arm_lang_output_object_attributes_hook)(void);
+
/* Forward function declarations. */
static arm_stack_offsets *arm_get_frame_offsets (void);
static void arm_add_gc_roots (void);
@@ -17508,10 +17510,6 @@ arm_file_start (void)
are used. However we don't have any easy way of figuring this out.
Conservatively record the setting that would have been used. */
- /* Tag_ABI_PCS_wchar_t. */
- asm_fprintf (asm_out_file, "\t.eabi_attribute 18, %d\n",
- (int)WCHAR_TYPE_SIZE / BITS_PER_UNIT);
-
/* Tag_ABI_FP_rounding. */
if (flag_rounding_math)
asm_fprintf (asm_out_file, "\t.eabi_attribute 19, 1\n");
@@ -17547,6 +17545,9 @@ arm_file_start (void)
else
val = 6;
asm_fprintf (asm_out_file, "\t.eabi_attribute 30, %d\n", val);
+
+ if (arm_lang_output_object_attributes_hook)
+ arm_lang_output_object_attributes_hook();
}
default_file_start();
}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 9c8534c..2b83335 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -132,6 +132,8 @@ extern rtx pool_vector_label;
/* Set to 1 when a return insn is output, this means that the epilogue
is not needed. */
extern int return_used_this_function;
+/* Callback to output language specific object attributes. */
+extern void (*arm_lang_output_object_attributes_hook)(void);
/* Just in case configure has failed to define anything. */
#ifndef TARGET_CPU_DEFAULT
@@ -2287,10 +2289,12 @@ extern unsigned arm_pic_register;
extern int making_const_table;
/* Handle pragmas for compatibility with Intel's compilers. */
+/* Also abuse this to register additional C specific EABI attributes. */
#define REGISTER_TARGET_PRAGMAS() do { \
c_register_pragma (0, "long_calls", arm_pr_long_calls); \
c_register_pragma (0, "no_long_calls", arm_pr_no_long_calls); \
c_register_pragma (0, "long_calls_off", arm_pr_long_calls_off); \
+ arm_lang_object_attributes_init(); \
} while (0)
/* Condition code information. */
diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm
index cde00ee..96e4e49 100644
--- a/gcc/config/arm/t-arm
+++ b/gcc/config/arm/t-arm
@@ -23,3 +23,8 @@ $(srcdir)/config/arm/arm-tune.md: $(srcdir)/config/arm/gentune.sh \
$(SHELL) $(srcdir)/config/arm/gentune.sh \
$(srcdir)/config/arm/arm-cores.def > \
$(srcdir)/config/arm/arm-tune.md
+
+arm-c.o: $(srcdir)/config/arm/arm-c.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H)
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/arm/arm-c.c
+