aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-11-02 14:19:36 -0700
committerJeff Law <law@gcc.gnu.org>1997-11-02 14:19:36 -0700
commite9a25f70a0a7b82881b56cb3dfa7422b2968682a (patch)
tree46fe768360493f03f7282d07762e7b26c292aabd /gcc/varasm.c
parentbb84e66919817020267815eed4304e543688e722 (diff)
downloadgcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.zip
gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.tar.gz
gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.tar.bz2
Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c50
1 files changed, 42 insertions, 8 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3210aa2..1161837 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -26,10 +26,10 @@ Boston, MA 02111-1307, USA. */
We also output the assembler code for constants stored in memory
and are responsible for combining constants with the same value. */
+#include "config.h"
#include <stdio.h>
#include <setjmp.h>
/* #include <stab.h> */
-#include "config.h"
#include "rtl.h"
#include "tree.h"
#include "flags.h"
@@ -282,10 +282,6 @@ named_section (decl, name, reloc)
if (in_section != in_named || strcmp (name, in_named_name))
{
- in_named_name = obstack_alloc (&permanent_obstack, strlen (name) + 1);
- strcpy (in_named_name, name);
- in_section = in_named;
-
#ifdef ASM_OUTPUT_SECTION_NAME
ASM_OUTPUT_SECTION_NAME (asm_out_file, decl, name, reloc);
#else
@@ -294,6 +290,10 @@ named_section (decl, name, reloc)
already have flagged this as an error. */
abort ();
#endif
+
+ in_named_name = obstack_alloc (&permanent_obstack, strlen (name) + 1);
+ strcpy (in_named_name, name);
+ in_section = in_named;
}
}
@@ -1428,12 +1428,17 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
}
else
{
+#ifdef ASM_OUTPUT_ALIGNED_DECL_COMMON
+ ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, decl, name, size,
+ DECL_ALIGN (decl));
+#else
#ifdef ASM_OUTPUT_ALIGNED_COMMON
ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, name, size,
DECL_ALIGN (decl));
#else
ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded);
#endif
+#endif
}
}
#if defined (ASM_OUTPUT_BSS) || defined (ASM_OUTPUT_ALIGNED_BSS)
@@ -1472,12 +1477,17 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
}
else
{
+#ifdef ASM_OUTPUT_ALIGNED_DECL_LOCAL
+ ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, decl, name, size,
+ DECL_ALIGN (decl));
+#else
#ifdef ASM_OUTPUT_ALIGNED_LOCAL
ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size,
DECL_ALIGN (decl));
#else
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
#endif
+#endif
}
}
goto finish;
@@ -1878,11 +1888,16 @@ assemble_static_space (size)
}
else
{
+#ifdef ASM_OUTPUT_ALIGNED_DECL_LOCAL
+ ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, NULL_TREE, name, size,
+ BIGGEST_ALIGNMENT);
+#else
#ifdef ASM_OUTPUT_ALIGNED_LOCAL
ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, BIGGEST_ALIGNMENT);
#else
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
#endif
+#endif
}
return x;
}
@@ -2521,6 +2536,9 @@ const_hash (exp)
case CONVERT_EXPR:
case NON_LVALUE_EXPR:
return const_hash (TREE_OPERAND (exp, 0)) * 7 + 2;
+
+ default:
+ abort ();
}
/* Compute hashing function */
@@ -2708,6 +2726,9 @@ compare_constant_1 (exp, p)
case CONVERT_EXPR:
case NON_LVALUE_EXPR:
return compare_constant_1 (TREE_OPERAND (exp, 0), p);
+
+ default:
+ abort ();
}
/* Compare constant contents. */
@@ -3262,14 +3283,20 @@ init_const_rtx_hash_table ()
/* Save and restore status for a nested function. */
void
-save_varasm_status (p)
+save_varasm_status (p, context)
struct function *p;
+ tree context;
{
p->const_rtx_hash_table = const_rtx_hash_table;
p->const_rtx_sym_hash_table = const_rtx_sym_hash_table;
p->first_pool = first_pool;
p->last_pool = last_pool;
p->pool_offset = pool_offset;
+ p->const_double_chain = const_double_chain;
+
+ /* If we are pushing to toplevel, we can't reuse const_double_chain. */
+ if (context == NULL_TREE)
+ const_double_chain = 0;
}
void
@@ -3281,6 +3308,7 @@ restore_varasm_status (p)
first_pool = p->first_pool;
last_pool = p->last_pool;
pool_offset = p->pool_offset;
+ const_double_chain = p->const_double_chain;
}
enum kind { RTX_DOUBLE, RTX_INT };
@@ -3383,6 +3411,9 @@ decode_rtx_const (mode, x, value)
for the sake of addresses of library routines.
For a LABEL_REF, compare labels. */
value->un.addr.base = XEXP (value->un.addr.base, 0);
+
+ default:
+ break;
}
}
@@ -3916,7 +3947,7 @@ output_addressed_constants (exp)
}
break;
- case ERROR_MARK:
+ default:
break;
}
return reloc;
@@ -4052,6 +4083,9 @@ output_constant (exp, size)
else
error ("unknown set constructor type");
return;
+
+ default:
+ break; /* ??? */
}
if (size > 0)
@@ -4419,7 +4453,7 @@ output_constructor (exp, size)
}
/* Now get the bits from the appropriate constant word. */
- if (shift < HOST_BITS_PER_INT)
+ if (shift < HOST_BITS_PER_WIDE_INT)
value = TREE_INT_CST_LOW (val);
else if (shift < 2 * HOST_BITS_PER_WIDE_INT)
{