summaryrefslogtreecommitdiffstats
path: root/gcc/config/arm/pe.h
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-11 22:44:29 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-11 22:44:29 +0000
commitf14c047a0f7c6e6244af6ee7aaf325cd1a6539fb (patch)
tree6cec572822bbe316028951805f3c6da3de63c804 /gcc/config/arm/pe.h
parentaf1b847e9045edb86401ac84ecfbb6e3b7cc7ae0 (diff)
downloadppe42-gcc-f14c047a0f7c6e6244af6ee7aaf325cd1a6539fb.tar.gz
ppe42-gcc-f14c047a0f7c6e6244af6ee7aaf325cd1a6539fb.zip
Minot for,matting imrpovemants and synchronisation with devo sources
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31937 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/pe.h')
-rw-r--r--gcc/config/arm/pe.h191
1 files changed, 98 insertions, 93 deletions
diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h
index 978c296c40e..66dfc6b2b10 100644
--- a/gcc/config/arm/pe.h
+++ b/gcc/config/arm/pe.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for ARM with PE obj format.
- Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GNU CC.
@@ -44,18 +44,22 @@ Boston, MA 02111-1307, USA. */
/* Experimental addition for pr 7885.
Ignore dllimport for functions. */
-#define TARGET_NOP_FUN_DLLIMPORT (target_flags & 0x20000)
+#define TARGET_FLAG_NOP_FUN (1 << 24)
+
+#undef TARGET_NOP_FUN_DLLIMPORT
+#define TARGET_NOP_FUN_DLLIMPORT (target_flags & TARGET_FLAG_NOP_FUN)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
-{ "nop-fun-dllimport", 0x20000, "Ignore dllimport attribute for functions" }, \
-{ "no-nop-fun-dllimport", -0x20000, "" },
+{ "nop-fun-dllimport", TARGET_FLAG_NOP_FUN, "Ignore dllimport attribute for functions" }, \
+{ "no-nop-fun-dllimport", - TARGET_FLAG_NOP_FUN, "" },
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT + 0x20000)
+#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
+
#undef WCHAR_TYPE
-#define WCHAR_TYPE "short unsigned int"
+#define WCHAR_TYPE "short unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
@@ -91,19 +95,10 @@ Boston, MA 02111-1307, USA. */
The attributes in ATTRIBUTES have previously been assigned to DECL. */
#undef VALID_MACHINE_DECL_ATTRIBUTE
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
-arm_pe_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
-
-#if 0 /* Needed when we tried type attributes. */
-/* A C expression whose value is zero if the attributes on
- TYPE1 and TYPE2 are incompatible, one if they are compatible,
- and two if they are nearly compatible (which causes a warning to be
- generated). */
-#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
-arm_pe_comp_type_attributes ((TYPE1), (TYPE2))
-#endif
+ arm_pe_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
#define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \
-arm_pe_merge_machine_decl_attributes ((OLD), (NEW))
+ arm_pe_merge_machine_decl_attributes ((OLD), (NEW))
/* In addition to the stuff done in arm.h, we must mark dll symbols specially.
Definitions of dllexport'd objects install some info in the .drectve
@@ -114,7 +109,7 @@ arm_pe_merge_machine_decl_attributes ((OLD), (NEW))
Note that we can be called twice on the same decl. */
#undef ENCODE_SECTION_INFO
#define ENCODE_SECTION_INFO(DECL) \
-arm_pe_encode_section_info (DECL)
+ arm_pe_encode_section_info (DECL)
/* Used to implement dllexport overriding dllimport semantics. It's also used
to handle vtables - the first pass won't do anything because
@@ -146,7 +141,7 @@ arm_pe_encode_section_info (DECL)
#define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL)
-#define UNIQUE_SECTION(DECL,RELOC) arm_pe_unique_section (DECL, RELOC)
+#define UNIQUE_SECTION(DECL, RELOC) arm_pe_unique_section (DECL, RELOC)
#define SUPPORTS_ONE_ONLY 1
@@ -156,87 +151,97 @@ arm_pe_encode_section_info (DECL)
define this macro in such cases. */
#undef ASM_OUTPUT_SECTION_NAME
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
-do { \
- if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
- fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
- else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
- fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
- else \
- fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
- /* Functions may have been compiled at various levels of \
- optimization so we can't use `same_size' here. Instead, \
- have the linker pick one. */ \
- if ((DECL) && DECL_ONE_ONLY (DECL)) \
- fprintf (STREAM, "\t.linkonce %s\n", \
- TREE_CODE (DECL) == FUNCTION_DECL \
- ? "discard" : "same_size"); \
-} while (0)
+ do \
+ { \
+ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
+ fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
+ else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
+ fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
+ else \
+ fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
+ /* Functions may have been compiled at various levels of \
+ optimization so we can't use `same_size' here. \
+ Instead, have the linker pick one. */ \
+ if ((DECL) && DECL_ONE_ONLY (DECL)) \
+ fprintf (STREAM, "\t.linkonce %s\n", \
+ TREE_CODE (DECL) == FUNCTION_DECL \
+ ? "discard" : "same_size"); \
+ } \
+ while (0)
/* This outputs a lot of .req's to define alias for various registers.
Let's try to avoid this. */
#undef ASM_FILE_START
-#define ASM_FILE_START(STREAM) \
-do { \
- extern char * version_string; \
- fprintf (STREAM, "%s Generated by gcc %s for ARM/pe\n", \
- ASM_COMMENT_START, version_string); \
- output_file_directive ((STREAM), main_input_filename); \
-} while (0)
+#define ASM_FILE_START(STREAM) \
+ do \
+ { \
+ extern char * version_string; \
+ asm_fprintf (STREAM, "%@ Generated by gcc %s for ARM/pe\n",\
+ version_string); \
+ output_file_directive ((STREAM), main_input_filename); \
+ } \
+ while (0)
/* Output a reference to a label. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
-fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, ARM_STRIP_NAME_ENCODING (NAME))
+ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, ARM_STRIP_NAME_ENCODING (NAME))
/* Output a function definition label. */
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
-do { \
- if (arm_dllexport_name_p (NAME)) \
+ do \
{ \
- drectve_section (); \
- fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
- ARM_STRIP_NAME_ENCODING (NAME)); \
- function_section (DECL); \
+ if (arm_dllexport_name_p (NAME)) \
+ { \
+ drectve_section (); \
+ fprintf (STREAM, "\t.ascii \" -export:%s\"\n",\
+ ARM_STRIP_NAME_ENCODING (NAME)); \
+ function_section (DECL); \
+ } \
+ if (TARGET_POKE_FUNCTION_NAME) \
+ arm_poke_function_name ((STREAM), (NAME)); \
+ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
} \
- if (TARGET_POKE_FUNCTION_NAME) \
- arm_poke_function_name ((STREAM), (NAME)); \
- ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
-} while (0)
+ while (0)
/* Output a common block. */
#undef ASM_OUTPUT_COMMON
-#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
-do { \
- if (arm_dllexport_name_p (NAME)) \
- { \
- drectve_section (); \
- fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \
- ARM_STRIP_NAME_ENCODING (NAME)); \
- } \
- if (! arm_dllimport_name_p (NAME)) \
+#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
+ do \
{ \
- fprintf ((STREAM), "\t.comm\t"); \
- assemble_name ((STREAM), (NAME)); \
- fprintf ((STREAM), ", %d\t%s %d\n", \
- (ROUNDED), ASM_COMMENT_START, (SIZE)); \
+ if (arm_dllexport_name_p (NAME)) \
+ { \
+ drectve_section (); \
+ fprintf ((STREAM), "\t.ascii \" -export:%s\"\n",\
+ ARM_STRIP_NAME_ENCODING (NAME)); \
+ } \
+ if (! arm_dllimport_name_p (NAME)) \
+ { \
+ fprintf ((STREAM), "\t.comm\t"); \
+ assemble_name ((STREAM), (NAME)); \
+ asm_fprintf ((STREAM), ", %d\t%@ %d\n", \
+ (ROUNDED), (SIZE)); \
+ } \
} \
-} while (0)
+ while (0)
/* Output the label for an initialized variable. */
#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
-do { \
- if (arm_dllexport_name_p (NAME)) \
+#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
+ do \
{ \
- enum in_section save_section = in_section; \
- drectve_section (); \
- fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
- ARM_STRIP_NAME_ENCODING (NAME)); \
- switch_to_section (save_section, (DECL)); \
+ if (arm_dllexport_name_p (NAME)) \
+ { \
+ enum in_section save_section = in_section; \
+ drectve_section (); \
+ fprintf (STREAM, "\t.ascii \" -export:%s\"\n",\
+ ARM_STRIP_NAME_ENCODING (NAME)); \
+ switch_to_section (save_section, (DECL)); \
+ } \
+ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
} \
- ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
-} while (0)
+ while (0)
/* Support the ctors/dtors and other sections. */
@@ -272,21 +277,21 @@ drectve_section () \
The problem is that we want to temporarily switch sections in
ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */
-#define SWITCH_TO_SECTION_FUNCTION \
-void \
-switch_to_section (section, decl) \
- enum in_section section; \
- tree decl; \
-{ \
- switch (section) \
- { \
- case in_text: text_section (); break; \
- case in_data: data_section (); break; \
- case in_named: named_section (decl, NULL, 0); break; \
- case in_rdata: rdata_section (); break; \
- case in_ctors: ctors_section (); break; \
- case in_dtors: dtors_section (); break; \
- case in_drectve: drectve_section (); break; \
- default: abort (); break; \
- } \
+#define SWITCH_TO_SECTION_FUNCTION \
+void \
+switch_to_section (section, decl) \
+ enum in_section section; \
+ tree decl; \
+{ \
+ switch (section) \
+ { \
+ case in_text: text_section (); break; \
+ case in_data: data_section (); break; \
+ case in_named: named_section (decl, NULL, 0); break; \
+ case in_rdata: rdata_section (); break; \
+ case in_ctors: ctors_section (); break; \
+ case in_dtors: dtors_section (); break; \
+ case in_drectve: drectve_section (); break; \
+ default: abort (); break; \
+ } \
}
OpenPOWER on IntegriCloud