diff options
author | Andrew Haley <aph@cygnus.com> | 1999-10-29 17:34:54 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 1999-10-29 17:34:54 +0000 |
commit | 90e0ee005bfecbf04c27b4cde749fd465aa40753 (patch) | |
tree | f500c71959e293db224d57fbdba734cd2030de01 | |
parent | 7ed6230077686c1277eec925983b2037608dacbc (diff) | |
download | gcc-90e0ee005bfecbf04c27b4cde749fd465aa40753.zip gcc-90e0ee005bfecbf04c27b4cde749fd465aa40753.tar.gz gcc-90e0ee005bfecbf04c27b4cde749fd465aa40753.tar.bz2 |
i386.h (ENCODE_SECTION_INFO): Don't do anything if DECL is not a memory ref.
Fri Oct 29 18:16:03 1999 Andrew Haley <aph@cygnus.com>
* config/i386/i386.h (ENCODE_SECTION_INFO): Don't do anything if
DECL is not a memory ref.
From-SVN: r30261
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 45 |
2 files changed, 29 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc3552f..bb5e334 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 29 18:16:03 1999 Andrew Haley <aph@cygnus.com> + + * config/i386/i386.h (ENCODE_SECTION_INFO): Don't do anything if + DECL is not a memory ref. + Fri Oct 29 09:05:34 1999 Catherine Moore <clm@cygnus.com> * config/i386/i386.h (ix86_cpu): Remove extern attribute. diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index b9a1e16..88bed4b 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1578,27 +1578,30 @@ do { \ 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) \ -do \ - { \ - if (flag_pic) \ - { \ - rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ - \ - if (TARGET_DEBUG_ADDR \ - && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd') \ - { \ - fprintf (stderr, "Encode %s, public = %d\n", \ - IDENTIFIER_POINTER (DECL_NAME (DECL)), \ - TREE_PUBLIC (DECL)); \ - } \ - \ - SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ - = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - || ! TREE_PUBLIC (DECL)); \ - } \ - } \ +#define ENCODE_SECTION_INFO(DECL) \ +do \ + { \ + if (flag_pic) \ + { \ + rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ + \ + if (GET_CODE (rtl) == MEM) \ + { \ + if (TARGET_DEBUG_ADDR \ + && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd') \ + { \ + fprintf (stderr, "Encode %s, public = %d\n", \ + IDENTIFIER_POINTER (DECL_NAME (DECL)), \ + TREE_PUBLIC (DECL)); \ + } \ + \ + SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ + = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + || ! TREE_PUBLIC (DECL)); \ + } \ + } \ + } \ while (0) /* The `FINALIZE_PIC' macro serves as a hook to emit these special |