/* Subroutines used for code generation on the DEC Alpha.
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
if (GET_CODE (x) != CONST_INT)
output_operand_lossage ("invalid %%N value");
- fprintf (file, "%ld", ~ INTVAL (x));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INTVAL (x));
break;
case 'P':
if (GET_CODE (x) != CONST_INT)
output_operand_lossage ("invalid %%P value");
- fprintf (file, "%ld", (HOST_WIDE_INT) 1 << INTVAL (x));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) 1 << INTVAL (x));
break;
case 'h':
if (GET_CODE (x) != CONST_INT)
output_operand_lossage ("invalid %%h value");
- fprintf (file, "%ld", INTVAL (x) >> 16);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) >> 16);
break;
case 'L':
if (GET_CODE (x) != CONST_INT)
output_operand_lossage ("invalid %%L value");
- fprintf (file, "%ld", (INTVAL (x) & 0xffff) - 2 * (INTVAL (x) & 0x8000));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+ (INTVAL (x) & 0xffff) - 2 * (INTVAL (x) & 0x8000));
break;
case 'm':
if (value & 0xff)
mask |= (1 << (i + sizeof (int)));
- fprintf (file, "%ld", mask & 0xff);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask & 0xff);
}
else if (GET_CODE (x) == CONST_INT)
if (value & 0xff)
mask |= (1 << i);
- fprintf (file, "%ld", mask);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask);
}
else
output_operand_lossage ("invalid %%m value");
&& (INTVAL (x) & 7) != 8)
output_operand_lossage ("invalid %%s value");
- fprintf (file, "%ld", INTVAL (x) / 8);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) / 8);
break;
case 'S':
&& (INTVAL (x) & 7) != 8)
output_operand_lossage ("invalid %%s value");
- fprintf (file, "%ld", (64 - INTVAL (x)) / 8);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (64 - INTVAL (x)) / 8);
break;
case 'C': case 'D': case 'c': case 'd':
for (i = j; foo[i]==' ' && foo[i]; i++)
;
+ /* Find the first blank */
j = i;
if (foo[j])
for (i = j + 1; foo[i] != ' ' && foo[i]; i++)
;
+ /* If this substring is the longest so far, remember the
+ position of the character to chop off. */
slen = i - j;
if (slen > xlen)
{
j = i;
}
+ /* Try to avoid chopping uppercase suffix letters */
+ if (isupper (foo [chopchar]))
+ {
+ for (i = chopchar;
+ isupper (foo[i]) && foo[i] != ' ' && i >= 0;
+ i--)
+ ;
+ if (islower (foo[i]))
+ chopchar = i;
+ }
foo [chopchar] = ' ';
nlen--;
}
void
output_prolog (file, size)
FILE *file;
- int size;
+ HOST_WIDE_INT size;
{
unsigned long imask = 0;
unsigned long fmask = 0;
+ (is_stack_procedure ? 8 : 0)
+ size + current_function_pretend_args_size);
- fprintf (file, "# size %d, current_function_pretend_args_size %d, current_function_outgoing_args_size %d\n",
- size, current_function_pretend_args_size, current_function_outgoing_args_size);
- fprintf (file, "# sa_size %d, frame_size %d\n", sa_size, frame_size);
-
/* Issue function start and label. */
fprintf (file, "\t.ent ");
assemble_name (file, alpha_function_name);
{
if (is_local)
{
- /* defined here but external assumed. */
+ /* Defined here but external assumed. */
if (lptr->kind == KIND_EXTERN)
lptr->kind = KIND_LOCAL;
}
else
{
- /* used here but unused assumed. */
+ /* Used here but unused assumed. */
if (lptr->kind == KIND_UNUSED)
lptr->kind = KIND_LOCAL;
}
/* Assume external if no definition. */
nptr->kind = (is_local ? KIND_UNUSED : KIND_EXTERN);
+ /* Ensure we have an IDENTIFIER so assemble_name can mark is used. */
+ get_identifier (name);
+
alpha_links_base = nptr;
return;