<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;
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 */
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. */
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;
#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
#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) \