This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] Bring i860 to a buildable state
- From: Jason Eckhardt <jle at owlnet dot rice dot edu>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 10 Aug 2003 17:24:04 -0500 (CDT)
- Subject: [Patch] Bring i860 to a buildable state
- Miminal changes to make the i860 back-end once again buildable.
- This builds on the previous 'raise the dead' patch, of course.
- My write access is still hosed.
2003-08-10 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.
Index: i860-protos.h
===================================================================
RCS file: /home/localcvs/gcc/gcc/config/i860/i860-protos.h,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 i860-protos.h
*** i860-protos.h 2003/08/10 21:27:29 1.1.1.1
--- i860-protos.h 2003/08/10 21:47:07
***************
*** 1,5 ****
/* Definitions of target machine for GNU compiler, for Intel 860.
! Copyright (C) 2000 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler.
--- 1,5 ----
/* Definitions of target machine for GNU compiler, for Intel 860.
! Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler.
*************** extern int logic_int PARAMS ((rtx, enum
*** 51,57 ****
extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
extern rtx i860_saveregs PARAMS ((void));
#ifdef TREE_CODE
! extern void i860_va_start PARAMS ((int, tree, rtx));
extern rtx i860_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
#endif /* RTX_CODE */
--- 51,57 ----
extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
extern rtx i860_saveregs PARAMS ((void));
#ifdef TREE_CODE
! extern void i860_va_start PARAMS ((tree, rtx));
extern rtx i860_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
#endif /* RTX_CODE */
*************** extern rtx i860_va_arg PARAMS ((tree, tr
*** 59,61 ****
--- 59,64 ----
#ifdef TREE_CODE
extern tree i860_build_va_list PARAMS ((void));
#endif /* TREE_CODE */
+
+ extern void tdesc_section (void);
+
Index: i860.c
===================================================================
RCS file: /home/localcvs/gcc/gcc/config/i860/i860.c,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 i860.c
*** i860.c 2003/08/10 21:27:29 1.1.1.1
--- i860.c 2003/08/10 22:11:52
***************
*** 1,5 ****
/* Subroutines for insn-output.c for Intel 860
! Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Derived from sparc.c.
--- 1,5 ----
/* Subroutines for insn-output.c for Intel 860
! Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Derived from sparc.c.
*************** Boston, MA 02111-1307, USA. */
*** 28,33 ****
--- 28,35 ----
#include "config.h"
#include "system.h"
+ #include "coretypes.h"
+ #include "tm.h"
#include "flags.h"
#include "rtl.h"
#include "tree.h"
*************** Boston, MA 02111-1307, USA. */
*** 41,46 ****
--- 43,49 ----
#include "insn-attr.h"
#include "function.h"
#include "expr.h"
+ #include "toplev.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
*************** const char *i860_reg_prefix = I860_REG_P
*** 64,77 ****
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
was not asked for. */
int
--- 67,72 ----
*************** i860_output_function_prologue (asm_file,
*** 1717,1723 ****
/* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */
! fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */
--- 1712,1718 ----
/* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */
! fprintf (asm_file, "\taddu -" HOST_WIDE_INT_PRINT_DEC ",%ssp,%ssp\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */
*************** i860_output_function_prologue (asm_file,
*** 1734,1742 ****
/* Get the value of frame_lower_bytes into r31. */
! fprintf (asm_file, "\torh %d,%sr0,%sr31\n",
frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix);
! fprintf (asm_file, "\tor %d,%sr31,%sr31\n",
frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix);
/* Now re-adjust the stack pointer using the value in r31.
--- 1729,1737 ----
/* Get the value of frame_lower_bytes into r31. */
! fprintf (asm_file, "\torh " HOST_WIDE_INT_PRINT_DEC ",%sr0,%sr31\n",
frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix);
! fprintf (asm_file, "\tor " HOST_WIDE_INT_PRINT_DEC ",%sr31,%sr31\n",
frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix);
/* Now re-adjust the stack pointer using the value in r31.
*************** i860_output_function_prologue (asm_file,
*** 1774,1785 ****
/* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */
! fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n",
total_fsize, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */
! fprintf (asm_file, "\tst.l %sfp,%d(%ssp)\n",
i860_reg_prefix, frame_lower_bytes, i860_reg_prefix);
/* Setup the new frame pointer. The ABI sez to do this after
--- 1769,1780 ----
/* Adjust the stack pointer. The ABI sez to do this using `adds',
but the native C compiler on svr4 uses `addu'. */
! fprintf (asm_file, "\taddu -" HOST_WIDE_INT_PRINT_DEC ",%ssp,%ssp\n",
total_fsize, i860_reg_prefix, i860_reg_prefix);
/* Save the old frame pointer. */
! fprintf (asm_file, "\tst.l %sfp," HOST_WIDE_INT_PRINT_DEC "(%ssp)\n",
i860_reg_prefix, frame_lower_bytes, i860_reg_prefix);
/* Setup the new frame pointer. The ABI sez to do this after
*************** i860_output_function_prologue (asm_file,
*** 1787,1793 ****
(and its saz to do this using adds), but that's not what the
native C compiler on svr4 does. */
! fprintf (asm_file, "\taddu %d,%ssp,%sfp\n",
frame_lower_bytes, i860_reg_prefix, i860_reg_prefix);
/* Preserve registers. The ABI sez to do this before setting
--- 1782,1788 ----
(and its saz to do this using adds), but that's not what the
native C compiler on svr4 does. */
! fprintf (asm_file, "\taddu " HOST_WIDE_INT_PRINT_DEC ",%ssp,%sfp\n",
frame_lower_bytes, i860_reg_prefix, i860_reg_prefix);
/* Preserve registers. The ABI sez to do this before setting
*************** i860_output_function_epilogue (asm_file,
*** 2060,2066 ****
/* Get the value we plan to use to restore the stack pointer into r31. */
! fprintf (asm_file, "\tadds %d,%sfp,%sr31\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Restore the return address and the old frame pointer. */
--- 2055,2061 ----
/* Get the value we plan to use to restore the stack pointer into r31. */
! fprintf (asm_file, "\tadds " HOST_WIDE_INT_PRINT_DEC ",%sfp,%sr31\n",
frame_upper_bytes, i860_reg_prefix, i860_reg_prefix);
/* Restore the return address and the old frame pointer. */
*************** i860_build_va_list ()
*** 2173,2182 ****
}
void
! i860_va_start (stdarg_p, valist, nextarg)
! int stdarg_p;
! tree valist;
! rtx nextarg;
{
tree saveregs, t;
--- 2168,2174 ----
}
void
! i860_va_start (tree valist, rtx nextarg)
{
tree saveregs, t;
*************** i860_va_start (stdarg_p, valist, nextarg
*** 2184,2190 ****
expand_builtin_saveregs ());
saveregs = build1 (INDIRECT_REF, va_list_type_node, saveregs);
! if (stdarg_p)
{
tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr;
tree ireg_used, freg_used, reg_base, mem_ptr;
--- 2176,2182 ----
expand_builtin_saveregs ());
saveregs = build1 (INDIRECT_REF, va_list_type_node, saveregs);
! if (1 /* stdarg_p */)
{
tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr;
tree ireg_used, freg_used, reg_base, mem_ptr;
*************** i860_va_start (stdarg_p, valist, nextarg
*** 2210,2221 ****
mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr),
valist, field_mem_ptr);
! t = build_int_2 (current_function_args_info.ints, 0);
t = build (MODIFY_EXPR, TREE_TYPE (ireg_used), ireg_used, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
! t = build_int_2 (ROUNDUP (current_function_args_info.floats, 8), 0);
t = build (MODIFY_EXPR, TREE_TYPE (freg_used), freg_used, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
--- 2202,2213 ----
mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr),
valist, field_mem_ptr);
! t = build_int_2 (current_function_args_info.ints / UNITS_PER_WORD, 0);
t = build (MODIFY_EXPR, TREE_TYPE (ireg_used), ireg_used, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
! 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);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
*************** i860_va_start (stdarg_p, valist, nextarg
*** 2241,2247 ****
#define NUM_PARM_FREGS 8
#define NUM_PARM_IREGS 12
! #ifdef I860_SVR4_VARARGS
#define FREG_OFFSET 0
#define IREG_OFFSET (NUM_PARM_FREGS * UNITS_PER_WORD)
#else
--- 2233,2239 ----
#define NUM_PARM_FREGS 8
#define NUM_PARM_IREGS 12
! #ifdef I860_SVR4_VA_LIST
#define FREG_OFFSET 0
#define IREG_OFFSET (NUM_PARM_FREGS * UNITS_PER_WORD)
#else
*************** i860_va_arg (valist, type)
*** 2316,2322 ****
build_int_2 (incr, 0)));
TREE_SIDE_EFFECTS (t) = 1;
! t = fold (build (MULT_EXPR, TREE_TYPE (field), field,
build_int_2 (UNITS_PER_WORD, 0)));
TREE_SIDE_EFFECTS (t) = 1;
--- 2308,2314 ----
build_int_2 (incr, 0)));
TREE_SIDE_EFFECTS (t) = 1;
! t = fold (build (MULT_EXPR, TREE_TYPE (field), t /* field */,
build_int_2 (UNITS_PER_WORD, 0)));
TREE_SIDE_EFFECTS (t) = 1;
*************** i860_va_arg (valist, type)
*** 2359,2361 ****
--- 2351,2412 ----
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;
+
Index: i860.h
===================================================================
RCS file: /home/localcvs/gcc/gcc/config/i860/i860.h,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 i860.h
*** i860.h 2003/08/10 21:27:29 1.1.1.1
--- i860.h 2003/08/10 21:41:49
***************
*** 1,6 ****
/* Definitions of target machine for GNU compiler, for Intel 860.
Copyright (C) 1989, 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000,
! 2001, 2002 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler.
--- 1,6 ----
/* Definitions of target machine for GNU compiler, for Intel 860.
Copyright (C) 1989, 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000,
! 2001, 2002, 2003 Free Software Foundation, Inc.
Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to
the whims of the System V Release 4 assembler.
*************** Boston, MA 02111-1307, USA. */
*** 27,35 ****
/* Names to predefine in the preprocessor for this target machine. */
- #define CPP_PREDEFINES "-Di860 -Dunix -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860"
-
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (i860)");
--- 27,39 ----
/* Names to predefine in the preprocessor for this target machine. */
+ #define TARGET_CPU_CPP_BUILTINS() \
+ do { \
+ builtin_define ("i860"); \
+ builtin_assert ("cpu=i860"); \
+ builtin_assert ("machine=i860"); \
+ } while (0)
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (i860)");
*************** struct cumulative_args { int ints, float
*** 572,579 ****
(VALIST) = i860_build_va_list ()
/* Implement `va_start' for varargs and stdarg. */
! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
! i860_va_start (stdarg, valist, nextarg)
/* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
--- 576,583 ----
(VALIST) = i860_build_va_list ()
/* Implement `va_start' for varargs and stdarg. */
! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \
! i860_va_start (valist, nextarg)
/* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
*************** struct cumulative_args { int ints, float
*** 885,907 ****
but a CALL with constant address is cheap. */
#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
should be added to avoid a branch.
--- 889,894 ----
*************** struct cumulative_args { int ints, float
*** 958,976 ****
#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
may contain character constants, extra white space, comments, etc. */
--- 945,950 ----
*************** struct cumulative_args { int ints, float
*** 1008,1043 ****
#define ASM_OUTPUT_LABEL(FILE,NAME) \
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.
! This definition is overridden in i860v4.h because under System V
Release 4, user-level symbols are *not* prefixed with underscores in
the generated assembly code. */
#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
labels a jump table. */
#undef ASM_OUTPUT_CASE_LABEL
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
do { ASM_OUTPUT_ALIGN ((FILE), 2); \
! ASM_OUTPUT_INTERNAL_LABEL ((FILE), PREFIX, NUM); \
} while (0)
/* Output at the end of a jump table. */
--- 982,1002 ----
#define ASM_OUTPUT_LABEL(FILE,NAME) \
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
/* The prefix to add to user-visible assembler symbols.
! This definition is overridden in i860/sysv4.h because under System V
Release 4, user-level symbols are *not* prefixed with underscores in
the generated assembly code. */
#define USER_LABEL_PREFIX "_"
/* This is how to output an internal numbered label which
labels a jump table. */
#undef ASM_OUTPUT_CASE_LABEL
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
do { ASM_OUTPUT_ALIGN ((FILE), 2); \
! (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM); \
} while (0)
/* Output at the end of a jump table. */
Index: sysv4.h
===================================================================
RCS file: /home/localcvs/gcc/gcc/config/i860/sysv4.h,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 sysv4.h
*** sysv4.h 2003/08/10 21:27:29 1.1.1.1
--- sysv4.h 2003/08/10 21:42:02
***************
*** 1,5 ****
/* Target definitions for GNU compiler for Intel 80860 running System V.4
! Copyright (C) 1991, 1996, 2000, 2002 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
--- 1,5 ----
/* Target definitions for GNU compiler for Intel 80860 running System V.4
! Copyright (C) 1991, 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA. */
*** 22,27 ****
--- 22,30 ----
#undef TARGET_VERSION
#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
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
*************** Boston, MA 02111-1307, USA. */
*** 31,38 ****
will be selected when we are building gnulib2.c.
__svr4__ is our extension. */
! #define CPP_PREDEFINES \
! "-Di860 -Dunix -DSVR4 -D__svr4__ -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860"
/* For the benefit of i860_va_arg, flag it this way too. */
--- 34,49 ----
will be selected when we are building gnulib2.c.
__svr4__ is our extension. */
! #define TARGET_OS_CPP_BUILTINS() \
! 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. */
*************** Boston, MA 02111-1307, USA. */
*** 48,53 ****
--- 59,66 ----
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "\"%s\""
+ #define GLOBAL_ASM_OP ".globl "
+
/* The following macro definition overrides the one in i860.h
because the svr4 i860 assembler requires a different syntax
for getting parts of constant/relocatable values. */
*************** Boston, MA 02111-1307, USA. */
*** 59,69 ****
fprintf (FILE, "]@%s", PART_CODE); \
} while (0)
! #undef ASM_FILE_START
! #define ASM_FILE_START(FILE) \
! do { output_file_directive (FILE, main_input_filename); \
! fprintf (FILE, "\t.version\t\"01.01\"\n"); \
! } while (0)
/* Output the special word the svr4 SDB wants to see just before
the first word of each function's prologue code. */
--- 72,81 ----
fprintf (FILE, "]@%s", PART_CODE); \
} while (0)
! #undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
! #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
! #undef TARGET_ASM_FILE_START
! #define TARGET_ASM_FILE_START i860_file_start
/* Output the special word the svr4 SDB wants to see just before
the first word of each function's prologue code. */