aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1996-01-27 15:09:44 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1996-01-27 15:09:44 +0000
commit5f01fc147e35b40d999dc57ad013b159b474e81a (patch)
treebf469597630beb0c09fdac73a9662b41af94aede
parent94e4d804180f0fedf19e38a03a013c5fc3d08791 (diff)
downloadgcc-5f01fc147e35b40d999dc57ad013b159b474e81a.zip
gcc-5f01fc147e35b40d999dc57ad013b159b474e81a.tar.gz
gcc-5f01fc147e35b40d999dc57ad013b159b474e81a.tar.bz2
Deal with small statics and -msdata
From-SVN: r11115
-rw-r--r--gcc/config/rs6000/sysv4.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index a390992..4cd6b58 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -509,6 +509,34 @@ extern int rs6000_pic_labelno;
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
fprintf (FILE, ".%s", PREFIX)
+/* This says how to output assembler code to declare an
+ uninitialized internal linkage data object. Under SVR4,
+ the linker seems to want the alignment of data objects
+ to depend on their types. We do exactly that here. */
+
+#ifndef LOCAL_ASM_OP
+#define LOCAL_ASM_OP ".local"
+#endif
+
+#undef ASM_OUTPUT_ALIGNED_LOCAL
+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
+do { \
+ if (TARGET_SDATA && (SIZE) > 0 && (SIZE) <= g_switch_value) \
+ { \
+ sbss_section (); \
+ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+ ASM_OUTPUT_SKIP (FILE, SIZE); \
+ } \
+ else \
+ { \
+ fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \
+ assemble_name ((FILE), (NAME)); \
+ fprintf ((FILE), "\n"); \
+ ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
+ } \
+} while (0)
+
/* Pass various options to the assembler */
#undef ASM_SPEC
#define ASM_SPEC "-u %(asm_cpu) \