summaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-03-02 20:23:21 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-03-02 20:23:21 -0800
commitb20032503b0ecc63b4ce05e65fda684b47afef3b (patch)
tree0c4d8b48d85a563b3f4acbe81debdbebc7911eac /gcc/config/i386
parent5c60f03d436955a225fd4e255af691f5782232f4 (diff)
downloadgcc-b20032503b0ecc63b4ce05e65fda684b47afef3b.tar.gz
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h, config/arm/arm.h, config/arm/pe.c, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h, config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h, config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes FIRST argument. As needed, examine it and do nothing. * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h, config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, config/mcore/mcore.h: Remove REDO_SECTION_INFO_P. * config/arm/t-pe (pe.o): Add dependencies. From-SVN: r50236
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/cygwin.h20
-rw-r--r--gcc/config/i386/i386-interix.h4
-rw-r--r--gcc/config/i386/i386.h2
-rw-r--r--gcc/config/i386/osfrose.h32
-rw-r--r--gcc/config/i386/win32.h6
-rw-r--r--gcc/config/i386/winnt.c6
6 files changed, 30 insertions, 40 deletions
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 2a812a5ff4d..aa05518ae46 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -189,19 +189,6 @@ Boston, MA 02111-1307, USA. */
union tree_node;
#define TREE union tree_node *
-
-/* Used to implement dllexport overriding dllimport semantics. It's also used
- to handle vtables - the first pass won't do anything because
- DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.
- It's also used to handle dllimport override semantics. */
-#if 0
-#define REDO_SECTION_INFO_P(DECL) \
- ((DECL_ATTRIBUTES (DECL) != NULL_TREE) \
- || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))
-#else
-#define REDO_SECTION_INFO_P(DECL) 1
-#endif
-
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_drectve
@@ -277,12 +264,11 @@ do { \
section and we need to set DECL_SECTION_NAME so we do that here.
Note that we can be called twice on the same decl. */
-extern void i386_pe_encode_section_info PARAMS ((TREE));
+extern void i386_pe_encode_section_info PARAMS ((TREE, int));
-#ifdef ENCODE_SECTION_INFO
#undef ENCODE_SECTION_INFO
-#endif
-#define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL)
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
+ i386_pe_encode_section_info (DECL, FIRST)
/* Utility used only in this file. */
#define I386_PE_STRIP_ENCODING(SYM_NAME) \
diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h
index 962862f0858..495d9628351 100644
--- a/gcc/config/i386/i386-interix.h
+++ b/gcc/config/i386/i386-interix.h
@@ -354,7 +354,7 @@ union tree_node;
const char *gen_stdcall_suffix PARAMS ((union tree_node *));
#undef ENCODE_SECTION_INFO
-#define ENCODE_SECTION_INFO(DECL) \
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
do \
{ \
if (flag_pic) \
@@ -365,7 +365,7 @@ do \
= (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|| ! TREE_PUBLIC (DECL)); \
} \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ if ((FIRST) && TREE_CODE (DECL) == FUNCTION_DECL) \
if (lookup_attribute ("stdcall", \
TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \
XEXP (DECL_RTL (DECL), 0) = \
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index a53a06f7148..1a3d9abe58e 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2244,7 +2244,7 @@ enum ix86_builtins
On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
so that we may access it directly in the GOT. */
-#define ENCODE_SECTION_INFO(DECL) \
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
do { \
if (flag_pic) \
{ \
diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h
index 4580e0ef56d..7338191293e 100644
--- a/gcc/config/i386/osfrose.h
+++ b/gcc/config/i386/osfrose.h
@@ -449,21 +449,23 @@ while (0)
`PRINT_OPERAND_ADDRESS'. */
#undef ENCODE_SECTION_INFO
-#define ENCODE_SECTION_INFO(DECL) \
-do \
- { \
- if (HALF_PIC_P ()) \
- HALF_PIC_ENCODE (DECL); \
- \
- else if (flag_pic) \
- { \
- rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
- = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- || ! TREE_PUBLIC (DECL)); \
- } \
- } \
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
+do \
+ { \
+ if (HALF_PIC_P ()) \
+ { \
+ if (FIRST) \
+ HALF_PIC_ENCODE (DECL); \
+ } \
+ else if (flag_pic) \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
+ = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ || ! TREE_PUBLIC (DECL)); \
+ } \
+ } \
while (0)
diff --git a/gcc/config/i386/win32.h b/gcc/config/i386/win32.h
index 0aa7a5794c4..da1821d877c 100644
--- a/gcc/config/i386/win32.h
+++ b/gcc/config/i386/win32.h
@@ -115,9 +115,8 @@ Boston, MA 02111-1307, USA. */
the number of bytes of arguments passed to the function, if it has the
attribute STDCALL. */
-#ifdef ENCODE_SECTION_INFO
#undef ENCODE_SECTION_INFO
-#define ENCODE_SECTION_INFO(DECL) \
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
do \
{ \
if (flag_pic) \
@@ -128,14 +127,13 @@ do \
= (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|| ! TREE_PUBLIC (DECL)); \
} \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ if ((FIRST) && TREE_CODE (DECL) == FUNCTION_DECL) \
if (lookup_attribute ("stdcall", \
TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \
XEXP (DECL_RTL (DECL), 0) = \
gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \
} \
while (0)
-#endif
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. Discard
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 9d955df2f48..b8bb39e727b 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -369,9 +369,13 @@ gen_stdcall_suffix (decl)
/* Cover function to implement ENCODE_SECTION_INFO. */
void
-i386_pe_encode_section_info (decl)
+i386_pe_encode_section_info (decl, first)
tree decl;
+ int first;
{
+ if (!first)
+ return;
+
/* This bit is copied from i386.h. */
if (optimize > 0 && TREE_CONSTANT (decl)
&& (!flag_writable_strings || TREE_CODE (decl) != STRING_CST))