aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-04-18 06:35:02 +0000
committerJason Merrill <merrill@gnu.org>1995-04-18 06:35:02 +0000
commit2dccb50ab9437e364a312771cf01bd5c38b228c3 (patch)
treef687d6ca6ee8e639fde6b93e7e20b3aa52012f5e /gcc
parentb13b05f6abdd70d9614501171640bf1c26615ddc (diff)
downloadgcc-2dccb50ab9437e364a312771cf01bd5c38b228c3.zip
gcc-2dccb50ab9437e364a312771cf01bd5c38b228c3.tar.gz
gcc-2dccb50ab9437e364a312771cf01bd5c38b228c3.tar.bz2
ASM_OUTPUT_EXTERNAL revisited
From-SVN: r9404
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/aix3newas.h18
-rw-r--r--gcc/config/rs6000/aix41.h19
2 files changed, 26 insertions, 11 deletions
diff --git a/gcc/config/rs6000/aix3newas.h b/gcc/config/rs6000/aix3newas.h
index b1e40c6..5d0dce7 100644
--- a/gcc/config/rs6000/aix3newas.h
+++ b/gcc/config/rs6000/aix3newas.h
@@ -22,10 +22,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "rs6000/rs6000.h"
-#if 0
-/* Commented out because it breaks compiler bootstrapping because references
- to environ get hosed */
-
/* Tell the assembler to assume that all undefined names are external. */
#undef ASM_SPEC
@@ -36,4 +32,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
-#endif
+#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
+{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
+ if ((TREE_CODE (DECL) == VAR_DECL \
+ || TREE_CODE (DECL) == FUNCTION_DECL) \
+ && (NAME)[0] != '*' \
+ && (NAME)[strlen (NAME) - 1] != ']') \
+ { \
+ char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
+ strcpy (_name, XSTR (_symref, 0)); \
+ strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
+ XSTR (_symref, 0) = _name; \
+ } \
+}
diff --git a/gcc/config/rs6000/aix41.h b/gcc/config/rs6000/aix41.h
index bfa3477..7860acb 100644
--- a/gcc/config/rs6000/aix41.h
+++ b/gcc/config/rs6000/aix41.h
@@ -22,10 +22,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "rs6000/rs6000.h"
-#if 0
-/* Commented out because it breaks compiler bootstrapping because references
- to environ get hosed */
-
#undef ASM_SPEC
#define ASM_SPEC "-u -mpwr"
@@ -34,8 +30,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
-#endif
-#endif
+#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
+{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
+ if ((TREE_CODE (DECL) == VAR_DECL \
+ || TREE_CODE (DECL) == FUNCTION_DECL) \
+ && (NAME)[0] != '*' \
+ && (NAME)[strlen (NAME) - 1] != ']') \
+ { \
+ char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
+ strcpy (_name, XSTR (_symref, 0)); \
+ strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
+ XSTR (_symref, 0) = _name; \
+ } \
+}
#undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\