h8300.c (extra_pop): Remove unused variable.

* h8300/h8300.c (extra_pop): Remove unused variable.
        (current_function_anonymous_args): Likewise.
        (function_prologue): Remove incorrect varargs/stdarg
        related code.
        (function_epilogue): Likewise.
        (function_arg): Never pass unnamed arguments in registers.
        * h8300.h (LONG_LONG_TYPE_SIZE): Use 64bits when ints are
        32bits.
        (SETUP_INCOMING_VARARGS): Remove definition.

From-SVN: r11653
This commit is contained in:
Jeff Law 1996-04-02 11:53:54 -07:00
parent cf0a001cb1
commit dd07092ebe
2 changed files with 10 additions and 71 deletions

View File

@ -180,11 +180,6 @@ static int pop_order[FIRST_PSEUDO_REGISTER] =
<saved registers> <- sp
*/
int current_function_anonymous_args;
/* Extra arguments to pop, in words (IE: 2 bytes for 300, 4 for 300h */
static int extra_pop;
void
function_prologue (file, size)
FILE *file;
@ -193,50 +188,12 @@ function_prologue (file, size)
register int mask = 0;
int fsize = (size + STACK_BOUNDARY / 8 - 1) & -STACK_BOUNDARY / 8;
int idx;
extra_pop = 0;
/* Note a function with the interrupt attribute and set interrupt_handler
accordingly. */
if (h8300_interrupt_function_p (current_function_decl))
interrupt_handler = 1;
if (current_function_anonymous_args && TARGET_QUICKCALL)
{
/* Push regs as if done by caller, and move around return address. */
switch (current_function_args_info.nbytes / UNITS_PER_WORD)
{
case 0:
/* get ret addr */
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[3]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[2]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[1]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[0]);
/* push it again */
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[3]);
extra_pop = 3;
break;
case 1:
/* get ret addr */
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[3]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[2]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[1]);
/* push it again */
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[3]);
extra_pop = 2;
break;
case 2:
/* get ret addr */
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[3]);
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[2]);
/* push it again */
fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[3]);
extra_pop = 1;
break;
default:
fprintf (file, "; varargs\n");
break;
}
}
if (frame_pointer_needed)
{
/* Push fp */
@ -321,28 +278,13 @@ function_epilogue (file, size)
dosize (file, "add", fsize, 0);
}
if (extra_pop)
{
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[3]);
while (extra_pop)
{
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[2]);
extra_pop--;
}
fprintf (file, "\tjmp @%s\n", h8_reg_names[3]);
}
if (interrupt_handler)
fprintf (file, "\trte\n");
else
{
if (interrupt_handler)
fprintf (file, "\trte\n");
else
fprintf (file, "\trts\n");
}
fprintf (file, "\trts\n");
interrupt_handler = 0;
pragma_saveall = 0;
current_function_anonymous_args = 0;
}
/* Output assembly code for the start of the file. */
@ -652,6 +594,10 @@ function_arg (cum, mode, type, named)
char *fname;
int regpass = 0;
/* Never pass unnamed arguments in registers. */
if (!named)
return 0;
/* Pass 3 regs worth of data in regs when user asked on the command line. */
if (TARGET_QUICKCALL)
regpass = 3;

View File

@ -170,7 +170,7 @@ do { \
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16)
#define LONG_TYPE_SIZE 32
#define LONG_LONG_TYPE_SIZE 32
#define LONG_LONG_TYPE_SIZE (TARGET_INT32 ? 64 : 32)
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE 32
#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
@ -612,13 +612,6 @@ struct rtx_def *function_arg();
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
function_arg (&CUM, MODE, TYPE, NAMED)
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments. */
extern int current_function_anonymous_args;
#define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \
current_function_anonymous_args = 1;
/* Generate assembly output for the start of a function. */
#define FUNCTION_PROLOGUE(FILE, SIZE) \