Commit cfbdb830 by Jason Eckhardt Committed by Jason Eckhardt

i860-protos.h (i860_va_start): Remove 'stdarg_p' argument.

2003-08-22  Jason Eckhardt  <jle@rice.edu>

	* config/i860/i860-protos.h (i860_va_start): Remove 'stdarg_p'
	argument.
	(tdesc_section): Add prototype.
	Update copyright dates.
	* config/i860/i860.c: Include coretypes.h, tm.h, and toplev.h.
	(TARGET_ASM_FUNCTION_PROLOGUE): Move definition to end of file.
	(TARGET_ASM_FUNCTION_EPILOGUE): Likewise.
	(targetm): Likewise.
	(i860_output_function_prologue): Substitute HOST_WIDE_INT_PRINT_DEC
	for '%d' where necessary.
	(i860_va_start): Remove 'stdarg_p' argument.  Make conditional checks
	on 'stdarg_p' unconditional.  Divide current_function_args_info.ints
	by UNITS_PER_WORD when referencing (likewise for .floats).
	(I860_SVR4_VARARGS): Rename...
	(I860_SVR4_VA_LIST): ...to this.
	Call build() with 't' rather than 'field'.
	(i860_rtx_costs): New function.
	(TARGET_RTX_COSTS): Define.
	(i860_internal_label): New function.
	(TARGET_ASM_INTERNAL_LABEL): Define.
	(i860_file_start): New function.
	Update copyright dates.
	* config/i860/i860.h (CPP_PREDEFINES): Remove.
	(TARGET_CPU_CPP_BUILTINS): Define.
	(EXPAND_BUILTIN_VA_START): Remove 'stdarg' argument.
	(CONST_COSTS): Remove (and move code to i860_rtx_costs).
	(ASM_FILE_START): Remove.
	(ASM_FILE_START_1): Remove.
	(ASM_GLOBALIZE_LABEL): Remove.
	(ASM_OUTPUT_INTERNAL_LABEL): Remove.
	(ASM_OUTPUT_CASE_LABEL): Replace call of ASM_OUTPUT_INTERNAL_LABEL
	with targetm.asm_out.internal_label.
	Update copyright dates.
	* config/i860/sysv4.h (USER_LABEL_PREFIX): Define.
	(CPP_PREDEFINES): Remove.
	(TARGET_OS_CPP_BUILTINS): Define.
	(GLOBAL_ASM_OP): Define.
	(ASM_FILE_START): Remove.
	(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
	(TARGET_ASM_FILE_START): Define.
	Update copyright dates.

From-SVN: r70722
parent 35f73a73
2003-08-22 Jason Eckhardt <jle@rice.edu> 2003-08-22 Jason Eckhardt <jle@rice.edu>
* config/i860/i860-protos.h (i860_va_start): Remove 'stdarg_p'
argument.
(tdesc_section): Add prototype.
Update copyright dates.
* config/i860/i860.c: Include coretypes.h, tm.h, and toplev.h.
(TARGET_ASM_FUNCTION_PROLOGUE): Move definition to end of file.
(TARGET_ASM_FUNCTION_EPILOGUE): Likewise.
(targetm): Likewise.
(i860_output_function_prologue): Substitute HOST_WIDE_INT_PRINT_DEC
for '%d' where necessary.
(i860_va_start): Remove 'stdarg_p' argument. Make conditional checks
on 'stdarg_p' unconditional. Divide current_function_args_info.ints
by UNITS_PER_WORD when referencing (likewise for .floats).
(I860_SVR4_VARARGS): Rename...
(I860_SVR4_VA_LIST): ...to this.
Call build() with 't' rather than 'field'.
(i860_rtx_costs): New function.
(TARGET_RTX_COSTS): Define.
(i860_internal_label): New function.
(TARGET_ASM_INTERNAL_LABEL): Define.
(i860_file_start): New function.
Update copyright dates.
* config/i860/i860.h (CPP_PREDEFINES): Remove.
(TARGET_CPU_CPP_BUILTINS): Define.
(EXPAND_BUILTIN_VA_START): Remove 'stdarg' argument.
(CONST_COSTS): Remove (and move code to i860_rtx_costs).
(ASM_FILE_START): Remove.
(ASM_FILE_START_1): Remove.
(ASM_GLOBALIZE_LABEL): Remove.
(ASM_OUTPUT_INTERNAL_LABEL): Remove.
(ASM_OUTPUT_CASE_LABEL): Replace call of ASM_OUTPUT_INTERNAL_LABEL
with targetm.asm_out.internal_label.
Update copyright dates.
* config/i860/sysv4.h (USER_LABEL_PREFIX): Define.
(CPP_PREDEFINES): Remove.
(TARGET_OS_CPP_BUILTINS): Define.
(GLOBAL_ASM_OP): Define.
(ASM_FILE_START): Remove.
(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
(TARGET_ASM_FILE_START): Define.
Update copyright dates.
2003-08-22 Jason Eckhardt <jle@rice.edu>
* config.gcc (i860-*-sysv4*): Add target. * config.gcc (i860-*-sysv4*): Add target.
* config/i860/i860-protos.h: New. * config/i860/i860-protos.h: New.
* config/i860/i860.c: New. * config/i860/i860.c: New.
......
/* Definitions of target machine for GNU compiler, for Intel 860. /* Definitions of target machine for GNU compiler, for Intel 860.
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler. the whims of the System V Release 4 assembler.
...@@ -51,7 +51,7 @@ extern int logic_int PARAMS ((rtx, enum machine_mode)); ...@@ -51,7 +51,7 @@ extern int logic_int PARAMS ((rtx, enum machine_mode));
extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
extern rtx i860_saveregs PARAMS ((void)); extern rtx i860_saveregs PARAMS ((void));
#ifdef TREE_CODE #ifdef TREE_CODE
extern void i860_va_start PARAMS ((int, tree, rtx)); extern void i860_va_start PARAMS ((tree, rtx));
extern rtx i860_va_arg PARAMS ((tree, tree)); extern rtx i860_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#endif /* RTX_CODE */ #endif /* RTX_CODE */
...@@ -59,3 +59,6 @@ extern rtx i860_va_arg PARAMS ((tree, tree)); ...@@ -59,3 +59,6 @@ extern rtx i860_va_arg PARAMS ((tree, tree));
#ifdef TREE_CODE #ifdef TREE_CODE
extern tree i860_build_va_list PARAMS ((void)); extern tree i860_build_va_list PARAMS ((void));
#endif /* TREE_CODE */ #endif /* TREE_CODE */
extern void tdesc_section (void);
/* Subroutines for insn-output.c for Intel 860 /* Subroutines for insn-output.c for Intel 860
Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002 Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
Derived from sparc.c. Derived from sparc.c.
...@@ -28,6 +28,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -28,6 +28,8 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "flags.h" #include "flags.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
...@@ -41,6 +43,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -41,6 +43,7 @@ Boston, MA 02111-1307, USA. */
#include "insn-attr.h" #include "insn-attr.h"
#include "function.h" #include "function.h"
#include "expr.h" #include "expr.h"
#include "toplev.h"
#include "tm_p.h" #include "tm_p.h"
#include "target.h" #include "target.h"
#include "target-def.h" #include "target-def.h"
...@@ -64,14 +67,6 @@ const char *i860_reg_prefix = I860_REG_PREFIX; ...@@ -64,14 +67,6 @@ const char *i860_reg_prefix = I860_REG_PREFIX;
rtx i860_compare_op0, i860_compare_op1; rtx i860_compare_op0, i860_compare_op1;
/* Initialize the GCC target structure. */
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE i860_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i860_output_function_epilogue
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return non-zero if this pattern, can be evaluated safely, even if it /* Return non-zero if this pattern, can be evaluated safely, even if it
was not asked for. */ was not asked for. */
int int
...@@ -1717,7 +1712,7 @@ i860_output_function_prologue (asm_file, local_bytes) ...@@ -1717,7 +1712,7 @@ i860_output_function_prologue (asm_file, local_bytes)
/* Adjust the stack pointer. The ABI sez to do this using `adds', /* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */ but the native C compiler on svr4 uses `addu'. */
fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n", fprintf (asm_file, "\taddu -" HOST_WIDE_INT_PRINT_DEC ",%ssp,%ssp\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix); frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */ /* Save the old frame pointer. */
...@@ -1734,9 +1729,9 @@ i860_output_function_prologue (asm_file, local_bytes) ...@@ -1734,9 +1729,9 @@ i860_output_function_prologue (asm_file, local_bytes)
/* Get the value of frame_lower_bytes into r31. */ /* Get the value of frame_lower_bytes into r31. */
fprintf (asm_file, "\torh %d,%sr0,%sr31\n", fprintf (asm_file, "\torh " HOST_WIDE_INT_PRINT_DEC ",%sr0,%sr31\n",
frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix); frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix);
fprintf (asm_file, "\tor %d,%sr31,%sr31\n", fprintf (asm_file, "\tor " HOST_WIDE_INT_PRINT_DEC ",%sr31,%sr31\n",
frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix); frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix);
/* Now re-adjust the stack pointer using the value in r31. /* Now re-adjust the stack pointer using the value in r31.
...@@ -1774,12 +1769,12 @@ i860_output_function_prologue (asm_file, local_bytes) ...@@ -1774,12 +1769,12 @@ i860_output_function_prologue (asm_file, local_bytes)
/* Adjust the stack pointer. The ABI sez to do this using `adds', /* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */ but the native C compiler on svr4 uses `addu'. */
fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n", fprintf (asm_file, "\taddu -" HOST_WIDE_INT_PRINT_DEC ",%ssp,%ssp\n",
total_fsize, i860_reg_prefix, i860_reg_prefix); total_fsize, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */ /* Save the old frame pointer. */
fprintf (asm_file, "\tst.l %sfp,%d(%ssp)\n", fprintf (asm_file, "\tst.l %sfp," HOST_WIDE_INT_PRINT_DEC "(%ssp)\n",
i860_reg_prefix, frame_lower_bytes, i860_reg_prefix); i860_reg_prefix, frame_lower_bytes, i860_reg_prefix);
/* Setup the new frame pointer. The ABI sez to do this after /* Setup the new frame pointer. The ABI sez to do this after
...@@ -1787,7 +1782,7 @@ i860_output_function_prologue (asm_file, local_bytes) ...@@ -1787,7 +1782,7 @@ i860_output_function_prologue (asm_file, local_bytes)
(and its saz to do this using adds), but that's not what the (and its saz to do this using adds), but that's not what the
native C compiler on svr4 does. */ native C compiler on svr4 does. */
fprintf (asm_file, "\taddu %d,%ssp,%sfp\n", fprintf (asm_file, "\taddu " HOST_WIDE_INT_PRINT_DEC ",%ssp,%sfp\n",
frame_lower_bytes, i860_reg_prefix, i860_reg_prefix); frame_lower_bytes, i860_reg_prefix, i860_reg_prefix);
/* Preserve registers. The ABI sez to do this before setting /* Preserve registers. The ABI sez to do this before setting
...@@ -2060,7 +2055,7 @@ i860_output_function_epilogue (asm_file, local_bytes) ...@@ -2060,7 +2055,7 @@ i860_output_function_epilogue (asm_file, local_bytes)
/* Get the value we plan to use to restore the stack pointer into r31. */ /* Get the value we plan to use to restore the stack pointer into r31. */
fprintf (asm_file, "\tadds %d,%sfp,%sr31\n", fprintf (asm_file, "\tadds " HOST_WIDE_INT_PRINT_DEC ",%sfp,%sr31\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix); frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Restore the return address and the old frame pointer. */ /* Restore the return address and the old frame pointer. */
...@@ -2173,10 +2168,7 @@ i860_build_va_list () ...@@ -2173,10 +2168,7 @@ i860_build_va_list ()
} }
void void
i860_va_start (stdarg_p, valist, nextarg) i860_va_start (tree valist, rtx nextarg)
int stdarg_p;
tree valist;
rtx nextarg;
{ {
tree saveregs, t; tree saveregs, t;
...@@ -2184,7 +2176,7 @@ i860_va_start (stdarg_p, valist, nextarg) ...@@ -2184,7 +2176,7 @@ i860_va_start (stdarg_p, valist, nextarg)
expand_builtin_saveregs ()); expand_builtin_saveregs ());
saveregs = build1 (INDIRECT_REF, va_list_type_node, saveregs); saveregs = build1 (INDIRECT_REF, va_list_type_node, saveregs);
if (stdarg_p) if (1 /* stdarg_p */)
{ {
tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr; tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr;
tree ireg_used, freg_used, reg_base, mem_ptr; tree ireg_used, freg_used, reg_base, mem_ptr;
...@@ -2210,12 +2202,12 @@ i860_va_start (stdarg_p, valist, nextarg) ...@@ -2210,12 +2202,12 @@ i860_va_start (stdarg_p, valist, nextarg)
mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr), mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr),
valist, field_mem_ptr); valist, field_mem_ptr);
t = build_int_2 (current_function_args_info.ints, 0); t = build_int_2 (current_function_args_info.ints / UNITS_PER_WORD, 0);
t = build (MODIFY_EXPR, TREE_TYPE (ireg_used), ireg_used, t); t = build (MODIFY_EXPR, TREE_TYPE (ireg_used), ireg_used, t);
TREE_SIDE_EFFECTS (t) = 1; TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
t = build_int_2 (ROUNDUP (current_function_args_info.floats, 8), 0); t = build_int_2 (ROUNDUP ((current_function_args_info.floats / UNITS_PER_WORD), 8), 0);
t = build (MODIFY_EXPR, TREE_TYPE (freg_used), freg_used, t); t = build (MODIFY_EXPR, TREE_TYPE (freg_used), freg_used, t);
TREE_SIDE_EFFECTS (t) = 1; TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
...@@ -2241,7 +2233,7 @@ i860_va_start (stdarg_p, valist, nextarg) ...@@ -2241,7 +2233,7 @@ i860_va_start (stdarg_p, valist, nextarg)
#define NUM_PARM_FREGS 8 #define NUM_PARM_FREGS 8
#define NUM_PARM_IREGS 12 #define NUM_PARM_IREGS 12
#ifdef I860_SVR4_VARARGS #ifdef I860_SVR4_VA_LIST
#define FREG_OFFSET 0 #define FREG_OFFSET 0
#define IREG_OFFSET (NUM_PARM_FREGS * UNITS_PER_WORD) #define IREG_OFFSET (NUM_PARM_FREGS * UNITS_PER_WORD)
#else #else
...@@ -2316,7 +2308,7 @@ i860_va_arg (valist, type) ...@@ -2316,7 +2308,7 @@ i860_va_arg (valist, type)
build_int_2 (incr, 0))); build_int_2 (incr, 0)));
TREE_SIDE_EFFECTS (t) = 1; TREE_SIDE_EFFECTS (t) = 1;
t = fold (build (MULT_EXPR, TREE_TYPE (field), field, t = fold (build (MULT_EXPR, TREE_TYPE (field), t /* field */,
build_int_2 (UNITS_PER_WORD, 0))); build_int_2 (UNITS_PER_WORD, 0)));
TREE_SIDE_EFFECTS (t) = 1; TREE_SIDE_EFFECTS (t) = 1;
...@@ -2359,3 +2351,62 @@ i860_va_arg (valist, type) ...@@ -2359,3 +2351,62 @@ i860_va_arg (valist, type)
return ret; return ret;
} }
/* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
static bool
i860_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
{
switch (code)
{
case CONST_INT:
if (INTVAL (x) == 0)
*total = 0;
else if (INTVAL (x) < 0x2000 && INTVAL (x) >= -0x2000)
*total = 1;
return true;
case CONST:
case LABEL_REF:
case SYMBOL_REF:
*total = 4;
return true;
case CONST_DOUBLE:
*total = 6;
return true;
default:
return false;
}
}
static void
i860_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
{
fprintf (stream, ".%s%ld:\n", prefix, labelno);
}
static void
i860_file_start (void)
{
output_file_directive (asm_out_file, main_input_filename);
fprintf (asm_out_file, "\t.version\t\"01.01\"\n");
}
/* Initialize the GCC target structure. */
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS i860_rtx_costs
#undef TARGET_ASM_INTERNAL_LABEL
#define TARGET_ASM_INTERNAL_LABEL i860_internal_label
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE i860_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i860_output_function_epilogue
struct gcc_target targetm = TARGET_INITIALIZER;
/* Definitions of target machine for GNU compiler, for Intel 860. /* Definitions of target machine for GNU compiler, for Intel 860.
Copyright (C) 1989, 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000, Copyright (C) 1989, 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002 Free Software Foundation, Inc. 2001, 2002, 2003 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler. the whims of the System V Release 4 assembler.
...@@ -27,8 +27,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,8 +27,12 @@ Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */ /* Names to predefine in the preprocessor for this target machine. */
#define TARGET_CPU_CPP_BUILTINS() \
#define CPP_PREDEFINES "-Di860 -Dunix -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860" do { \
builtin_define ("i860"); \
builtin_assert ("cpu=i860"); \
builtin_assert ("machine=i860"); \
} while (0)
/* Print subsidiary information on the compiler version in use. */ /* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (i860)"); #define TARGET_VERSION fprintf (stderr, " (i860)");
...@@ -572,8 +576,8 @@ struct cumulative_args { int ints, floats; }; ...@@ -572,8 +576,8 @@ struct cumulative_args { int ints, floats; };
(VALIST) = i860_build_va_list () (VALIST) = i860_build_va_list ()
/* Implement `va_start' for varargs and stdarg. */ /* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ #define EXPAND_BUILTIN_VA_START(valist, nextarg) \
i860_va_start (stdarg, valist, nextarg) i860_va_start (valist, nextarg)
/* Implement `va_arg'. */ /* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \ #define EXPAND_BUILTIN_VA_ARG(valist, type) \
...@@ -885,23 +889,6 @@ struct cumulative_args { int ints, floats; }; ...@@ -885,23 +889,6 @@ struct cumulative_args { int ints, floats; };
but a CALL with constant address is cheap. */ but a CALL with constant address is cheap. */
#define NO_FUNCTION_CSE #define NO_FUNCTION_CSE
/* Compute the cost of computing a constant rtl expression RTX
whose rtx-code is CODE. The body of this macro is a portion
of a switch statement. If the code is computed here,
return it with a return statement. Otherwise, break from the switch. */
#define CONST_COSTS(RTX,CODE, OUTER_CODE) \
case CONST_INT: \
if (INTVAL (RTX) == 0) \
return 0; \
if (INTVAL (RTX) < 0x2000 && INTVAL (RTX) >= -0x2000) return 1; \
case CONST: \
case LABEL_REF: \
case SYMBOL_REF: \
return 4; \
case CONST_DOUBLE: \
return 6;
/* Specify the cost of a branch insn; roughly the number of extra insns that /* Specify the cost of a branch insn; roughly the number of extra insns that
should be added to avoid a branch. should be added to avoid a branch.
...@@ -958,19 +945,6 @@ struct cumulative_args { int ints, floats; }; ...@@ -958,19 +945,6 @@ struct cumulative_args { int ints, floats; };
#define ASM_DOUBLE "\t.double" #define ASM_DOUBLE "\t.double"
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
#define ASM_FILE_START(FILE)
#if 0
#define ASM_FILE_START(FILE) \
do { output_file_directive ((FILE), main_input_filename); \
if (optimize) ASM_FILE_START_1 (FILE); \
} while (0)
#endif
#define ASM_FILE_START_1(FILE)
/* Output to assembler file text saying following lines /* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */ may contain character constants, extra white space, comments, etc. */
...@@ -1008,36 +982,21 @@ struct cumulative_args { int ints, floats; }; ...@@ -1008,36 +982,21 @@ struct cumulative_args { int ints, floats; };
#define ASM_OUTPUT_LABEL(FILE,NAME) \ #define ASM_OUTPUT_LABEL(FILE,NAME) \
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
do { fputs (".globl ", FILE); \
assemble_name (FILE, NAME); \
fputs ("\n", FILE); \
} while (0)
/* The prefix to add to user-visible assembler symbols. /* The prefix to add to user-visible assembler symbols.
This definition is overridden in i860v4.h because under System V This definition is overridden in i860/sysv4.h because under System V
Release 4, user-level symbols are *not* prefixed with underscores in Release 4, user-level symbols are *not* prefixed with underscores in
the generated assembly code. */ the generated assembly code. */
#define USER_LABEL_PREFIX "_" #define USER_LABEL_PREFIX "_"
/* This is how to output an internal numbered label where
PREFIX is the class of label and NUM is the number within the class. */
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
/* This is how to output an internal numbered label which /* This is how to output an internal numbered label which
labels a jump table. */ labels a jump table. */
#undef ASM_OUTPUT_CASE_LABEL #undef ASM_OUTPUT_CASE_LABEL
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \ #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
do { ASM_OUTPUT_ALIGN ((FILE), 2); \ do { ASM_OUTPUT_ALIGN ((FILE), 2); \
ASM_OUTPUT_INTERNAL_LABEL ((FILE), PREFIX, NUM); \ (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM); \
} while (0) } while (0)
/* Output at the end of a jump table. */ /* Output at the end of a jump table. */
......
/* Target definitions for GNU compiler for Intel 80860 running System V.4 /* Target definitions for GNU compiler for Intel 80860 running System V.4
Copyright (C) 1991, 1996, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1991, 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com). Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC. This file is part of GNU CC.
...@@ -22,6 +22,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,6 +22,9 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION #undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860 System V Release 4)"); #define TARGET_VERSION fprintf (stderr, " (i860 System V Release 4)");
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
/* Provide a set of pre-definitions and pre-assertions appropriate for /* Provide a set of pre-definitions and pre-assertions appropriate for
the i860 running svr4. Note that the symbol `__svr4__' MUST BE the i860 running svr4. Note that the symbol `__svr4__' MUST BE
DEFINED! It is needed so that the va_list struct in va-i860.h DEFINED! It is needed so that the va_list struct in va-i860.h
...@@ -31,8 +34,16 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,8 +34,16 @@ Boston, MA 02111-1307, USA. */
will be selected when we are building gnulib2.c. will be selected when we are building gnulib2.c.
__svr4__ is our extension. */ __svr4__ is our extension. */
#define CPP_PREDEFINES \ #define TARGET_OS_CPP_BUILTINS() \
"-Di860 -Dunix -DSVR4 -D__svr4__ -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860" do \
{ \
builtin_define_std ("unix"); \
builtin_define ("SVR4"); \
builtin_define ("__svr4__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=svr4"); \
} \
while (0)
/* For the benefit of i860_va_arg, flag it this way too. */ /* For the benefit of i860_va_arg, flag it this way too. */
...@@ -48,6 +59,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -48,6 +59,8 @@ Boston, MA 02111-1307, USA. */
#undef TYPE_OPERAND_FMT #undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "\"%s\"" #define TYPE_OPERAND_FMT "\"%s\""
#define GLOBAL_ASM_OP ".globl "
/* The following macro definition overrides the one in i860.h /* The following macro definition overrides the one in i860.h
because the svr4 i860 assembler requires a different syntax because the svr4 i860 assembler requires a different syntax
for getting parts of constant/relocatable values. */ for getting parts of constant/relocatable values. */
...@@ -59,11 +72,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -59,11 +72,10 @@ Boston, MA 02111-1307, USA. */
fprintf (FILE, "]@%s", PART_CODE); \ fprintf (FILE, "]@%s", PART_CODE); \
} while (0) } while (0)
#undef ASM_FILE_START #undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define ASM_FILE_START(FILE) \ #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
do { output_file_directive (FILE, main_input_filename); \ #undef TARGET_ASM_FILE_START
fprintf (FILE, "\t.version\t\"01.01\"\n"); \ #define TARGET_ASM_FILE_START i860_file_start
} while (0)
/* Output the special word the svr4 SDB wants to see just before /* Output the special word the svr4 SDB wants to see just before
the first word of each function's prologue code. */ the first word of each function's prologue code. */
......
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