aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1996-04-02 11:53:54 -0700
committerJeff Law <law@gcc.gnu.org>1996-04-02 11:53:54 -0700
commitdd07092ebe8a89f603b764519b4b8b43cf3abc2e (patch)
tree0e2bccbfb112984d662dfce033a12e9a712fded7 /gcc
parentcf0a001cb1a5f9dc91e1d61571b685ef3133c95d (diff)
downloadgcc-dd07092ebe8a89f603b764519b4b8b43cf3abc2e.zip
gcc-dd07092ebe8a89f603b764519b4b8b43cf3abc2e.tar.gz
gcc-dd07092ebe8a89f603b764519b4b8b43cf3abc2e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/h8300/h8300.c72
-rw-r--r--gcc/config/h8300/h8300.h9
2 files changed, 10 insertions, 71 deletions
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 6a85ecb..8abe7d7 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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;
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 197d814..2a0f451 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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) \