Commit fff9e713 by Michael Tiemann

*** empty log message ***

From-SVN: r334
parent 3785a1d8
...@@ -201,6 +201,19 @@ decode_reg_name (asmspec) ...@@ -201,6 +201,19 @@ decode_reg_name (asmspec)
{ {
int i; int i;
/* Allow a decimal number as a "register name". */
for (i = strlen (asmspec) - 1; i >= 0; i--)
if (! (asmspec[i] >= '0' && asmspec[i] <= '9'))
break;
if (asmspec[0] != 0 && i < 0)
{
i = atoi (asmspec);
if (i < FIRST_PSEUDO_REGISTER && i >= 0)
return i;
else
return -2;
}
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (reg_names[i][0] && ! strcmp (asmspec, reg_names[i])) if (reg_names[i][0] && ! strcmp (asmspec, reg_names[i]))
return i; return i;
...@@ -896,23 +909,27 @@ assemble_variable (decl, top_level, at_end) ...@@ -896,23 +909,27 @@ assemble_variable (decl, top_level, at_end)
} }
/* Output something to declare an external symbol to the assembler. /* Output something to declare an external symbol to the assembler.
(Most assemblers don't need this, so we normally output nothing.) */ (Most assemblers don't need this, so we normally output nothing.)
Do nothing if DECL is not external. */
void void
assemble_external (decl) assemble_external (decl)
tree decl; tree decl;
{ {
#ifdef ASM_OUTPUT_EXTERNAL
if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd'
&& TREE_EXTERNAL (decl) && TREE_PUBLIC (decl))
{
rtx rtl = DECL_RTL (decl); rtx rtl = DECL_RTL (decl);
#ifdef ASM_OUTPUT_EXTERNAL if (GET_CODE (rtl) == MEM && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF
if (TREE_PUBLIC (decl)
&& GET_CODE (rtl) == MEM && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF
&& ! SYMBOL_REF_USED (XEXP (rtl, 0))) && ! SYMBOL_REF_USED (XEXP (rtl, 0)))
{ {
/* Some systems do require some output. */ /* Some systems do require some output. */
SYMBOL_REF_USED (XEXP (rtl, 0)) = 1; SYMBOL_REF_USED (XEXP (rtl, 0)) = 1;
ASM_OUTPUT_EXTERNAL (asm_out_file, decl, XSTR (XEXP (rtl, 0), 0)); ASM_OUTPUT_EXTERNAL (asm_out_file, decl, XSTR (XEXP (rtl, 0), 0));
} }
}
#endif #endif
} }
...@@ -1107,11 +1124,16 @@ assemble_integer (x, size, force) ...@@ -1107,11 +1124,16 @@ assemble_integer (x, size, force)
if (word == 0) if (word == 0)
break; break;
assemble_integer (word, UNITS_PER_WORD); if (! assemble_integer (word, UNITS_PER_WORD, 0))
break;
} }
if (i == size / UNITS_PER_WORD) if (i == size / UNITS_PER_WORD)
return 1; return 1;
/* If we output at least one word and then could not finish,
there is no valid way to continue. */
if (i > 0)
abort ();
} }
if (force) if (force)
...@@ -2455,6 +2477,15 @@ output_constant (exp, size) ...@@ -2455,6 +2477,15 @@ output_constant (exp, size)
if (size == 0) if (size == 0)
return; return;
/* Allow a constructor with no elements for any data type.
This means to fill the space with zeros. */
if (TREE_CODE (exp) == CONSTRUCTOR
&& TREE_OPERAND (exp, 1) == 0)
{
assemble_zeros (size);
return;
}
/* Eliminate the NOP_EXPR that makes a cast not be an lvalue. /* Eliminate the NOP_EXPR that makes a cast not be an lvalue.
That way we get the constant (we hope) inside it. */ That way we get the constant (we hope) inside it. */
if (TREE_CODE (exp) == NOP_EXPR if (TREE_CODE (exp) == NOP_EXPR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment