Commit c7bdf0a6 by Zack Weinberg

config.gcc: Remove all stanzas for previously obsoleted systems.

	* config.gcc: Remove all stanzas for previously obsoleted
	systems.  Where necessary, add explicit error stanzas to
	prevent removed systems from being misidentified as something
	else.  Begin a fresh obsoletions list, with the systems that
	were reprieved last round.
	* doc/install.texi: Remove all mention of dead targets.
	* fixinc/mkfixinc.sh: Likewise.

	* config/arm/arm.h: Bit 31 of target_flags is no longer
	reserved.

	* config/1750a/1750a-protos.h, config/1750a/1750a.c,
	config/1750a/1750a.h, config/1750a/1750a.md, config/1750a/ms1750.inc,
	config/a29k/a29k-protos.h, config/a29k/a29k.c, config/a29k/a29k.h,
	config/a29k/a29k.md, config/a29k/rtems.h, config/a29k/t-a29kbare,
	config/a29k/t-vx29k, config/a29k/unix.h, config/a29k/vx29k.h,
	config/alpha/osf12.h, config/alpha/osf2or3.h,
	config/arm/arm-wince-pe.h, config/arm/arm.h, config/arm/riscix.h,
	config/arm/riscix1-1.h, config/arm/rix-gas.h, config/arm/t-riscix,
	config/clipper/clipper-protos.h, config/clipper/clipper.c,
	config/clipper/clipper.h, config/clipper/clipper.md,
	config/clipper/clix.h, config/convex/convex-protos.h,
	config/convex/convex.c, config/convex/convex.h,
	config/convex/convex.md, config/convex/fixinc.convex,
	config/convex/proto.h, config/elxsi/elxsi-protos.h,
	config/elxsi/elxsi.c, config/elxsi/elxsi.h, config/elxsi/elxsi.md,
	config/i386/386bsd.h, config/i386/aix386.h, config/i386/aix386ng.h,
	config/i386/bsd386.h, config/i386/dgux.h, config/i386/djgpp-rtems.h,
	config/i386/isc.h, config/i386/iscdbx.h, config/i386/linux-oldld.h,
	config/i386/next.h, config/i386/osf1-ci.asm, config/i386/osf1-cn.asm,
	config/i386/osf1elf.h, config/i386/osf1elfgdb.h, config/i386/osfelf.h,
	config/i386/osfrose.h, config/i386/rtems.h, config/i386/seq-gas.h,
	config/i386/seq-sysv3.h, config/i386/seq2-sysv3.h,
	config/i386/sequent.h, config/i386/sun.h, config/i386/sun386.h,
	config/i386/t-dgux, config/i386/t-next, config/i386/t-osf,
	config/i386/t-osf1elf, config/i860/bsd-gas.h, config/i860/bsd.h,
	config/i860/fx2800.h, config/i860/i860-protos.h, config/i860/i860.c,
	config/i860/i860.h, config/i860/i860.md, config/i860/mach.h,
	config/i860/paragon.h, config/i860/sysv3.h, config/i860/sysv4.h,
	config/i860/t-fx2800, config/i860/varargs.asm, config/m68k/a-ux.h,
	config/m68k/altos3068.h, config/m68k/apollo68.h,
	config/m68k/aux-crt1.c, config/m68k/aux-crt2.asm,
	config/m68k/aux-crtn.asm, config/m68k/aux-exit.c,
	config/m68k/aux-low.gld, config/m68k/aux-mcount.c,
	config/m68k/auxas.h, config/m68k/auxgas.h, config/m68k/auxgld.h,
	config/m68k/auxld.h, config/m68k/ctix.h, config/m68k/dpx2.h,
	config/m68k/dpx2.ifile, config/m68k/dpx2cdbx.h, config/m68k/dpx2g.h,
	config/m68k/isi-nfp.h, config/m68k/isi.h, config/m68k/lynx-ng.h,
	config/m68k/lynx.h, config/m68k/math-3300.h, config/m68k/news.h,
	config/m68k/news3.h, config/m68k/news3gas.h, config/m68k/newsgas.h,
	config/m68k/next.h, config/m68k/next21.h, config/m68k/rtems.h,
	config/m68k/t-aux, config/m68k/t-lynx, config/m68k/t-next,
	config/m68k/x-next, config/m88k/dgux.h, config/m88k/dgux.ld,
	config/m88k/dguxbcs.h, config/m88k/dolph.h, config/m88k/dolphin.ld,
	config/m88k/luna.h, config/m88k/m88k-coff.h, config/m88k/sysv3.h,
	config/m88k/t-bug, config/m88k/t-dgux, config/m88k/t-dgux-gas,
	config/m88k/t-dguxbcs, config/m88k/t-dolph, config/m88k/t-m88k-gas,
	config/m88k/t-tekXD88, config/m88k/tekXD88.h, config/m88k/tekXD88.ld,
	config/mips/bsd-4.h, config/mips/bsd-5.h, config/mips/dec-bsd.h,
	config/mips/dec-osf1.h, config/mips/elflorion.h,
	config/mips/iris4loser.h, config/mips/mips-5.h, config/mips/news4.h,
	config/mips/news5.h, config/mips/nws3250v4.h, config/mips/osfrose.h,
	config/mips/svr3-4.h, config/mips/svr3-5.h, config/mips/svr4-4.h,
	config/mips/svr4-5.h, config/mips/svr4-t.h, config/mips/t-bsd,
	config/mips/t-bsd-gas, config/mips/t-svr3, config/mips/t-svr3-gas,
	config/mips/t-svr4, config/mips/t-svr4-gas, config/mips/t-ultrix,
	config/mips/ultrix.h, config/nextstep-protos.h, config/nextstep.c,
	config/nextstep.h, config/nextstep21.h, config/ns32k/encore.h,
	config/ns32k/merlin.h, config/ns32k/pc532-mach.h,
	config/ns32k/pc532-min.h, config/ns32k/pc532.h,
	config/ns32k/sequent.h, config/ns32k/tek6000.h,
	config/ns32k/tek6100.h, config/ns32k/tek6200.h, config/pj/lib1funcs.S,
	config/pj/linux.h, config/pj/pj-protos.h, config/pj/pj.c,
	config/pj/pj.h, config/pj/pj.md, config/pj/pjl.h, config/pj/t-pj,
	config/sparc/rtems.h, config/we32k/we32k-protos.h,
	config/we32k/we32k.c, config/we32k/we32k.h, config/we32k/we32k.md:
	Delete file.

From-SVN: r53862
parent 755ac5d4
2002-05-24 Zack Weinberg <zack@codesourcery.com>
* config.gcc: Remove all stanzas for previously obsoleted
systems. Where necessary, add explicit error stanzas to
prevent removed systems from being misidentified as something
else. Begin a fresh obsoletions list, with the systems that
were reprieved last round.
* doc/install.texi: Remove all mention of dead targets.
* fixinc/mkfixinc.sh: Likewise.
* config/arm/arm.h: Bit 31 of target_flags is no longer
reserved.
* config/1750a/1750a-protos.h, config/1750a/1750a.c,
config/1750a/1750a.h, config/1750a/1750a.md, config/1750a/ms1750.inc,
config/a29k/a29k-protos.h, config/a29k/a29k.c, config/a29k/a29k.h,
config/a29k/a29k.md, config/a29k/rtems.h, config/a29k/t-a29kbare,
config/a29k/t-vx29k, config/a29k/unix.h, config/a29k/vx29k.h,
config/alpha/osf12.h, config/alpha/osf2or3.h,
config/arm/arm-wince-pe.h, config/arm/arm.h, config/arm/riscix.h,
config/arm/riscix1-1.h, config/arm/rix-gas.h, config/arm/t-riscix,
config/clipper/clipper-protos.h, config/clipper/clipper.c,
config/clipper/clipper.h, config/clipper/clipper.md,
config/clipper/clix.h, config/convex/convex-protos.h,
config/convex/convex.c, config/convex/convex.h,
config/convex/convex.md, config/convex/fixinc.convex,
config/convex/proto.h, config/elxsi/elxsi-protos.h,
config/elxsi/elxsi.c, config/elxsi/elxsi.h, config/elxsi/elxsi.md,
config/i386/386bsd.h, config/i386/aix386.h, config/i386/aix386ng.h,
config/i386/bsd386.h, config/i386/dgux.h, config/i386/djgpp-rtems.h,
config/i386/isc.h, config/i386/iscdbx.h, config/i386/linux-oldld.h,
config/i386/next.h, config/i386/osf1-ci.asm, config/i386/osf1-cn.asm,
config/i386/osf1elf.h, config/i386/osf1elfgdb.h, config/i386/osfelf.h,
config/i386/osfrose.h, config/i386/rtems.h, config/i386/seq-gas.h,
config/i386/seq-sysv3.h, config/i386/seq2-sysv3.h,
config/i386/sequent.h, config/i386/sun.h, config/i386/sun386.h,
config/i386/t-dgux, config/i386/t-next, config/i386/t-osf,
config/i386/t-osf1elf, config/i860/bsd-gas.h, config/i860/bsd.h,
config/i860/fx2800.h, config/i860/i860-protos.h, config/i860/i860.c,
config/i860/i860.h, config/i860/i860.md, config/i860/mach.h,
config/i860/paragon.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/i860/t-fx2800, config/i860/varargs.asm, config/m68k/a-ux.h,
config/m68k/altos3068.h, config/m68k/apollo68.h,
config/m68k/aux-crt1.c, config/m68k/aux-crt2.asm,
config/m68k/aux-crtn.asm, config/m68k/aux-exit.c,
config/m68k/aux-low.gld, config/m68k/aux-mcount.c,
config/m68k/auxas.h, config/m68k/auxgas.h, config/m68k/auxgld.h,
config/m68k/auxld.h, config/m68k/ctix.h, config/m68k/dpx2.h,
config/m68k/dpx2.ifile, config/m68k/dpx2cdbx.h, config/m68k/dpx2g.h,
config/m68k/isi-nfp.h, config/m68k/isi.h, config/m68k/lynx-ng.h,
config/m68k/lynx.h, config/m68k/math-3300.h, config/m68k/news.h,
config/m68k/news3.h, config/m68k/news3gas.h, config/m68k/newsgas.h,
config/m68k/next.h, config/m68k/next21.h, config/m68k/rtems.h,
config/m68k/t-aux, config/m68k/t-lynx, config/m68k/t-next,
config/m68k/x-next, config/m88k/dgux.h, config/m88k/dgux.ld,
config/m88k/dguxbcs.h, config/m88k/dolph.h, config/m88k/dolphin.ld,
config/m88k/luna.h, config/m88k/m88k-coff.h, config/m88k/sysv3.h,
config/m88k/t-bug, config/m88k/t-dgux, config/m88k/t-dgux-gas,
config/m88k/t-dguxbcs, config/m88k/t-dolph, config/m88k/t-m88k-gas,
config/m88k/t-tekXD88, config/m88k/tekXD88.h, config/m88k/tekXD88.ld,
config/mips/bsd-4.h, config/mips/bsd-5.h, config/mips/dec-bsd.h,
config/mips/dec-osf1.h, config/mips/elflorion.h,
config/mips/iris4loser.h, config/mips/mips-5.h, config/mips/news4.h,
config/mips/news5.h, config/mips/nws3250v4.h, config/mips/osfrose.h,
config/mips/svr3-4.h, config/mips/svr3-5.h, config/mips/svr4-4.h,
config/mips/svr4-5.h, config/mips/svr4-t.h, config/mips/t-bsd,
config/mips/t-bsd-gas, config/mips/t-svr3, config/mips/t-svr3-gas,
config/mips/t-svr4, config/mips/t-svr4-gas, config/mips/t-ultrix,
config/mips/ultrix.h, config/nextstep-protos.h, config/nextstep.c,
config/nextstep.h, config/nextstep21.h, config/ns32k/encore.h,
config/ns32k/merlin.h, config/ns32k/pc532-mach.h,
config/ns32k/pc532-min.h, config/ns32k/pc532.h,
config/ns32k/sequent.h, config/ns32k/tek6000.h,
config/ns32k/tek6100.h, config/ns32k/tek6200.h, config/pj/lib1funcs.S,
config/pj/linux.h, config/pj/pj-protos.h, config/pj/pj.c,
config/pj/pj.h, config/pj/pj.md, config/pj/pjl.h, config/pj/t-pj,
config/sparc/rtems.h, config/we32k/we32k-protos.h,
config/we32k/we32k.c, config/we32k/we32k.h, config/we32k/we32k.md:
Delete file.
2002-05-24 Richard Henderson <rth@redhat.com>
* flags.h (TLS_MODEL_GLOBAL_DYNAMIC): Set to 1.
......@@ -34,8 +114,8 @@
2002-05-24 Richard Henderson <rth@redhat.com>
* varasm.c (asm_output_bss): Always output one byte.
* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* varasm.c (asm_output_bss): Always output one byte.
* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
2002-05-24 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
......@@ -56,7 +136,7 @@
* config/i386/mingw32.h (CPP_SPEC): Remove -remap.
2002-05-23 Gabriel Dos Reis <gdr@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
* config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Properly output
quoted strings.
......@@ -430,7 +510,7 @@ Thu May 23 09:22:23 CEST 2002 Jan Hubicka <jh@suse.cz>
dynamic linker.
(STARTFILE_PREFIX_SPEC): Define.
(STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Rewrite without
absolute paths.
absolute paths.
2002-05-22 Kazu Hirata <kazu@cs.umass.edu>
......
/* Definitions of target machine for GNU compiler.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef RTX_CODE
#ifdef TREE_CODE
extern struct rtx_def *function_arg PARAMS ((int, enum machine_mode, tree, int));
#endif /* TREE_CODE */
extern const char *movcnt_regno_adjust PARAMS ((rtx *));
extern const char *mod_regno_adjust PARAMS ((const char *, rtx *));
extern void notice_update_cc PARAMS ((rtx));
extern int memop_valid PARAMS ((rtx));
extern int mov_memory_operand PARAMS ((rtx, enum machine_mode));
extern int small_nonneg_const PARAMS ((rtx, enum machine_mode));
extern int zero_operand PARAMS ((rtx, enum machine_mode));
extern int b_mode_operand PARAMS ((rtx));
extern int unsigned_comparison_operator PARAMS ((rtx));
extern int next_cc_user_is_unsigned PARAMS ((rtx));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
#endif /* RTX_CODE */
extern const char *branch_or_jump PARAMS ((const char *, int));
extern int find_jmplbl PARAMS ((int));
extern int one_bit_set_p PARAMS ((int));
extern void check_section PARAMS ((enum section));
extern long real_value_to_target_single PARAMS((double));
extern void real_value_to_target_double PARAMS((double, long[]));
;; GCC assembler includefile for AS1750
;;
;; Macros defined:
;; EFLR.M #d,#s Load the three regs starting at R#s to R#d following.
;; RET.M #fs Return from function (uses the framesize #fs)
UC SET 15
; Return from function ; parameter: framesize
MACRO RET.M
IF `1` > 0
IF `1` <= 16
AISP R14,`1`
ELSE
AIM R14,`1`
ENDIF
ENDIF
LR R15,R14
URS R15
ENDMACRO
; Useful instructions missing from the 1750A standard:
; Extended Float Load from Registers
MACRO EFLR.M ; args : #1=dest-regno, #2=source-regno
ONE SET `1` + 2
TWO SET `2` + 2
IF `1` >= `2` || `1`+2 < `2`
LR R`ONE`,R`TWO`
DLR R`1`,R`2`
ELSE
DLR R`1`,R`2`
LR R`ONE`,R`TWO`
DLR R`1`,R`1` ; Just to update condition codes
ENDIF
ENDMACRO
; The following leave the condition codes haywire. But that is
; accounted for (see notice_update_cc in config/1750a.c.)
; Double ANd Register with Register
MACRO DANR.M
ONE SET `1` + 1
TWO SET `2` + 1
ANDR R`1`,R`2`
ANDR R`ONE`,R`TWO`
ENDMACRO
; Double OR Register with Register
MACRO DORR.M
ONE SET `1` + 1
TWO SET `2` + 1
ORR R`1`,R`2`
ORR R`ONE`,R`TWO`
ENDMACRO
; Double eXoR Register with Register
MACRO DXRR.M
ONE SET `1` + 1
TWO SET `2` + 1
XORR R`1`,R`2`
XORR R`ONE`,R`TWO`
ENDMACRO
; Double Nand Register with register
MACRO DNR.M
ONE SET `1` + 1
TWO SET `2` + 1
NR R`1`,R`2`
NR R`ONE`,R`TWO`
ENDMACRO
; Unsigned Compare Immediate
MACRO UCIM.M
LAST SET `1` + 3
PSHM R`1`,R`LAST`
LO SET `1` + 1
LR R`LO`,R`1`
XORR R`1`,R`1`
HI SET `1` + 2
XORR R`HI`,R`HI`
LIM R`LAST`,`2`
DCR R`1`,R`HI`
POPM R`1`,R`LAST`
ENDMACRO
; Unsigned Compare Register with register
MACRO UCR.M
PSHM R10,R13 ; R12 and R13 are assumed not to be input parameters
LR R13,R`2`
LR R11,R`1`
XORR R12,R12
XORR R10,R10
DCR R10,R12
POPM R10,R13
ENDMACRO
; Unsigned Compare register with memory
MACRO UC.M
PSHM R10,R13
L R13,`2`
LR R11,R`1`
XORR R12,R12
XORR R10,R10
DCR R10,R12
POPM R10,R13
ENDMACRO
; Double Unsigned Compare Register with register
MACRO DUCR.M
PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters
LOW1 SET `1` + 1
LOW2 SET `2` + 1
PSHM R`1`,R`LOW1`
PSHM R`2`,R`LOW2`
LR R13,R`LOW1`
LR R14,R`LOW2`
DSRL R`1`,1
DSRL R`2`,1
DCR R`1`,R`2`
BNE +6
ANDM R13,1
ANDM R14,1
CR R13,R14
POPM R`2`,R`LOW2`
POPM R`1`,R`LOW1`
POPM R13,R14
ENDMACRO
; Double Unsigned Compare register with memory
MACRO DUC.M
PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters
LOW1 SET `1` + 1
PSHM R`1`,R`LOW1`
DL R13,`2`
DSRL R`1`,1
DSRL R13,1
DCR R`1`,R13
BNE +10 ; done, go pop the saved regs
DL R13,`2` ; interested in the *low* word (R14)
L R13,1,R15
ANDM R13,1
ANDM R14,1
CR R13,R14
POPM R`1`,R`LOW1`
POPM R13,R14
ENDMACRO
/* Definitions of target machine for GNU compiler, for AMD Am29000 CPU.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef RTX_CODE
/* This function is used to get the address of an object. */
extern struct rtx_def *a29k_get_reloaded_address PARAMS ((rtx));
extern int gpc_reg_operand PARAMS ((rtx, enum machine_mode));
extern int long_const_operand PARAMS ((rtx, enum machine_mode));
extern int cint_8_operand PARAMS ((rtx, enum machine_mode));
extern int cint_16_operand PARAMS ((rtx, enum machine_mode));
extern int const_0_operand PARAMS ((rtx, enum machine_mode));
extern int const_8_operand PARAMS ((rtx, enum machine_mode));
extern int const_16_operand PARAMS ((rtx, enum machine_mode));
extern int const_24_operand PARAMS ((rtx, enum machine_mode));
extern int float_const_operand PARAMS ((rtx, enum machine_mode));
extern int gpc_reg_or_float_constant_operand PARAMS ((rtx, enum machine_mode));
extern int gpc_reg_or_integer_constant_operand PARAMS ((rtx, enum machine_mode));
extern int spec_reg_operand PARAMS ((rtx, enum machine_mode));
extern int accum_reg_operand PARAMS ((rtx, enum machine_mode));
extern int srcb_operand PARAMS ((rtx, enum machine_mode));
extern int cmplsrcb_operand PARAMS ((rtx, enum machine_mode));
extern int gpc_reg_or_immediate_operand PARAMS ((rtx, enum machine_mode));
extern int and_operand PARAMS ((rtx, enum machine_mode));
extern int add_operand PARAMS ((rtx, enum machine_mode));
extern int call_operand PARAMS ((rtx, enum machine_mode));
extern int in_operand PARAMS ((rtx, enum machine_mode));
extern int out_operand PARAMS ((rtx, enum machine_mode));
extern int reload_memory_operand PARAMS ((rtx, enum machine_mode));
extern void a29k_set_memflags PARAMS ((rtx, rtx));
extern int fp_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int branch_operator PARAMS ((rtx, enum machine_mode));
extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int masks_bits_for_special PARAMS ((rtx, rtx));
extern int epilogue_operand PARAMS ((rtx, enum machine_mode));
extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
enum machine_mode, rtx));
extern int incoming_reg PARAMS ((int, int));
extern void a29k_clobbers_to PARAMS ((rtx, rtx));
extern int needs_regstack_p PARAMS ((void));
extern int uses_local_reg_p PARAMS ((rtx));
extern int null_epilogue PARAMS ((void));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void a29k_compute_reg_names PARAMS ((void));
#endif /* RTX_CODE */
extern void literal_section PARAMS ((void));
/* Definitions for rtems targeting a AMD A29K using COFF.
Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -D__rtems__ \
-Asystem=rtems -Acpu=a29k -Amachine=a29k"
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# We don't want to put exit in libgcc.a for VxWorks, because VxWorks
# does not have _exit.
TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
/* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix.
Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* We define unix instead of EPI and define unix-style machine names. */
/* Set our default target to be the 29050; that is the more interesting chip
for Unix systems. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (1+2+16+128)
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dam29k -Da29k -Dam29000 -Asystem=unix -Acpu=a29k -Amachine=a29k"
#undef CPP_SPEC
#define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}"
/* Use a default linker configuration file. */
#undef LINK_SPEC
#define LINK_SPEC "-T default.gld%s"
/* Define the magic numbers that we recognize as COFF. */
#define MY_ISCOFF(magic) ((magic) == SIPFBOMAGIC || (magic) == SIPRBOMAGIC)
/* For some systems, it is best if double-word objects are aligned on a
doubleword boundary. We want to maintain compatibility with MetaWare in
a29k.h, but do not feel constrained to do so here. */
#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 64
/* Add shared data as a kludge for now. */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
{ const char *p, *after_dir = main_input_filename; \
if (TARGET_29050) \
fprintf (FILE, "\t.cputype 29050\n"); \
for (p = main_input_filename; *p; p++) \
if (*p == '/') \
after_dir = p + 1; \
fprintf (FILE, "\t.file "); \
output_quoted_string (FILE, after_dir); \
fprintf (FILE, "\n"); \
if (flag_shared_data) \
fprintf (FILE, "\t.sect .shdata,data\n"); \
fprintf (FILE, "\t.sect .lit,lit\n"); }
/* Output before shared data. */
#define SHARED_SECTION_ASM_OP "\t.use .shdata"
/* If we want shared data, we have to turn off commons. */
#define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1;
/* Default to -fno-pcc-struct-return, since we don't have to worry about
compatibility. */
#define DEFAULT_PCC_STRUCT_RETURN 0
#if 0 /* This would be needed except that the 29k doesn't have strict
alignment requirements. */
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
(((TYPE) != 0) \
? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY) \
? PARM_BOUNDARY \
: TYPE_ALIGN(TYPE)) \
: ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \
? PARM_BOUNDARY \
: GET_MODE_ALIGNMENT(MODE)))
#endif
/* Definitions of target machine for GNU compiler. Vxworks 29k version.
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the 29k running on VxWorks. */
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -Acpu=a29k -Amachine=a29k -D__vxworks -D__vxworks_5"
/* Vxworks header files require that the macro CPU be set.
We could define it in CPP_PREDEFINES, but the value is (or will be)
dependent upon GCC options. */
#undef CPP_SPEC
#define CPP_SPEC "-DCPU=AM29200"
/* VxWorks does all the library stuff itself. */
#undef LIB_SPEC
#define LIB_SPEC ""
/* VxWorks provides the functionality of crt0.o and friends itself. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s"
/* Definitions of target machine for GNU compiler, for DEC Alpha.
Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* In OSF 1.2, there is a linker bug that prevents use of -O3 to
the linker. */
#undef LINK_SPEC
#define LINK_SPEC \
"-G 8 -O1 %{static:-non_shared} %{rpath*} \
%{!static:%{shared:-shared} %{!shared:-call_shared}} %{taso}"
#undef WCHAR_TYPE
#define WCHAR_TYPE "short unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
/* Definitions of target machine for GNU compiler, for DEC Alpha, osf[23].
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* In OSF 2 or 3, linking with -lprof1 doesn't require -lpdf. */
#undef LIB_SPEC
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc"
/* As of OSF 3.2, as still can't subtract adjacent labels. */
#undef TARGET_AS_CAN_SUBTRACT_LABELS
#define TARGET_AS_CAN_SUBTRACT_LABELS 0
/* The frame unwind data requires the ability to subtract labels. */
#undef DWARF2_UNWIND_INFO
#define DWARF2_UNWIND_INFO 0
/* Definitions of target machine for GNU compiler,
for ARM with PE obj format running under the WinCE operating system.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define ARM_WINCE 1
#include "pe.h"
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (ARM/WinCE/PE)", stderr);
/* The next three definitions are defined in pe.h,
undefined in arm/arm-pe.h and then redefined back here! */
#undef LIB_SPEC
#define LIB_SPEC "-lcoredll -lcorelibc"
#define MATH_LIBRARY ""
#define LIBSTDCXX "-lc"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
#define ENDFILE_SPEC ""
#undef CPP_APCS_PC_DEFAULT_SPEC
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
#undef CC1_SPEC
#define CC1_SPEC "%{!mapcs-32:%{!mapcs-26:-mapcs-32}}"
#undef ASM_SPEC
#define ASM_SPEC " \
%{mbig-endian:-EB} \
%{mcpu=*:-mcpu=%*} \
%{march=*:-march=%*} \
%{mapcs-*:-mapcs-%*} \
%{mthumb-interwork:-mthumb-interwork} \
%{!mapcs-32:%{!mapcs-26:-mapcs-32}} \
"
/* WinCE headers require -DARM */
#undef PE_SUBTARGET_CPP_SPEC
#define PE_SUBTARGET_CPP_SPEC "-D__pe__ -DARM -D__unaligned=__attribute__((aligned(1))) "
#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
......@@ -390,8 +390,7 @@ Unrecognized value in TARGET_CPU_DEFAULT.
? (target_flags & THUMB_FLAG_LEAF_BACKTRACE) \
: (target_flags & THUMB_FLAG_BACKTRACE))
/* SUBTARGET_SWITCHES is used to add flags on a per-config basis.
Bit 31 is reserved. See riscix.h. */
/* SUBTARGET_SWITCHES is used to add flags on a per-config basis. */
#ifndef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES
#endif
......
/* Definitions of target machine for GNU compiler. ARM RISCiX version.
Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Translation to find startup files. On RISC iX boxes,
crt0, mcrt0 and gcrt0.o are in /usr/lib. */
#define STARTFILE_SPEC "\
%{pg:/usr/lib/gcrt0.o%s}\
%{!pg:%{p:/usr/lib/mcrt0.o%s}\
%{!p:/usr/lib/crt0.o%s}}"
/* RISC iX has no concept of -lg */
/* If -static is specified then link with -lc_n */
#ifndef LIB_SPEC
#define LIB_SPEC "\
%{g*:-lg}\
%{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\
%{p:-lc_p}\
%{pg:-lc_p}"
#endif
/* The RISC iX assembler never deletes any symbols from the object module;
and, by default, ld doesn't either. -X causes local symbols starting
with 'L' to be deleted, which is what we want. */
#ifndef LINK_SPEC
#define LINK_SPEC "-X"
#endif
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define_std ("arm"); \
builtin_define_std ("unix"); \
builtin_define_std ("riscix"); \
builtin_assert ("system=unix"); \
} while (0)
/* RISCiX has some weird symbol name munging, that is done to the object module
after assembly, which enables multiple libraries to be supported within
one (possibly shared) library. It basically changes the symbol name of
certain symbols (for example _bcopy is converted to _$bcopy if using BSD)
Symrename's parameters are determined as follows:
-mno-symrename Don't run symrename
-mbsd symrename -BSD <file>
-mxopen symrename -XOPEN <file>
-ansi symrename - <file>
<none> symrename -BSD <file>
*/
#ifndef ASM_FINAL_SPEC
#if !defined (CROSS_COMPILE)
#define ASM_FINAL_SPEC "\
%{!mno-symrename: \
\n /usr/bin/symrename \
-%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\
%{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\
%{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\
%{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}"
#endif
#endif
/* None of these is actually used in cc1. If we don't define them in target
switches cc1 complains about them. For the sake of argument lets allocate
bit 31 of target flags for such options. */
#define SUBTARGET_SWITCHES \
{"bsd", 0x80000000, N_("Do symbol renaming for BSD")}, \
{"xopen", 0x80000000, N_("Do symbol renaming for X/OPEN")}, \
{"no-symrename", 0x80000000, N_("Don't do symbol renaming")},
/* Run-time Target Specification. */
#define TARGET_VERSION \
fputs (" (ARM/RISCiX)", stderr);
/* This is used in ASM_FILE_START */
#define ARM_OS_NAME "RISCiX"
/* Unsigned chars produces much better code than signed. */
#define DEFAULT_SIGNED_CHAR 0
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
must define both, or neither. */
#ifndef NAME__MAIN
#define NAME__MAIN "__gccmain"
#define SYMBOL__MAIN __gccmain
#endif
/* size_t is "unsigned int" in RISCiX */
#define SIZE_TYPE "unsigned int"
/* ptrdiff_t is "int" in RISCiX */
#define PTRDIFF_TYPE "int"
/* Maths operation domain error number, EDOM */
#define TARGET_EDOM 33
/* Override the normal default CPU */
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
/* r10 is reserved by RISCiX */
#define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
fixed_regs[10] = 1; \
call_used_regs[10] = 1;
#include "arm/aout.h"
/* The RISCiX assembler does not understand .set */
#undef SET_ASM_OP
/* Add to CPP_SPEC, we want to add the right #defines when using the include
files. */
#define SUBTARGET_CPP_SPEC "\
%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \
%{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \
%{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \
%{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}"
/* The native RISCiX assembler does not support stabs of any kind; because
the native assembler is not used by the compiler, Acorn didn't feel it was
necessary to put them in! */
#ifdef DBX_DEBUGGING_INFO
#undef DBX_DEBUGGING_INFO
#endif
/* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version.
Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* RISCiX 1.1x is basically the same as 1.2x except that it doesn't have
symrename or atexit. */
/* Translation to find startup files. On RISCiX boxes, gcrt0.o is in
/usr/lib. */
#define STARTFILE_SPEC \
"%{pg:/usr/lib/gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define_std ("arm"); \
builtin_define_std ("unix"); \
builtin_define_std ("riscix"); \
builtin_assert ("system=unix"); \
} while (0)
/* Riscix 1.1 doesn't have X/OPEN support, so only accept -mbsd (but ignore
it).
By not having -mxopen and -mno-symrename, we get warning messages,
but everything still compiles. */
/* None of these is actually used in cc1, so they modify bit 31 */
#define SUBTARGET_SWITCHES \
{"bsd", 0x80000000, ""},
/* Run-time Target Specification. */
#define TARGET_VERSION \
fputs (" (ARM/RISCiX)", stderr);
/* This is used in ASM_FILE_START */
#define ARM_OS_NAME "RISCiX"
#ifdef riscos
#define TARGET_WHEN_DEBUGGING 3
#else
#define TARGET_WHEN_DEBUGGING 1
#endif
/* 'char' is signed by default on RISCiX, unsigned on RISCOS. */
#ifdef riscos
#define DEFAULT_SIGNED_CHAR 0
#else
#define DEFAULT_SIGNED_CHAR 1
#endif
/* Define this if the target system lacks the function atexit from the
ANSI C standard. If this is defined, and ON_EXIT is not
defined, a default exit function will be provided to support C++.
The man page only describes on_exit, but atexit is also there.
This seems to be missing in early versions.
FIXME Should we define ON_EXIT here? */
#define NEED_ATEXIT
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
must define both, or neither. */
#ifndef NAME__MAIN
#define NAME__MAIN "__gccmain"
#define SYMBOL__MAIN __gccmain
#endif
/* Override the normal default CPU */
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
/* r10 is reserved by RISCiX */
#define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
fixed_regs[10] = 1; \
call_used_regs[10] = 1;
#include "arm/aout.h"
#define SUBTARGET_CPP_SPEC "%{!ansi: -D_BSD_C}"
/* The native RISCiX assembler does not support stabs of any kind; because
the native assembler is not used by the compiler, Acorn didn't feel it was
necessary to put them in! */
#ifdef DBX_DEBUGGING_INFO
#undef DBX_DEBUGGING_INFO
#endif
/* Definitions of target machine for GNU compiler. ARM RISCiX(stabs) version.
Copyright (C) 1993 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Limit the length of a stabs entry (for the broken Acorn assembler) */
#undef DBX_CONTIN_LENGTH
#define DBX_CONTIN_LENGTH 80
/* The native RISCiX assembler does not support stabs of any kind; because
the native assembler is not used by the compiler, Acorn didn't feel it was
necessary to put them in!
However, this file assumes that we have an assembler that does have stabs,
so we put them back in. */
#define DBX_DEBUGGING_INFO
/* Unfortunately dbx doesn't understand these */
/* Dbx on RISCiX is so broken that I've given up trying to support it.
lets just support gdb. */
/* #define DEFAULT_GDB_EXTENSIONS 0 */
/* RISCiX dbx doesn't accept xrefs */
/* #define DBX_NO_XREFS 1 */
# Just for these, we omit the frame pointer since it makes such a big
# difference. It is then pointless adding debugging.
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer
LIBGCC2_DEBUG_CFLAGS = -g0
FIXPROTO_DEFINES= -D_POSIX_SOURCE -D_XOPEN_C -D_BSD_C -D_XOPEN_SOURCE
/* Definitions of target machine for GNU compiler. Clipper version.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Holger Teutsch (holger@hotbso.rhein-main.de)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef RTX_CODE
#ifdef TREE_CODE
extern void clipper_va_start PARAMS ((int, tree, rtx));
extern rtx clipper_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
extern void clipper_movstr PARAMS ((rtx *));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern const char *rev_cond_name PARAMS ((rtx));
extern int int_reg_operand PARAMS ((rtx, enum machine_mode));
extern int fp_reg_operand PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
extern struct rtx_def *clipper_builtin_saveregs PARAMS ((void));
extern int clipper_frame_size PARAMS ((int));
#ifdef TREE_CODE
extern tree clipper_build_va_list PARAMS ((void));
#endif /* TREE_CODE */
/* Definitions of target machine for GNU compiler. Clipper/Clix version.
Copyright (C) 1988, 1993, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dclipper -Dunix -Asystem=unix -Asystem=svr3 -Acpu=clipper -Amachine=clipper"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef LIB_SPEC
#define TARGET_MEM_FUNCTIONS
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { \
const unsigned char *s = (const unsigned char *)(PTR);\
size_t i, limit = (LEN); \
for (i = 0; i < limit; s++, i++) \
{ \
if ((i % 8) == 0) \
fputs ("\n\t.byte\t", (FILE)); \
fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \
} \
fputs ("\n", (FILE)); \
} while (0)
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
fprintf(FILE, "\t.align %d\n", 1 << (LOG))
#define BSS_SECTION_ASM_OP "\t.bss"
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP "\t.section .init,\"x\""
/* Define a few machine-specific details of the implementation of
constructors.
The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN
and CTOR_LIST_END to contribute to the .init section an instruction to
push a word containing 0 (or some equivalent of that).
TARGET_ASM_CONSTRUCTOR should be defined to push the address of the
constructor. */
#define CTOR_LIST_BEGIN \
asm (INIT_SECTION_ASM_OP); \
asm ("subq $8,sp"); \
asm ("loadq $0,r0"); \
asm ("storw r0,(sp)")
/* don't need end marker */
#undef CTOR_LIST_END
/* fini psect is 8 aligned */
#define DTOR_LIST_BEGIN \
asm (DTORS_SECTION_ASM_OP); \
func_ptr __DTOR_LIST__[2] = { (func_ptr) (-1), 0 };
#undef TARGET_ASM_CONSTRUCTOR
#define TARGET_ASM_CONSTRUCTOR clix_asm_out_constructor
#undef TARGET_ASM_DESTRUCTOR
#define TARGET_ASM_DESTRUCTOR clix_asm_out_destructor
/* On clix crt1.o first calls init code and then sets environ and a valid
chrclass. Unfortunately stdio routines bomb with unset chrclass.
Therefore we set chrclass prior to calling global constructors. */
#undef DO_GLOBAL_CTORS_BODY
#define DO_GLOBAL_CTORS_BODY \
do { \
func_ptr *p, *beg = alloca (0); \
_setchrclass (0); \
for (p = beg; *p; p+=2) \
; \
while (p != beg) \
{ p-= 2; (*p) (); } \
} while (0)
#undef DO_GLOBAL_DTORS_BODY
#define DO_GLOBAL_DTORS_BODY \
func_ptr *f = &__DTOR_LIST__[2]; /* 0,1 contains -1,0 */ \
int n = 0; \
while (*f) \
{ \
f+= 2; /* skip over alignment 0 */ \
n++; \
} \
f -= 2; \
while (--n >= 0) \
{ \
(*f) (); \
f-= 2; /* skip over alignment 0 */ \
}
/* Definitions of target machine for GNU compiler. Convex version.
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef RTX_CODE
extern int const_double_low_int PARAMS ((rtx));
extern int const_double_high_int PARAMS ((rtx));
extern const char *output_cmp PARAMS ((rtx, rtx, int));
extern const char *output_condjump PARAMS ((rtx, const char *, int));
extern const char *output_call PARAMS ((rtx, rtx *));
extern rtx simplify_for_convex PARAMS ((rtx));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern void expand_movstr PARAMS ((rtx *));
extern int nonmemory_operand PARAMS ((rtx, enum machine_mode));
extern int nonmemory_cmpsf_operand PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
#ifdef TREE_CODE
extern void asm_declare_function_name PARAMS ((FILE *, const char *, tree));
#endif /* TREE_CODE */
#ifdef REAL_VALUE_TYPE
extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *,
int));
extern void outfloat PARAMS ((FILE *, REAL_VALUE_TYPE, const char *,
const char *, const char *));
#endif /* REAL_VALUE_TYPE */
extern void psw_disable_float PARAMS ((void));
extern void init_convex PARAMS ((void));
extern void replace_arg_pushes PARAMS ((void));
extern void emit_ap_optimizations PARAMS ((void));
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by on Fri Mar 12 08:41:28 CST 1993
# Contents: include/ include/limits.h include/math.h include/stddef.h
# include/stdlib.h
echo mkdir - include
mkdir include
chmod u=rwx,g=rwx,o=rx include
echo x - include/limits.h
sed 's/^@//' > "include/limits.h" <<'@//E*O*F include/limits.h//'
#ifndef _LIMITS_H
#define _LIMITS_H
#include_next <limits.h>
/* Minimum and maximum values a `char' can hold. */
#ifdef __CHAR_UNSIGNED__
#undef CHAR_MIN
#define CHAR_MIN 0
#undef CHAR_MAX
#define CHAR_MAX 255
#endif
#endif /* _LIMITS_H */
@//E*O*F include/limits.h//
chmod u=rw,g=rw,o=r include/limits.h
echo x - include/math.h
sed 's/^@//' > "include/math.h" <<'@//E*O*F include/math.h//'
#ifndef _MATH_H
#define _MATH_H
#include_next <math.h>
#undef HUGE_VAL
#if _IEEE_FLOAT_
#define HUGE_VAL 1.79769313486231570e+308
#else
#define HUGE_VAL 8.98846567431157854e+307
#endif
#if __OPTIMIZE__ && ! __NO_INLINE
#define frexp(x,y) __inline_frexp ((x), (y))
#define ldexp(x,y) __inline_ldexp ((x), (y))
#define irint(x) __inline_irint (x)
#define frexpf(x,y) __inline_frexpf ((x), (y))
#define ldexpf(x,y) __inline_ldexpf ((x), (y))
#define irintf(x) __inline_irintf (x)
#if __convex_c2__ || __convex_c32__ || __convex_c34__ || __convex_c38__
#define atan(x) __inline_atan (x)
#define ceil(x) __inline_ceil (x)
#define cos(x) __inline_cos (x)
#define exp(x) __inline_exp (x)
#define floor(x) __inline_floor (x)
#define log(x) __inline_log (x)
#define log10(x) __inline_log10 (x)
#define modf(x,y) __inline_modf ((x), (y))
#define rint(x) __inline_rint (x)
#define sin(x) __inline_sin (x)
#define sqrt(x) __inline_sqrt (x)
#define atanf(x) __inline_atanf (x)
#define ceilf(x) __inline_ceilf (x)
#define cosf(x) __inline_cosf (x)
#define expf(x) __inline_expf (x)
#define floorf(x) __inline_floorf (x)
#define logf(x) __inline_logf (x)
#define log10f(x) __inline_log10f (x)
#define modff(x,y) __inline_modff ((x), (y))
#define rintf(x) __inline_rintf (x)
#define sinf(x) __inline_sinf (x)
#define sqrtf(x) __inline_sqrtf (x)
#endif /* __convex_c[23*]__ */
#endif /* __OPTIMIZE__ */
static __inline__ __const__ double __inline_atan (double x)
{
double z;
__asm__ ("atan.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_atanf (float x)
{
float z;
__asm__ ("atan.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_cos (double x)
{
double z;
__asm__ ("cos.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_cosf (float x)
{
float z;
__asm__ ("cos.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_exp (double x)
{
double z;
__asm__ ("exp.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_expf (float x)
{
float z;
__asm__ ("exp.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_log (double x)
{
double z;
__asm__ ("ln.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_logf (float x)
{
float z;
__asm__ ("ln.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_sin (double x)
{
double z;
__asm__ ("sin.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_sinf (float x)
{
float z;
__asm__ ("sin.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_sqrt (double x)
{
double z;
__asm__ ("sqrt.d %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ float __inline_sqrtf (float x)
{
float z;
__asm__ ("sqrt.s %0" : "=d" (z) : "0" (x));
return z;
}
static __inline__ __const__ double __inline_ceil (double x)
{
double z;
__asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x));
if (z < x) z += 1.0;
return z;
}
static __inline__ __const__ float __inline_ceilf (float x)
{
float z;
__asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x));
if (z < x) z += 1.0F;
return z;
}
static __inline__ __const__ double __inline_floor (double x)
{
double z;
__asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x));
if (z > x) z -= 1.0;
return z;
}
static __inline__ __const__ float __inline_floorf (float x)
{
float z;
__asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x));
if (z > x) z -= 1.0F;
return z;
}
static __inline__ __const__ double __inline_log10 (double x)
{
return 0.43429448190325182765 * __inline_log (x);
}
static __inline__ __const__ float __inline_log10f (float x)
{
return 0.43429448190325182765F * __inline_logf (x);
}
static __inline__ double __inline_modf (double x, double *np)
{
double intpart;
__asm__ ("frint.d %1,%0" : "=d" (intpart) : "d" (x));
*np = intpart;
return x - intpart;
}
static __inline__ float __inline_modff (float x, float *np)
{
float intpart;
__asm__ ("frint.s %1,%0" : "=d" (intpart) : "d" (x));
*np = intpart;
return x - intpart;
}
static __inline__ double __inline_frexp (double x, int *np)
{
union u { double d; unsigned long long ll; } u;
if ((u.d = x) == 0)
*np = 0;
else
{
#if _IEEE_FLOAT_
*np = ((u.ll >> 52) & 03777) - 01776;
u.ll = (u.ll & 0x800fffffffffffffLL) | 0x3fe0000000000000LL;
#else
*np = ((u.ll >> 52) & 03777) - 02000;
u.ll = (u.ll & 0x800fffffffffffffLL) | 0x4000000000000000LL;
#endif
}
return u.d;
}
static __inline__ float __inline_frexpf (float x, int *np)
{
union u { float f; unsigned int i; } u;
if ((u.f = x) == 0)
*np = 0;
else
{
#if _IEEE_FLOAT_
*np = ((u.i >> 23) & 0377) - 0176;
u.i = (u.i & 0x807fffff) | 0x3f000000;
#else
*np = ((u.i >> 23) & 0377) - 0200;
u.i = (u.i & 0x807fffff) | 0x40000000;
#endif
}
return u.f;
}
static __inline__ double __inline_ldexp (double x, int n)
{
extern int errno;
union { double d; long long ll; unsigned sexp : 12; } u;
if ((u.d = x) != 0)
{
int exp = n + (u.sexp & 03777);
long long nn = (long long) n << 52;
#if _IEEE_FLOAT_
if (exp <= 0)
u.ll &= 0x8000000000000000LL, errno = 34;
else if (exp > 03776)
u.ll = u.ll & 0x8000000000000000LL | 0x7fefffffffffffffLL, errno = 34;
#else
if (exp <= 0)
u.ll = 0, errno = 34;
else if (exp > 03777)
u.ll |= 0x7fffffffffffffffLL, errno = 34;
#endif
else
u.ll += nn;
}
return u.d;
}
static __inline__ float __inline_ldexpf (float x, int n)
{
extern int errno;
union { float f; int i; unsigned sexp : 9; } u;
if ((u.f = x) != 0)
{
int exp = n + (u.sexp & 0377);
int nn = n << 23;
#if _IEEE_FLOAT_
if (exp <= 0)
u.i &= 0x80000000, errno = 34;
else if (exp > 0376)
u.i = u.i & 0x80000000 | 0x7f7fffff, errno = 34;
#else
if (exp <= 0)
u.i = 0, errno = 34;
else if (exp > 0377)
u.i |= 0x7fffffff, errno = 34;
#endif
else
u.i += nn;
}
return u.f;
}
static __inline__ __const__ double __inline_rint (double x)
{
double z;
union { double d; unsigned long long ll; } u;
u.d = x;
#if _IEEE_FLOAT_
u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL;
#else
u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL;
#endif
__asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x + u.d));
return z;
}
static __inline__ __const__ float __inline_rintf (float x)
{
float z;
union { float f; unsigned int i; } u;
u.f = x;
#if _IEEE_FLOAT_
u.i = (u.i & 0x80000000) | 0x3f000000;
#else
u.i = (u.i & 0x80000000) | 0x40000000;
#endif
__asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x + u.f));
return z;
}
static __inline__ __const__ int __inline_irint (double x)
{
union { double d; unsigned long long ll; } u;
u.d = x;
#if _IEEE_FLOAT_
u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL;
#else
u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL;
#endif
return x + u.d;
}
static __inline__ __const__ int __inline_irintf (float x)
{
union { float f; unsigned int i; } u;
u.f = x;
#if _IEEE_FLOAT_
u.i = (u.i & 0x80000000) | 0x3f000000;
#else
u.i = (u.i & 0x80000000) | 0x40000000;
#endif
return x + u.f;
}
#endif /* _MATH_H */
@//E*O*F include/math.h//
chmod u=rw,g=rw,o=r include/math.h
echo x - include/stddef.h
sed 's/^@//' > "include/stddef.h" <<'@//E*O*F include/stddef.h//'
#ifndef _STDDEF_H
#define _STDDEF_H
#ifndef __WCHAR_T
#define __WCHAR_T
#ifdef __GNUG__
/* In C++, wchar_t is a distinct basic type,
and we can expect __wchar_t to be defined by cc1plus. */
typedef __wchar_t wchar_t;
#else
/* In C, cpp tells us which type to make an alias for. */
typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif /* __WCHAR_T */
#include_next <stddef.h>
#endif /* _STDDEF_H */
@//E*O*F include/stddef.h//
chmod u=rw,g=rw,o=r include/stddef.h
echo x - include/stdlib.h
sed 's/^@//' > "include/stdlib.h" <<'@//E*O*F include/stdlib.h//'
#ifndef _STDLIB_H
#define _STDLIB_H
#if _CONVEX_SOURCE
#define alloca __non_builtin_alloca
#include_next <stdlib.h>
#undef alloca
#else
#include_next <stdlib.h>
#endif /* _CONVEX_SOURCE */
#endif /* _STDLIB_H */
@//E*O*F include/stdlib.h//
chmod u=rw,g=rw,o=r include/stdlib.h
exit 0
/* This header file is to avoid trouble with semi-ANSI header files
on the Convex in system version 8.0. */
#define _PROTO(list) ()
/* Definitions of target machine for GNU compiler. Elxsi version.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@cygnus.com> in 1988. This is the first
64 bit port of GNU CC.
Based upon the VAX port.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Functions used in the md file. */
#ifdef RTX_CODE
extern const char *cmp_set PARAMS ((const char *, const char *, rtx));
extern const char *cmp_jmp PARAMS ((const char *, int, rtx));
extern void print_operand_address PARAMS ((FILE *, rtx));
#endif /* RTX_CODE */
/* Subroutines for insn-output.c for GNU compiler. Elxsi version.
Copyright (C) 1987, 1992, 1998, 1999, 2000 Free Software Foundation, Inc
Contributrd by Mike Stump <mrs@cygnus.com> in 1988 and is the first
64 bit port of GNU CC.
Based upon the VAX port.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
#include "function.h"
#include "output.h"
#include "tree.h"
#include "expr.h"
#include "regs.h"
#include "flags.h"
#include "hard-reg-set.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
extern const char *reg_names[];
rtx cmp_op0=0, cmp_op1=0;
/* table of relations for compares and branches */
static const char *const cmp_tab[] = {
"gt", "gt", "eq", "eq", "ge", "ge", "lt", "lt", "ne", "ne",
"le", "le" };
static bool elxsi_assemble_integer PARAMS ((rtx, unsigned int, int));
static void elxsi_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
/* Initialize the GCC target structure. */
#undef TARGET_ASM_BYTE_OP
#define TARGET_ASM_BYTE_OP NULL
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP NULL
#undef TARGET_ASM_ALIGNED_SI_OP
#define TARGET_ASM_ALIGNED_SI_OP NULL
#undef TARGET_ASM_INTEGER
#define TARGET_ASM_INTEGER elxsi_assemble_integer
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE elxsi_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE elxsi_output_function_epilogue
struct gcc_target targetm = TARGET_INITIALIZER;
/* Target hook for assembling integer objects. The ELXSI assembler
syntax uses a suffix to indicate the size of data, so we can't use
the usual string hooks. */
static bool
elxsi_assemble_integer (x, size, aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{
if (aligned_p)
switch (size)
{
case 1:
case 2:
case 4:
fputs ("\t.data\t", asm_out_file);
output_addr_const (asm_out_file, x);
fprintf (asm_out_file, "{%d}\n", size * BITS_PER_UNIT);
return true;
}
return default_assemble_integer (x, size, aligned_p);
}
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of
temporary storage to allocate.
Refer to the array `regs_ever_live' to determine which registers to
save; `regs_ever_live[I]' is nonzero if register number I is ever
used in the function. This function is responsible for knowing
which registers should not be saved even if used. */
static void
elxsi_output_function_prologue (file, size)
FILE *file;
HOST_WIDE_INT size;
{
register int regno;
register int cnt = 0;
/* the below two lines are a HACK, and should be deleted, but
for now are very much needed (1.35) */
if (frame_pointer_needed)
regs_ever_live[14] = 1, call_used_regs[14] = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (regs_ever_live[regno] && !call_used_regs[regno])
cnt += 8;
if (size + cnt)
fprintf (file, "\tadd.64\t.sp,=%d\n", -size - cnt);
cnt = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (regs_ever_live[regno] && !call_used_regs[regno])
fprintf (file, "\tst.64\t.r%d,[.sp]%d\n", regno, (cnt += 8) - 12);
if (frame_pointer_needed)
fprintf (file, "\tadd.64\t.r14,.sp,=%d\n", size + cnt);
}
/* This function generates the assembly code for function exit.
Args are as for output_function_prologue ().
The function epilogue should not depend on the current stack
pointer! It should use the frame pointer only. This is mandatory
because of alloca; we also take advantage of it to omit stack
adjustments before returning. */
static void
elxsi_output_function_epilogue (file, size)
FILE *file;
HOST_WIDE_INT size;
{
register int regno;
register int cnt = 0;
/* this conditional is ONLY here because there is a BUG;
EXIT_IGNORE_STACK is ignored itself when the first part of
the condition is true! (at least in version 1.35) */
/* the 8*10 is for 64 bits of .r5 - .r14 */
if (current_function_calls_alloca || size >= (256 - 8 * 10))
{
/* use .r4 as a temporary! Ok for now.... */
fprintf (file, "\tld.64\t.r4,.r14\n");
for (regno = FIRST_PSEUDO_REGISTER-1; regno >= 0; --regno)
if (regs_ever_live[regno] && !call_used_regs[regno])
cnt += 8;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
if (regs_ever_live[regno] && !call_used_regs[regno])
fprintf (file, "\tld.64\t.r%d,[.r14]%d\n", regno,
-((cnt -= 8) + 8) - 4 - size);
fprintf (file, "\tld.64\t.sp,.r4\n\texit\t0\n");
}
else
{
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
if (regs_ever_live[regno] && !call_used_regs[regno])
fprintf (file, "\tld.64\t.r%d,[.sp]%d\n", regno, (cnt += 8) - 12);
fprintf (file, "\texit\t%d\n", size + cnt);
}
}
/* type is the index into the above table */
/* s is "" for signed, or "u" for unsigned */
const char *
cmp_jmp (s, type, where)
const char *s;
int type;
rtx where;
{
rtx br_ops[3];
char template[50];
const char *f = "";
const char *bits = "64";
if (GET_MODE (cmp_op0) == SFmode) f = "f", bits = "32";
if (GET_MODE (cmp_op0) == DFmode) f = "f";
br_ops[0] = where;
br_ops[1] = cmp_op0;
br_ops[2] = cmp_op1;
if (cmp_op1)
sprintf(template, "%scmp%s.br.%s\t%%1,%%2:j%s\t%%l0",
f, s, bits, cmp_tab[type]);
else if (*f)
sprintf(template, "fcmp.br.%s\t%%1,=0:j%s\t%%l0",
bits, cmp_tab[type]);
else if (*s) /* can turn the below in to a jmp ... */
sprintf(template, "cmpu.br.64\t%%1,=0:j%s\t%%l0", s);
else
sprintf(template, "jmp.%s\t%%1,%%l0", cmp_tab[type+1]);
output_asm_insn(template, br_ops);
return "";
}
const char *
cmp_set (s, type, reg)
const char *s, *type;
rtx reg;
{
rtx br_ops[3];
char template[50];
const char *f = "";
const char *bits = "64";
if (GET_MODE (cmp_op0) == SFmode) f = "f", bits = "32";
else if (GET_MODE (cmp_op0) == DFmode) f = "f";
else if (GET_MODE (cmp_op0) == SImode) bits = "32";
else if (GET_MODE (cmp_op0) == HImode) bits = "16";
else if (GET_MODE (cmp_op0) == QImode) bits = "8";
br_ops[0] = reg;
br_ops[1] = cmp_op0;
br_ops[2] = cmp_op1;
if (cmp_op1)
sprintf(template, "%scmp%s.%s\t%%0,%%1,%%2:%s",
f, s, bits, type);
else
sprintf(template, "%scmp%s.%s\t%%0,%%1,=0:%s",
f, s, bits, type);
output_asm_insn(template, br_ops);
return "";
}
void
print_operand_address (file, addr)
FILE *file;
register rtx addr;
{
register rtx reg1, reg2, breg, ireg;
rtx offset;
switch (GET_CODE (addr))
{
case MEM:
if (GET_CODE (XEXP (addr, 0)) == REG)
fprintf (file, "%s", reg_names[REGNO (addr)]);
else abort();
break;
case REG:
fprintf (file, "[%s]", reg_names[REGNO (addr)]);
break;
case PLUS:
reg1 = 0; reg2 = 0;
ireg = 0; breg = 0;
offset = 0;
if (GET_CODE (XEXP (addr, 0)) == REG)
{
offset = XEXP (addr, 1);
addr = XEXP (addr, 0);
}
else if (GET_CODE (XEXP (addr, 1)) == REG)
{
offset = XEXP (addr, 0);
addr = XEXP (addr, 1);
}
fprintf (file, "[%s]", reg_names[REGNO (addr)]);
output_address (offset);
break;
default:
output_addr_const (file, addr);
}
}
/* Configuration for an i386 running 386BSD as the target machine. */
#define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -D____386BSD____ -D__386BSD__ -DBSD_NET2 -Asystem=unix -Asystem=bsd"
/* Like the default, except no -lg. */
#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "short unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
/* Redefine this to use %eax instead of %edx. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n", \
LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
} \
else \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall mcount\n"); \
} \
}
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Definitions for IBM PS2 running AIX/386 with gas.
From: Minh Tran-Le <TRANLE@intellicorp.com>
Copyright (C) 1988, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* This configuration file is for gcc with gas-2.x and gnu ld 2.x
* with aix ps/2 1.3.x.
*/
/* Define USE_GAS if you have the new version of gas that can handle
* multiple segments and .section pseudo op. This will allow gcc to
* use the .init section for g++ ctor/dtor.
*
* If you don't have gas then undefined USE_GAS. You will also have
* to use collect if you want to use g++
*/
#define USE_GAS
#include "i386/aix386ng.h"
/* Use crt1.o as a startup file and crtn.o as a closing file.
And add crtbegin.o and crtend.o for ctors and dtors */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"crtend.o%s crtn.o%s"
/* Removed the -K flags because the gnu ld does not handle it */
#undef LINK_SPEC
#define LINK_SPEC "%{T*} %{z:-lm}"
/* Define a few machine-specific details of the implementation of
constructors. */
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP "\t.section .init,\"x\""
#define CTOR_LIST_BEGIN \
asm (INIT_SECTION_ASM_OP); \
asm ("pushl $0")
#define CTOR_LIST_END CTOR_LIST_BEGIN
#undef TARGET_ASM_CONSTRUCTOR
#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor
/* Definitions for IBM PS2 running AIX/386.
Copyright (C) 1988, 1996, 1998, 2002 Free Software Foundation, Inc.
Contributed by Minh Tran-Le <TRANLE@intellicorp.com>.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (80386, AIX)");
/* Use crt1.o as a startup file and crtn.o as a closing file. */
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
#define ENDFILE_SPEC "crtn.o%s"
#define LIB_SPEC "%{shlib:-lc_s} -lc"
/* Special flags for the linker. I don't know what they do. */
#define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}"
/* Specify predefined symbols in preprocessor. */
#define CPP_PREDEFINES "-Dps2 -Dunix -Asystem=aix"
#define CPP_SPEC "%(cpp_cpu) \
%{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
/* special flags for the aix assembler to generate the short form for all
qualifying forward reference */
/* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it. */
#if 0
#define ASM_SPEC "-s2"
#endif /* 0 */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { output_file_directive (FILE, main_input_filename); \
if (optimize) \
ASM_FILE_START_1 (FILE); \
else \
fprintf (FILE, "\t.noopt\n"); \
} while (0)
/* This was suggested, but it shouldn't be right for DBX output. -- RMS
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
/* Writing `int' for a bitfield forces int alignment for the structure. */
#define PCC_BITFIELD_TYPE_MATTERS 1
#ifndef USE_GAS
/* Don't write a `.optim' pseudo; this assembler
is said to have a bug when .optim is used. */
#undef ASM_FILE_START_1
#define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n")
#endif
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO));
/* Note that using bss_section here caused errors
in building shared libraries on system V.3.
but AIX 1.2 does not have yet shareable libraries on PS2 */
#undef ASM_OUTPUT_LOCAL
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
(bss_section (), \
ASM_OUTPUT_LABEL ((FILE), (NAME)), \
fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)))
/* Undef all the .init and .fini section stuff if we are not using gas and
* gnu ld so that we can use collect because the standard /bin/as and /bin/ld
* cannot handle those.
*/
#ifndef USE_GAS
# undef READONLY_DATA_SECTION_ASM_OP
# undef INIT_SECTION_ASM_OP
# undef FINI_SECTION_ASM_OP
# undef CTORS_SECTION_ASM_OP
# undef DTORS_SECTION_ASM_OP
# undef TARGET_ASM_CONSTRUCTOR
# undef TARGET_ASM_DESTRUCTOR
# undef DO_GLOBAL_CTORS_BODY
# undef CTOR_LIST_BEGIN
# define CTOR_LIST_BEGIN
# undef CTOR_LIST_END
# define CTOR_LIST_END
# undef DTOR_LIST_BEGIN
# define DTOR_LIST_BEGIN
# undef DTOR_LIST_END
# define DTOR_LIST_END
/* for collect2 */
# define OBJECT_FORMAT_COFF
# define MY_ISCOFF(magic) \
((magic) == I386MAGIC || (magic) == I386SVMAGIC)
#endif /* !USE_GAS */
/* Configuration for an i386 running BSDI's BSD/OS (formerly known as BSD/386)
as the target machine. */
/* We exist mostly to add -Dbsdi and such to the predefines. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Dbsdi -D____386BSD____ -D__386BSD__\
-DBSD_NET2 -Asystem=unix -Asystem=bsd"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* This is suitable for BSD/OS 3.0; we don't know about earlier releases. */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0
/* BSD/OS still uses old binutils that don't insert nops by default
when the .align directive demands to insert extra space in the text
segment. */
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
/* Target definitions for GNU compiler for Intel 80x86 running DG/ux
Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
Currently maintained by gcc@dg-rtp.dg.com.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* for now, we are just like the sysv4 version with a
few hacks
*/
#ifndef VERSION_INFO2
#define VERSION_INFO2 "$Revision: 1.18 $"
#endif
#ifndef VERSION_STRING
#define VERSION_STRING version_string
#endif
/* Identify the compiler. */
/* TARGET_VERSION used by toplev.c VERSION_STRING used by -midentify-revision */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (%s%s, %s)", \
VERSION_INFO1, VERSION_INFO2, __DATE__)
#undef VERSION_INFO1
#define VERSION_INFO1 "ix86 DG/ux, "
/* Augment TARGET_SWITCHES with the MXDB options. */
#define MASK_STANDARD 0x40000000 /* Retain standard information */
#define MASK_NOLEGEND 0x20000000 /* Discard legend information */
#define MASK_EXTERNAL_LEGEND 0x10000000 /* Make external legends */
#define MASK_IDENTIFY_REVISION 0x08000000 /* Emit 'ident' to .s */
#define MASK_WARN_PASS_STRUCT 0x04000000 /* Warn when structures are passed */
#define TARGET_STANDARD (target_flags & MASK_STANDARD)
#define TARGET_NOLEGEND (target_flags & MASK_NOLEGEND)
#define TARGET_EXTERNAL_LEGEND (target_flags & MASK_EXTERNAL_LEGEND)
#define TARGET_IDENTIFY_REVISION (target_flags & MASK_IDENTIFY_REVISION)
#define TARGET_WARN_PASS_STRUCT (target_flags & MASK_WARN_PASS_STRUCT)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "standard", MASK_STANDARD, \
N_("Retain standard MXDB information") }, \
{ "legend", -MASK_NOLEGEND, \
N_("Retain legend information") }, \
{ "no-legend", MASK_NOLEGEND, "" }, \
{ "external-legend", MASK_EXTERNAL_LEGEND, \
N_("Generate external legend information") }, \
{ "identify-revision", MASK_IDENTIFY_REVISION, \
N_("Emit identifying info in .s file") }, \
{ "warn-passed-structs", MASK_WARN_PASS_STRUCT, \
N_("Warn when a function arg is a structure") },
#undef DWARF_DEBUGGING_INFO
#define DWARF_DEBUGGING_INFO
/*
allow -gstabs so that those who have gnu-as installed
can debug c++ programs.
*/
#undef DBX_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
/* Override svr[34].h. Switch to the data section so that the coffsem
symbol isn't in the text section. */
#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"); \
data_section (); \
} while (0)
/* ix86 abi specified type for wchar_t */
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/* Some machines may desire to change what optimizations are performed for
various optimization levels. This macro, if defined, is executed once
just after the optimization level is determined and before the remainder
of the command options have been parsed. Values set in this macro are
used as the default values for the other command line options.
LEVEL is the optimization level specified; 2 if -O2 is specified,
1 if -O is specified, and 0 if neither is specified. */
/* This macro used to store 0 in flag_signed_bitfields.
Not only is that misuse of this macro; the whole idea is wrong.
The GNU C dialect makes bitfields signed by default,
regardless of machine type. Making any machine inconsistent in this
regard is bad for portability.
I chose to make bitfields signed by default because this is consistent
with the way ordinary variables are handled: `int' equals `signed int'.
If there is a good reason to prefer making bitfields unsigned by default,
it cannot have anything to do with the choice of machine.
If the reason is good enough, we should change the convention for all machines.
-- rms, 20 July 1991. */
/*
this really should go into dgux-local.h
*/
#undef OPTIMIZATION_OPTIONS
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
do { \
extern int flag_signed_bitfields; \
flag_signed_bitfields = 0; \
optimization_options (LEVEL,SIZE); \
} while (0)
/* The normal location of the `ld' and `as' programs */
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/bin/"
/* The normal location of the various *crt*.o files is the */
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/usr/lib/"
/* Macros to be automatically defined.
__CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
files with DG/UX revision 5.40 and later. This allows GNU CC to
operate without installing the header files. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__ix86 -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\
-Asystem=unix -Asystem=svr4"
/*
If not -ansi, or restricting include files to one
specific source target, specify full DG/UX features.
*/
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{!ansi:-D__OPEN_NAMESPACE__}"
/* Assembler support (legends for mxdb). */
#undef ASM_SPEC
#define ASM_SPEC "\
%{mno-legend:%{mstandard:-Wc,off}}\
%{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\",-lansi-c\
%{mstandard:,-keep-std}\
%{mexternal-legend:,-external}}}"
/* Override svr4.h. */
/* hassey 3/12/94 keep svr4 ASM_FINAL_SPEC allows -pipe to work */
/* Linker and library spec's.
-static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options.
-svr4 instructs gcc to place /usr/lib/values-X[cat].o on link the line.
The absence of -msvr4 indicates linking done in a COFF environment and
adds the link script to the link line. In all environments, the first
and last objects are crtbegin.o and crtend.o.
When the -G link option is used (-shared and -symbolic) a final link is
not being done. */
#undef LIB_SPEC
#define LIB_SPEC \
"%{!shared:%{!symbolic:-lc}}"
#undef LINK_SPEC
#define LINK_SPEC "%{z*} %{h*} %{v:-V} \
%{static:-dn -Bstatic} \
%{shared:-G -dy} \
%{symbolic:-Bsymbolic -G -dy} \
%{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}"
#ifdef CROSS_COMPILE
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \
%{!pg:%{p:mcrt1.o%s} \
%{!p:crt1.o%s}}}} \
%{pg:gcrti.o%s}%{!pg:crti.o%s} \
crtbegin.o%s \
%{ansi:values-Xc.o%s} \
%{!ansi:values-Xa.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}"
#else
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \
%{!pg:%{p:/lib/mcrt1.o%s} \
%{!p:/lib/crt1.o%s}}}} \
%{pg:gcrti.o%s}%{!pg:/lib/crti.o%s} \
crtbegin.o%s \
%{ansi:/lib/values-Xc.o%s} \
%{!ansi:/lib/values-Xa.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:/lib/crtn.o}"
#endif /* CROSS_COMPILE */
/* The maximum alignment which the object file format can support.
page alignment would seem to be enough */
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT 0x1000
/* This supplements FUNCTION_ARG's definition in i386.h to check
TARGET_WARN_PASS_STRUCT */
#undef FUNCTION_ARG
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
((((MODE) == BLKmode && TARGET_WARN_PASS_STRUCT) ? \
warning ("argument is a structure"),0 : 0), \
(function_arg (&CUM, MODE, TYPE, NAMED)))
/* Add .align 1 to avoid .backalign bug in assembler */
#undef READONLY_DATA_SECTION_ASM_OP
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata\n\t.align 1"
/* Configuration for an i386 running RTEMS on top of MS-DOS with
DJGPP v2.x.
Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#ifdef CPP_PREDEFINES
#undef CPP_PREDEFINES
#endif
#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS -D__rtems__ \
-Asystem=unix -Asystem=msdos -Asystem=rtems"
/* Generate calls to memcpy, memcmp and memset. */
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
/* Assembler-independent definitions for an Intel 386 running
Interactive Unix System V. Specifically, this is for recent versions
that support POSIX;
for version 2.0.2, use configuration option i386-sysv instead.
(But set TARGET_DEFAULT to (MASK_80307 | MASK_FLOAT_RETURNS)
if you do that, if you don't have a real 80387.) */
/* Mostly it's like AT&T Unix System V. */
/* Use crt1.o, not crt0.o, as a startup file, and crtn.o as a closing file. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
%{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
%{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\
%{p:-L/lib/libp} %{pg:-L/lib/libp}}}}\
%{shlib:%{Xp:crtp1.o%s}%{posix:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}\
crtbegin.o%s"
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
/* Library spec */
#undef LIB_SPEC
#define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
/* ISC 2.2 uses `char' for `wchar_t'. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "char"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_UNIT
#if 0
/* This is apparently not true: ISC versions up to 3.0, at least, use
the standard calling sequence in which the called function pops the
extra arg. */
/* caller has to pop the extra argument passed to functions that return
structures. */
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
== void_type_node))) ? (SIZE) \
: 0)
/* On other 386 systems, the last line looks like this:
: (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */
#endif
/* Handle #pragma pack and #pragma weak. */
#define HANDLE_SYSV_PRAGMA
/* By default, target has a 80387, uses IEEE compatible arithmetic,
and returns float values in the 387, ie,
(TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387)
ISC's software emulation of a 387 fails to handle the `fucomp'
opcode. fucomp is only used when generating IEEE compliant code.
So don't make TARGET_IEEE_FP default for ISC. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
/* The ISC 2.0.2 software FPU emulator apparently can't handle
80-bit XFmode insns, so don't generate them. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
/* The ISC assembler does not like a .file directive with a name
longer than 14 characters. Truncating it will not permit
debugging to work properly, but at least we won't get an error
message. */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
const int len = strlen (main_input_filename); \
const char *na = main_input_filename + len; \
char shorter[15]; \
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
while (na > main_input_filename) \
{ \
if (na[-1] == '/') \
break; \
na--; \
} \
strncpy (shorter, na, 14); \
shorter[14] = 0; \
fprintf (FILE, "\t.file\t"); \
output_quoted_string (FILE, shorter); \
fprintf (FILE, "\n"); \
} while (0)
/* Work around assembler forward label references generated in exception
handling code. */
#define DWARF2_UNWIND_INFO 0
/* Definitions for Intel 386 running Interactive Unix System V,
using dbx-in-coff encapsulation.
Specifically, this is for recent versions that support POSIX.
Copyright (C) 1992, 1995, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Mostly it's like AT&T Unix System V with dbx-in-coff. */
/* But with a few changes. */
#undef ENDFILE_SPEC
#include "i386/isc.h"
/* Overridden defines for ifile usage. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\
%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
%{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
%{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp}}\
%{shlib:%{posix:crtp1.o%s}%{Xp:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtn.o%s"
/* Definitions for Intel 386 running Linux-based GNU systems with pre-BFD
a.out linkers.
Copyright (C) 1995, 1997, 1998, 2002 Free Software Foundation, Inc.
Contributed by Michael Meissner (meissner@cygnus.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -D__gnu_linux__ -Dlinux -Asystem=posix"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/* Don't default to pcc-struct-return, because gcc is the only compiler,
and we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
#undef LIB_SPEC
#if 1
/* We no longer link with libc_p.a or libg.a by default. If you
want to profile or debug the GNU/Linux C library, please add
lc_p or -ggdb to LDFLAGS at the link time, respectively. */
#define LIB_SPEC \
"%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}"
#else
#define LIB_SPEC \
"%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}"
#endif
#undef LINK_SPEC
#define LINK_SPEC ""
/* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP
Copyright (C) 1993, 1995, 1996, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* By default, target has a 80387, with IEEE FP. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP)
/* Implicit library calls should use memcpy, not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
/* Machines that use the AT&T assembler syntax
also return floating point values in an FP register.
Define how to find the value returned by a function.
VALTYPE is the data type of the value (as a tree).
If the precise function being called is known, FUNC is its FUNCTION_DECL;
otherwise, FUNC is 0. */
#undef VALUE_REGNO
#define VALUE_REGNO(MODE) \
((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \
? FIRST_FLOAT_REG : 0)
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
variable of type `char *' which points to the opcode name in its
"internal" form--the form that is written in the machine description.
GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic.
So use `repe' instead. */
#undef ASM_OUTPUT_OPCODE
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
{ \
if ((PTR)[0] == 'r' \
&& (PTR)[1] == 'e' \
&& (PTR)[2] == 'p') \
{ \
if ((PTR)[3] == 'z') \
{ \
fprintf (STREAM, "repe"); \
(PTR) += 4; \
} \
else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \
{ \
fprintf (STREAM, "repne"); \
(PTR) += 5; \
} \
} \
}
/* Define macro used to output shift-double opcodes when the shift
count is in %cl. Some assemblers require %cl as an argument;
some don't.
GAS requires the %cl argument, so override unx386.h. */
#undef SHIFT_DOUBLE_OMITS_COUNT
#define SHIFT_DOUBLE_OMITS_COUNT 0
/* Print opcodes the way that GAS expects them. */
#define GAS_MNEMONICS 1
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DNeXT -Dunix -D__MACH__ -D__LITTLE_ENDIAN__ \
-D__ARCHITECTURE__=\"i386\" -Asystem=unix -Asystem=mach"
/* This accounts for the return pc and saved fp on the i386. */
#define OBJC_FORWARDING_STACK_OFFSET 8
#define OBJC_FORWARDING_MIN_OFFSET 8
/* We do not want a dot in internal labels. */
#undef LPREFIX
#define LPREFIX "L"
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER))
#undef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, "%s%d:\n", PREFIX, NUM)
/* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
/* Output to assembler file text saying following lines
no longer contain unusual constructs. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
#undef ASM_OUTPUT_REG_PUSH
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
fprintf (FILE, "\tpushl %se%s\n", "%", reg_names[REGNO])
#undef ASM_OUTPUT_REG_POP
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
fprintf (FILE, "\tpopl %se%s\n", "%", reg_names[REGNO])
/* This is being overridden because the default i386 configuration
generates calls to "_mcount". NeXT system libraries all use
"mcount". */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
} \
else \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall mcount\n"); \
} \
}
/* BEGIN Calling Convention CHANGES */
/* These changes violate the Intel/Unix ABI. Specifically, they
change the way that space for a block return value is passed to a
function. The ABI says that the pointer is passed on the stack.
We change to pass the pointer in %ebx. This makes the NeXT
Objective-C forwarding mechanism possible to implement on an i386. */
/* Do NOT pass address of structure values on the stack. */
#undef STRUCT_VALUE_INCOMING
#undef STRUCT_VALUE
/* Pass them in %ebx. */
#undef STRUCT_VALUE_REGNUM
#define STRUCT_VALUE_REGNUM 3
/* Because we are passing the pointer in a register, we don't need to
rely on the callee to pop it. */
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE \
? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
== void_type_node))) ? (SIZE) : 0)
/* END Calling Convention CHANGES */
/* NeXT still uses old binutils that don't insert nops by default
when the .align directive demands to insert extra space in the text
segment. */
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
! crti.s for OSF/1, x86; derived from sol2-ci.asm.
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
! Written By Fred Fish, Nov 1992
!
! This file is free software; you can redistribute it and/or modify it
! under the terms of the GNU General Public License as published by the
! Free Software Foundation; either version 2, or (at your option) any
! later version.
!
! In addition to the permissions in the GNU General Public License, the
! Free Software Foundation gives you unlimited permission to link the
! compiled version of this file with other programs, and to distribute
! those programs without any restriction coming from the use of this
! file. (The General Public License restrictions do apply in other
! respects; for example, they cover modification of the file, and
! distribution when not linked into another program.)
!
! This file is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; see the file COPYING. If not, write to
! the Free Software Foundation, 59 Temple Place - Suite 330,
! Boston, MA 02111-1307, USA.
!
! As a special exception, if you link this library with files
! compiled with GCC to produce an executable, this does not cause
! the resulting executable to be covered by the GNU General Public License.
! This exception does not however invalidate any other reasons why
! the executable file might be covered by the GNU General Public License.
!
! This file just supplies labeled starting points for the .init and .fini
! sections. It is linked in before the values-Xx.o files and also before
! crtbegin.o.
.file "crti.s"
.ident "GNU C crti.s"
.section .init
.globl _init
.type _init,@function
_init:
.section .fini
.globl _fini
.type _fini,@function
_fini:
.globl _init_init_routine
.data
.align 4
.type _init_init_routine,@object
.size _init_init_routine,4
_init_init_routine:
.long _init
.globl _init_fini_routine
.align 4
.type _init_fini_routine,@object
.size _init_fini_routine,4
_init_fini_routine:
.long _fini
! crtn.s for OSF/1, x86; derived from sol2-cn.asm.
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
! Written By Fred Fish, Nov 1992
!
! This file is free software; you can redistribute it and/or modify it
! under the terms of the GNU General Public License as published by the
! Free Software Foundation; either version 2, or (at your option) any
! later version.
!
! In addition to the permissions in the GNU General Public License, the
! Free Software Foundation gives you unlimited permission to link the
! compiled version of this file with other programs, and to distribute
! those programs without any restriction coming from the use of this
! file. (The General Public License restrictions do apply in other
! respects; for example, they cover modification of the file, and
! distribution when not linked into another program.)
!
! This file is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; see the file COPYING. If not, write to
! the Free Software Foundation, 59 Temple Place - Suite 330,
! Boston, MA 02111-1307, USA.
!
! As a special exception, if you link this library with files
! compiled with GCC to produce an executable, this does not cause
! the resulting executable to be covered by the GNU General Public License.
! This exception does not however invalidate any other reasons why
! the executable file might be covered by the GNU General Public License.
!
! This file just supplies returns for the .init and .fini sections. It is
! linked in after all other files.
.file "crtn.o"
.ident "GNU C crtn.o"
.section .init
ret $0x0
.section .fini
ret $0x0
/* OSF/1 1.3 now is compitable with SVR4, so include sysv4.h, and
put difference here.
Copyright (C) 2000 Free Software Foundation, Inc. */
#include <stdio.h>
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 OSF/1)");
#define TARGET_OSF1ELF
/* WORD_SWITCH_TAKES_ARG defined in svr4 is not correct. We also
need an extra -soname */
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|| !strcmp (STR, "Tbss") || !strcmp (STR, "soname"))
/* Note, -fpic and -fPIC are equivalent */
#undef CPP_SPEC
#define CPP_SPEC "\
%(cpp_cpu) \
%{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \
%{.S: %{!ansi:%{!traditional-cpp: -traditional}}} \
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
/* -mmcount or -mno-mcount should be used with -pg or -p */
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) %{p: %{!mmcount: %{!mno-mcount: -mno-mcount }}} \
%{!p: %{pg: %{!mmcount: %{!mno-mcount: -mno-mcount }}}}"
/* Note, -D__NO_UNDERSCORES__ -D__ELF__ are provided in the older version of
OSF/1 gcc. We keep them here, so that old /usr/include/i386/asm.h works.
*/
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D__NO_UNDERSCORES__ -D__ELF__ -DOSF -DOSF1 -Dunix \
-Asystem=unix -Asystem=xpg4 -Asystem=osf1"
/* current OSF/1 doesn't provide separate crti.o and gcrti.o (and also, crtn.o
and gcrtn.o) for profile. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crti.o%s \
crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef ASM_SPEC
#define ASM_SPEC "%{v*: -v}"
#undef LINK_SPEC
#define LINK_SPEC "%{v*: -v} \
%{h*} %{z*} \
%{dy:-call_shared} %{dn:-static} \
%{static:-static} \
%{shared:-shared} \
%{call_shared:-call_shared} \
%{symbolic:-Bsymbolic -shared -call_shared} \
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
%{noshrlib: -static } \
%{!noshrlib: -call_shared}}}}}}"
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
/* Define this macro meaning that gcc should find the library 'libgcc.a'
by hand, rather than passing the argument '-lgcc' to tell the linker
to do the search */
#define LINK_LIBGCC_SPECIAL
/* This goes with LINK_LIBGCC_SPECIAL, we need tell libgcc.a differently */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}"
/* Specify size_t, ptrdiff_t, and wchar_t types. */
#undef SIZE_TYPE
#undef PTRDIFF_TYPE
#undef WCHAR_TYPE
#undef WCHAR_TYPE_SIZE
#define SIZE_TYPE "long unsigned int"
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "unsigned int"
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/* Turn off long double being 96 bits. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
/* Work with OSF/1 profile */
#define MASK_NO_MCOUNT 000200000000 /* profiling uses mcount_ptr */
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "mcount", -MASK_NO_MCOUNT, \
N_("Profiling uses mcount") }, \
{ "no-mcount", MASK_NO_MCOUNT, "" },
/* This macro generates the assembly code for function entry.
FILE is a stdio stream to output the code to.
SIZE is an int: how many units of temporary storage to allocate.
Refer to the array `regs_ever_live' to determine which registers
to save; `regs_ever_live[I]' is nonzero if register number I
is ever used in the function. This macro is responsible for
knowing which registers should not be saved even if used.
We override it here to allow for the new profiling code to go before
the prologue and the old mcount code to go after the prologue (and
after %ebx has been set up for ELF shared library support). */
#if 0
#define OSF_PROFILE_BEFORE_PROLOGUE \
(!TARGET_MCOUNT \
&& !current_function_needs_context \
&& (!flag_pic \
|| !frame_pointer_needed \
|| (!current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool)))
#else
#define OSF_PROFILE_BEFORE_PROLOGUE 0
#endif
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. Before calling, the assembler code
must load the address of a counter variable into a register where `mcount'
expects to find the address. The name of this variable is `LP' followed by
the number LABELNO, so you would generate the name using `LP%d' in a
`fprintf'.
The details of how the address should be passed to `mcount' are determined
by your operating system environment, not by GNU CC. To figure them out,
compile a small program for profiling using the system's installed C
compiler and look at the assembler code that results. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do \
{ \
if (!OSF_PROFILE_BEFORE_PROLOGUE) \
{ \
const char *const prefix = ""; \
const char *const lprefix = LPREFIX; \
int labelno = LABELNO; \
\
/* Note that OSF/rose blew it in terms of calling mcount, \
since OSF/rose prepends a leading underscore, but mcount's \
doesn't. At present, we keep this kludge for ELF as well \
to allow old kernels to build profiling. */ \
\
if (flag_pic \
&& !current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool) \
abort (); \
\
if (TARGET_MCOUNT && flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \
} \
\
else if (TARGET_MCOUNT) \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall %smcount\n", prefix); \
} \
\
else if (flag_pic && frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \
fprintf (FILE, "\tcall *(%%eax)\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else if (frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall *_mcount_ptr\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else \
abort (); \
} \
} \
while (0)
/* Target definitions for GNU compiler for Intel 80386 running OSF/1 1.3+
with gas and gdb. */
/* Use stabs instead of DWARF debug format. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Definitions of target machine for GNU compiler.
Intel 386 (OSF/1 with ELF) version.
Copyright (C) 1993, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) \
%{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
%{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
%{mno-underscores: -D__NO_UNDERSCORES__} \
%{!mrose: %{!munderscores: -D__NO_UNDERSCORES__}} \
%{.S: %{!ansi:%{!traditional-cpp: -traditional}}} \
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
/* Turn on -pic-extern by default for OSF/rose, -fpic for ELF. */
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) \
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
%{!melf: %{!mrose: -melf }} \
%{!mrose: %{!munderscores: %{!mno-underscores: -mno-underscores }} \
%{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \
%{mrose: %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount }}} \
%{pic-extern: -mhalf-pic } %{pic-lib: -mhalf-pic } \
%{!pic-extern: %{!pic-lib: %{pic-none: -mno-half-pic} %{!pic-none: -mhalf-pic}}} \
%{pic-calls: } %{pic-names*: }}"
#undef ASM_SPEC
#define ASM_SPEC "%{v*: -v}"
#undef LINK_SPEC
#define LINK_SPEC "%{v*: -v} \
%{mrose: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
%{nostdlib} %{noshrlib} %{glue}} \
%{!mrose: %{dy} %{dn} %{glue: } \
%{h*} %{z*} \
%{static:-dn -Bstatic} \
%{shared:-G -dy} \
%{symbolic:-Bsymbolic -G -dy} \
%{G:-G} \
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
%{noshrlib: -dn } %{pic-none: -dn } \
%{!noshrlib: %{!pic-none: -dy}}}}}}}}"
#undef TARGET_VERSION_INTERNAL
#undef I386_VERSION
#define I386_VERSION " 80386, ELF objects"
#define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
#define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
#undef OBJECT_FORMAT_ROSE
/* Definitions for rtems targeting an Intel i386 using coff.
Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (80386, RTEMS)");
/* Definitions for Sequent Intel 386 using GAS.
Copyright (C) 1992, 2002 Free Software Foundation, Inc.
/* Mostly it's like a Sequent 386 without GAS. */
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
variable of type `char *' which points to the opcode name in its
"internal" form--the form that is written in the machine description.
GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic.
So use `repe' instead. */
#undef ASM_OUTPUT_OPCODE
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
{ \
if ((PTR)[0] == 'r' \
&& (PTR)[1] == 'e' \
&& (PTR)[2] == 'p') \
{ \
if ((PTR)[3] == 'z') \
{ \
fprintf (STREAM, "repe"); \
(PTR) += 4; \
} \
else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \
{ \
fprintf (STREAM, "repne"); \
(PTR) += 5; \
} \
} \
}
/* Define macro used to output shift-double opcodes when the shift
count is in %cl. Some assemblers require %cl as an argument;
some don't.
GAS requires the %cl argument, so override i386/unix.h. */
#undef SHIFT_DOUBLE_OMITS_COUNT
#define SHIFT_DOUBLE_OMITS_COUNT 0
/* Print opcodes the way that GAS expects them. */
#define GAS_MNEMONICS 1
/* Sequent DYNIX/ptx 1.x (SVr3) */
#define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)");
/* Sequent Symmetry SVr3 doesn't have crtn.o; crt1.o doesn't work
but crt0.o does. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{pg:gcrt0.o%s}\
%{!pg:%{posix:%{p:mcrtp0.o%s}%{!p:crtp0.o%s}}\
%{!posix:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} crtbegin.o%s\
%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}"
#undef LIB_SPEC
#define LIB_SPEC \
"%{posix:-lcposix}\
%{shlib:-lc_s}\
%{fshared-data:-lpps -lseq} -lc crtend.o%s"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} -D_SEQUENT_=1"
/* Although the .init section is used, it is not automatically invoked.
This because the _start() function in /lib/crt0.o never calls anything
from the .init section */
#define INVOKE__main
/* Assembler pseudo-op for initialized shared variables (.shdata). */
#undef SHARED_SECTION_ASM_OP
#define SHARED_SECTION_ASM_OP "\t.section .shdata, \"ws\""
/* Assembler pseudo-op for uninitialized shared global variables (.shbss). */
#undef ASM_OUTPUT_SHARED_COMMON
#define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \
( fputs(".comm ", (FILE)), \
assemble_name((FILE), (NAME)), \
fprintf((FILE), ",%u,-3\n", (SIZE)))
/* Assembler pseudo-op for uninitialized shared local variables (.shbss). */
#undef SHARED_BSS_SECTION_ASM_OP
#define SHARED_BSS_SECTION_ASM_OP "\t.section .shbss, \"bs\""
/* seq2-sysv3.h used to define HAVE_ATEXIT, so I assume ptx1 needs this... */
#define NEED_ATEXIT
/* Sequent DYNIX/ptx 2.x (SVr3) */
/* Use atexit for static destructors, instead of defining
our own exit function. */
#undef NEED_ATEXIT
/* Definitions for Sequent Intel 386 using BSD assembler syntax
(actually AT&T syntax for insns and operands,
adapted to BSD conventions for symbol names and debugging.)
Copyright (C) 1988, 1994, 1996, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)");
/* By default, don't use IEEE compatible arithmetic comparisons
because the assembler can't handle the fucom insn.
Return float values in the 387. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
/* Specify predefined symbols in preprocessor. */
#define CPP_PREDEFINES "-Dunix -Dsequent -Asystem=unix"
/* Pass -Z and -ZO options to the linker. */
#define LINK_SPEC "%{Z*}"
#if 0 /* Dynix 3.1 is said to accept -L. */
/* Dynix V3.0.12 doesn't accept -L at all. */
#define LINK_LIBGCC_SPECIAL
#endif
/* Link with libg.a when debugging, for dbx's sake. */
#define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
/* We don't want to output SDB debugging information. */
#undef SDB_DEBUGGING_INFO
/* We want to output DBX debugging information. */
#define DBX_DEBUGGING_INFO
/* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */
#define SIZE_TYPE "int"
/* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st.
* dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3),
* st(4), st(5), st(6), st(7), sp, bp */
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
((n) < 3 ? (n) : (n) < 6 ? (n) + 2 \
: (n) == 6 ? 15 : (n) == 7 ? 14 : 3)
/* malcolmp@hydra.maths.unsw.EDU.AU says these two definitions
fix trouble in dbx. */
#undef DBX_OUTPUT_LBRAC
#define DBX_OUTPUT_LBRAC(file,name) \
fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_LBRAC, depth); \
assemble_name (asmfile, buf); \
fprintf (asmfile, "\n");
#undef DBX_OUTPUT_RBRAC
#define DBX_OUTPUT_RBRAC(file,name) \
fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_RBRAC, depth); \
assemble_name (asmfile, buf); \
fprintf (asmfile, "\n");
/* Prevent anything from being allocated in the register pair cx/bx,
since that would confuse GDB. */
#undef HARD_REGNO_MODE_OK
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
(((REGNO) < 2 ? 1 \
: (REGNO) < 4 ? 1 \
: FP_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_FLOAT \
|| GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
: (MODE) != QImode) \
&& ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4))
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO));
/* Assembler pseudo-op for shared data segment. */
#define SHARED_SECTION_ASM_OP "\t.shdata"
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
variable of type `char *' which points to the opcode name in its
"internal" form--the form that is written in the machine description.
The Sequent assembler (identified as "Balance 8000 Assembler
07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string
move mnemonics - it uses `smov[bwl]' instead. Change "movs" into
"smov", carefully avoiding the sign-extend opcodes. */
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
{ \
if ((PTR)[0] == 'm' \
&& (PTR)[1] == 'o' \
&& (PTR)[2] == 'v' \
&& (PTR)[3] == 's' \
&& ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l') \
&& ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0')) \
{ \
fprintf (STREAM, "smov"); \
(PTR) += 4; \
} \
}
/* 10-Aug-92 pes Local labels are prefixed with ".L" */
#undef LPREFIX
#define LPREFIX ".L"
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\
sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
#undef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
/* The native compiler passes the address of the returned structure in eax. */
#undef STRUCT_VALUE
#undef STRUCT_VALUE_INCOMING
#define STRUCT_VALUE_REGNUM 0
/* Definitions for Intel 386 running SunOS 4.0.
Copyright (C) 1988, 1995, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Use's the Sun assembler syntax. */
/* Use crt0.o as a startup file. */
#define STARTFILE_SPEC \
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
#define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
%{g:-lg} %{sun386:}"
/* That last item is just to prevent a spurious error. */
#undef LINK_SPEC
#define LINK_SPEC \
"%{!nostdlib:%{!r*:%{!e*:-e _start}}} -dc -dp %{static:-Bstatic}"
/* Extra switches to give the assembler. */
#define ASM_SPEC "%{R} -i386 %{keep-local-as-symbols:-L}"
/* Specify predefined symbols in preprocessor. */
#define CPP_PREDEFINES "-Dunix -Dsun386 -Dsun -Asystem=unix -Asystem=bsd"
/* Allow #sccs in preprocessor. */
#define SCCS_DIRECTIVE
/* Output #ident as a .ident. */
#define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME);
/* We don't want to output SDB debugging information. */
#undef SDB_DEBUGGING_INFO
/* We want to output DBX debugging information. */
#define DBX_DEBUGGING_INFO
/* Implicit library calls should use memcpy, not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
/* Force structure alignment to the type used for a bitfield. */
#define PCC_BITFIELD_TYPE_MATTERS 1
/* This is partly guess. */
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
((n) == 0 ? 11 : (n) == 1 ? 9 : (n) == 2 ? 10 : (n) == 3 ? 8 \
: (n) == 4 ? 5 : (n) == 5 ? 4 : (n) == 6 ? 6 : (n))
/* Every debugger symbol must be in the text section.
Otherwise the assembler or the linker screws up. */
#define DEBUG_SYMS_TEXT
/* Definitions for Sun assembler syntax for the Intel 80386.
Copyright (C) 1988, 1996, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (80386, Sun syntax)");
/* Define the syntax of instructions and addresses. */
/* Prefix for internally generated assembler labels. */
#define LPREFIX ".L"
/* Define the syntax of pseudo-ops, labels and comments. */
/* Assembler pseudos to introduce constants of various size. */
#define ASM_SHORT "\t.value\t"
#define ASM_LONG "\t.long\t"
#define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
/* How to output an ASCII string constant. */
#define ASM_OUTPUT_ASCII(FILE, PTR, SIZE) \
do \
{ size_t i = 0, limit = (SIZE); \
while (i < limit) \
{ if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \
fputs ("\t.byte\t", (FILE)); } \
else fprintf ((FILE), ","); \
fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \
fprintf ((FILE), "\n"); \
} while (0)
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
{ \
const int len = strlen (main_input_filename); \
const char *na = main_input_filename + len; \
char shorter[15]; \
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
while (na > main_input_filename) \
{ \
if (na[-1] == '/') \
break; \
na--; \
} \
strncpy (shorter, na, 14); \
shorter[14] = 0; \
fprintf (FILE, "\t.file\t"); \
output_quoted_string (FILE, shorter); \
fprintf (FILE, "\n"); \
} \
fprintf (FILE, "\t.version\t\"%s %s\"\n", \
lang_hooks.name, version_string); \
if (optimize) ASM_FILE_START_1 (FILE); \
} while (0)
#define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n")
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
/* This is how to output an assembler line
that says to advance the location counter by SIZE bytes. */
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE))
/* Output before read-only data. */
#undef TEXT_SECTION_ASM_OP
#define TEXT_SECTION_ASM_OP "\t.text"
/* Output before writable data. */
#undef DATA_SECTION_ASM_OP
#define DATA_SECTION_ASM_OP "\t.data"
/* Define the syntax of labels and symbol definitions/declarations. */
/* This says how to output an assembler line
to define a global common symbol. */
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
( fputs (".comm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%u\n", (ROUNDED)))
/* This says how to output an assembler line
to define a local common symbol. */
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( fputs (".lcomm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%u\n", (ROUNDED)))
/* This is how to store into the string BUF
the symbol_ref name of an internal numbered label where
PREFIX is the class of label and NUM is the number within the class.
This is suitable for output with `assemble_name'. */
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
/* The prefix to add to user-visible assembler symbols. */
#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)
#
# target makefile for dgux
#
EXTRA_PARTS=crti.o crtbegin.o crtend.o
crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
$(GCC_FOR_TARGET) -c -o crti.o crti.s
# Don't run fixproto
STMP_FIXPROTO =
# Specify other dirs of system header files to be fixed.
OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers
# <limits.h> is sometimes in /usr/include/ansi/limits.h.
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ]
nextstep.o: $(srcdir)/config/nextstep.c $(CONFIG_H) flags.h tree.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/nextstep.c
# If compiling with the osf gcc, avoid sharing code.
TCFLAGS = -pic-none
# Assemble startup files.
crti.o: $(srcdir)/config/i386/osf1-ci.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-ci.asm >crti.s
$(GCC_FOR_TARGET) -c -o crti.o crti.s
crtn.o: $(srcdir)/config/i386/osf1-cn.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-cn.asm >crtn.s
$(GCC_FOR_TARGET) -c -o crtn.o crtn.s
# The pushl in CTOR initialization interferes with frame pointer elimination.
# We need to use -fPIC when we are using gcc to compile the routines in
# crtstuff.c. This is only really needed when we are going to use gcc/g++
# to produce a shared library, but since we don't know ahead of time when
# we will be doing that, we just always use -fPIC when compiling the
# routines in crtstuff.c.
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
TARGET_LIBGCC2_CFLAGS = -fPIC
#undef ASCII_DATA_ASM_OP
#define ASCII_DATA_ASM_OP "\t.ascii\t"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860, BSD)")
/* BSD UN*X systems use BSD STABS debugging info. */
#define DBX_DEBUGGING_INFO
#define ASCII_DATA_ASM_OP "\t.byte\t"
#define ASM_OUTPUT_ASCII(f, p, size) \
do { register size_t i, limit = (size); \
int inside; \
inside = FALSE; \
for (i = 0; i < limit; i++) { \
if (i % 64 == 0) { \
if (i != 0) { \
if (inside) \
putc('"', (f)); \
putc('\n', (f)); \
inside = FALSE; \
} \
fprintf((f), "%s", ASCII_DATA_ASM_OP); \
} \
if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] >= 127) { \
if (inside) { \
putc('"', (f)); \
inside = FALSE; \
} \
if (i % 64 != 0) \
putc(',', (f)); \
fprintf((f), "%d", (p)[i]); \
} else { \
if (!inside) { \
if (i % 64 != 0) \
putc(',', (f)); \
putc('"', (f)); \
inside = TRUE; \
} \
putc((p)[i], (f)); \
} \
} \
if (inside) \
putc('"', (f)); \
putc('\n', (f)); \
} while (0)
/* 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.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Declare things which are defined in i860.c but called from
insn-output.c. */
#ifdef RTX_CODE
extern unsigned long sfmode_constant_to_ulong PARAMS ((rtx));
extern const char *output_load PARAMS ((rtx *));
extern const char *output_store PARAMS ((rtx *));
extern const char *output_move_double PARAMS ((rtx *));
extern const char *output_fp_move_double PARAMS ((rtx *));
extern const char *output_block_move PARAMS ((rtx *));
extern const char *output_delay_insn PARAMS ((rtx));
#if 0
extern const char *output_delayed_branch PARAMS ((const char *, rtx *, rtx));
#endif
extern void output_load_address PARAMS ((rtx *));
extern int safe_insn_src_p PARAMS ((rtx, enum machine_mode));
extern int operand_clobbered_before_used_after PARAMS ((rtx, rtx));
extern int single_insn_src_p PARAMS ((rtx, enum machine_mode));
extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int arith_operand PARAMS ((rtx, enum machine_mode));
extern int logic_operand PARAMS ((rtx, enum machine_mode));
extern int shift_operand PARAMS ((rtx, enum machine_mode));
extern int compare_operand PARAMS ((rtx, enum machine_mode));
extern int bte_operand PARAMS ((rtx, enum machine_mode));
extern int indexed_operand PARAMS ((rtx, enum machine_mode));
extern int load_operand PARAMS ((rtx, enum machine_mode));
extern int small_int PARAMS ((rtx, enum machine_mode));
extern int logic_int PARAMS ((rtx, enum machine_mode));
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 */
#ifdef TREE_CODE
extern tree i860_build_va_list PARAMS ((void));
#endif /* TREE_CODE */
/* Configuration for an i860 running Mach as the target machine. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860 Mach3.x)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di860 -DMACH -Asystem=unix -Asystem=mach -Acpu=i860 -Amachine=i860"
/* Specify extra dir to search for include files. */
#define SYSTEM_INCLUDE_DIR "/usr/mach/include"
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
Copyright (C) 1991, 1996, 1999, 2000, 2002 Free Software Foundation, Inc.
Based upon original work of Ron Guilmette (rfg@monkeys.com).
Contributed by Andy Pfiffer (andyp@ssd.intel.com).
Partially inspired by
Pete Beckman of Indiana University (beckman@cs.indiana.edu)
Harry Dolan of Intel Corporation (dolan@ssd.intel.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef TARGET_SWITCHES
#define TARGET_SWITCHES \
{ {"xp", 1, N_("Generate code which uses the FPU")}, \
{"noxp", -1, N_("Do not generate code which uses the FPU")}, \
{"xr", -1, N_("Do not generate code which uses the FPU")}, \
{"noieee", -1, N_("Do not generate code which uses the FPU")}, \
{"nx", 2, NULL}, \
{ "", TARGET_DEFAULT, NULL}}
#undef TARGET_DEFAULT
#define TARGET_DEFAULT 1
/* The Intel as860 assembler does not understand .stabs, must use COFF */
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU"
#define CPP_SPEC "%{mnx:-D__NODE}"
/* autoinit.o autolaunches NX applications */
#define STARTFILE_SPEC "crt0.o%s %{mnx:-yoptions/autoinit.o%s}"
/* libic.a is the PGI intrinsic library */
/* libpm.o and guard.o are for the performance monitoring modules (ignored) */
/* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */
#if HAVE_DASH_G
#define LIB_SPEC \
"%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} %{g*:-lg} -lc -lmach -lc -lic"
#else /* HAVE_DASH_G */
/* can't use -g for -lg; libg.a doesn't have a symbol table and ld complains */
#define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} -lc -lmach -lc -lic"
#endif /* HAVE_DASH_G */
/* Get rid of definition from svr3.h. */
#undef SIZE_TYPE
#undef I860_REG_PREFIX
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "//"
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "\"%s\""
#undef ASCII_DATA_ASM_OP
#define ASCII_DATA_ASM_OP "\t.byte\t"
/*
* the assembler we're using doesn't grok .ident...
*/
#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do \
{ \
register const unsigned char *str = (const unsigned char *) (STR); \
register const unsigned char *limit = str + (LENGTH); \
register unsigned bytes_in_chunk = 0; \
for (; str < limit; str++) \
{ \
register unsigned ch = *str; \
if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
{ \
if (bytes_in_chunk > 0) \
{ \
fprintf ((FILE), "\"\n"); \
bytes_in_chunk = 0; \
} \
assemble_aligned_integer (1, GEN_INT (ch)); \
} \
else \
{ \
if (bytes_in_chunk >= 60) \
{ \
fprintf ((FILE), "\"\n"); \
bytes_in_chunk = 0; \
} \
if (bytes_in_chunk == 0) \
fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \
putc (ch, (FILE)); \
bytes_in_chunk++; \
} \
} \
if (bytes_in_chunk > 0) \
fprintf ((FILE), "\"\n"); \
} \
while (0)
/* This says how to output an assembler line
to define a local common symbol. */
#undef ASM_OUTPUT_LOCAL
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( fputs (".lcomm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%u\n", (ROUNDED)))
/*
* not defining ASM_STABS_OP yields .stabs in the .s file
* when using g++ -- so, I'll define it.
*/
#define ASM_STABS_OP "//.stabs"
/* Define this macro if an instruction to load a value narrower
than a word from memory into a register also zero-extends the
value to the whole register. */
/*#define BYTE_LOADS_ZERO_EXTEND*/
/* Define this macro as a C expression which is nonzero if
accessing less than a word of memory (i.e. a `char' or a
`short') is no faster than accessing a word of memory, i.e., if
such access require more than one instruction or if there is no
difference in cost between byte and (aligned) word loads.
On RISC machines, it tends to generate better code to define
this as 1, since it avoids making a QI or HI mode register. */
/*
#undef SLOW_BYTE_ACCESS
#define SLOW_BYTE_ACCESS 1
*/
/* Define if shifts truncate the shift count
which implies one can omit a sign-extension or zero-extension
of a shift count. */
#define SHIFT_COUNT_TRUNCATED 1
#define FASTEST_ALIGNMENT 32
/* Make strings word-aligned so strcpy from constants will be faster. */
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
(TREE_CODE (EXP) == STRING_CST \
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
/* Make arrays of chars word-aligned for the same reasons. */
#define DATA_ALIGNMENT(TYPE, ALIGN) \
(TREE_CODE (TYPE) == ARRAY_TYPE \
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
/*
* disable a few things picked up from svr3.h
*/
#undef INIT_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#undef READONLY_DATA_SECTION_ASM_OP
#undef CTORS_SECTION_ASM_OP
#undef DTORS_SECTION_ASM_OP
#undef DO_GLOBAL_CTORS_BODY
#undef ASM_OUTPUT_DESTRUCTOR
#undef TARGET_ASM_SELECT_SECTION
#define BSS_SECTION_ASM_OP "\t.bss" /* XXX */
#undef EXTRA_SECTIONS
#undef EXTRA_SECTION_FUNCTIONS
/* Target definitions for GNU compiler for Intel 80860 running System V.3
Copyright (C) 1991, 1996, 2000, 2002 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860, System V Release 3)")
/* Provide a set of pre-definitions and pre-assertions appropriate for
the i860 running svr3. */
#define CPP_PREDEFINES "-Di860 -Dunix -D__svr3__ -Asystem=unix -Asystem=svr3 -Acpu=i860 -Amachine=i860"
/* Use crt1.o as a startup file and crtn.o as a closing file. */
#define STARTFILE_SPEC \
"%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
#define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc crtn.o%s"
/* Special flags for the linker. I don't know what they do. */
#define LINK_SPEC "%{T*} %{z:-lm}"
/* The prefix to be used in assembler output for all names of registers.
None is needed in V.3. */
#define I860_REG_PREFIX ""
/* Delimiter that starts comments in the assembler code. */
#define ASM_COMMENT_START "//"
/* Output the special word the System V SDB wants to see just before
the first word of each function's prologue code. */
extern const char *current_function_original_name;
/* This special macro is used to output a magic word just before the
first word of each function. On some versions of UNIX running on
the i860, this word can be any word that looks like a NOP, however
under svr4, this neds to be an `shr r0,r0,r0' instruction in which
the normally unused low-order bits contain the length of the function
prologue code (in bytes). This is needed to make the System V SDB
debugger happy. */
#undef ASM_OUTPUT_FUNCTION_PREFIX
#define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME) \
do { ASM_OUTPUT_ALIGN (FILE, 2); \
fprintf ((FILE), "\t.long\t.ep."); \
assemble_name (FILE, FNNAME); \
fprintf (FILE, "-"); \
assemble_name (FILE, FNNAME); \
fprintf (FILE, "+0xc8000000\n"); \
current_function_original_name = (FNNAME); \
} while (0)
/* Output the special label that must go just after each function's
prologue code to support svr4 SDB. */
#define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE) \
do { fprintf (FILE, ".ep."); \
assemble_name (FILE, current_function_original_name); \
fprintf (FILE, ":\n"); \
} while (0)
/* This says how to output an assembler line
to define a local common symbol.
The difference from svr3.h is we don't limit align to 2. */
#undef ASM_OUTPUT_LOCAL
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
do { \
int align = exact_log2 (ROUNDED); \
data_section (); \
ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \
ASM_OUTPUT_LABEL ((FILE), (NAME)); \
fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)); \
} while (0)
/* The routine used to output string literals. */
#define ASCII_DATA_ASM_OP "\t.byte\t"
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do \
{ \
register const unsigned char *str = (const unsigned char *) (STR); \
register const unsigned char *limit = str + (LENGTH); \
register unsigned bytes_in_chunk = 0; \
for (; str < limit; str++) \
{ \
register unsigned ch = *str; \
if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
{ \
if (bytes_in_chunk > 0) \
{ \
fprintf ((FILE), "\"\n"); \
bytes_in_chunk = 0; \
} \
assemble_aligned_integer (1, GEN_INT (ch)); \
} \
else \
{ \
if (bytes_in_chunk >= 60) \
{ \
fprintf ((FILE), "\"\n"); \
bytes_in_chunk = 0; \
} \
if (bytes_in_chunk == 0) \
fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \
putc (ch, (FILE)); \
bytes_in_chunk++; \
} \
} \
if (bytes_in_chunk > 0) \
fprintf ((FILE), "\"\n"); \
} \
while (0)
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata, \"x\""
#undef CTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"x\""
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"x\""
/* Add definitions to support the .tdesc section as specified in the svr4
ABI for the i860. */
#define TDESC_SECTION_ASM_OP "\t.section\t.tdesc"
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_tdesc
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
TDESC_SECTION_FUNCTION
#define TDESC_SECTION_FUNCTION \
void \
tdesc_section () \
{ \
if (in_section != in_tdesc) \
{ \
fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \
in_section = in_tdesc; \
} \
}
/* 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.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i860 System V Release 4)");
/* 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
will get correctly defined for the svr4 (ABI compliant) case rather
than for the previous (svr3, svr2, ...) case. It also needs to be
defined so that the correct (svr4) version of __builtin_saveregs
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. */
#define I860_SVR4_VA_LIST 1
/* The prefix to be used in assembler output for all names of registers.
This string gets prepended to all i860 register names (svr4 only). */
#define I860_REG_PREFIX "%"
#define ASM_COMMENT_START "#"
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "\"%s\""
/* 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. */
#undef PRINT_OPERAND_PART
#define PRINT_OPERAND_PART(FILE, X, PART_CODE) \
do { fprintf (FILE, "["); \
output_address (X); \
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. */
extern const char *current_function_original_name;
/* This special macro is used to output a magic word just before the
first word of each function. On some versions of UNIX running on
the i860, this word can be any word that looks like a NOP, however
under svr4, this neds to be an `shr r0,r0,r0' instruction in which
the normally unused low-order bits contain the length of the function
prologue code (in bytes). This is needed to make the svr4 SDB debugger
happy. */
#undef ASM_OUTPUT_FUNCTION_PREFIX
#define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME) \
do { ASM_OUTPUT_ALIGN (FILE, 2); \
fprintf ((FILE), "\t.long\t.ep."); \
assemble_name (FILE, FNNAME); \
fprintf (FILE, "-"); \
assemble_name (FILE, FNNAME); \
fprintf (FILE, "+0xc8000000\n"); \
current_function_original_name = (FNNAME); \
} while (0)
/* Output the special label that must go just after each function's
prologue code to support svr4 SDB. */
#define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE) \
do { fprintf (FILE, ".ep."); \
assemble_name (FILE, current_function_original_name); \
fprintf (FILE, ":\n"); \
} while (0)
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
Note that we want to give these sections the SHF_WRITE attribute
because these sections will actually contain data (i.e. tables of
addresses of functions in the current root executable or shared library
file) and, in the case of a shared library, the relocatable addresses
will have to be properly resolved/relocated (and then written into) by
the dynamic linker when it actually attaches the given shared library
to the executing process. (Note that on SVR4, you may wish to use the
`-z text' option to the ELF linker, when building a shared library, as
an additional check that you are doing everything right. But if you do
use the `-z text' option when building a shared library, you will get
errors unless the .ctors and .dtors sections are marked as writable
via the SHF_WRITE attribute.) */
#undef CTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\""
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\""
/* Add definitions to support the .tdesc section as specified in the svr4
ABI for the i860. */
#define TDESC_SECTION_ASM_OP "\t.section\t.tdesc"
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_tdesc
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
TDESC_SECTION_FUNCTION
#define TDESC_SECTION_FUNCTION \
void \
tdesc_section () \
{ \
if (in_section != in_tdesc) \
{ \
fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \
in_section = in_tdesc; \
} \
}
# Use ieee rounding rules for divide and square root operations.
# /bin/cc is assumed to point to fxc version 1.3 or newer.
CCLIBFLAGS=-O -ieee -uniproc
/* Special varargs support for i860.
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if defined(__svr4__) || defined(__alliant__)
.text
.align 4
/* The Alliant needs the added underscore. */
.globl __builtin_saveregs
__builtin_saveregs:
.globl ___builtin_saveregs
___builtin_saveregs:
andnot 0x0f,%sp,%sp /* round down to 16-byte boundary */
adds -96,%sp,%sp /* allocate stack space for reg save
area and also for a new va_list
structure */
/* Save all argument registers in the arg reg save area. The
arg reg save area must have the following layout (according
to the svr4 ABI):
struct {
union {
float freg[8];
double dreg[4];
} float_regs;
long ireg[12];
};
*/
fst.q %f8, 0(%sp) /* save floating regs (f8-f15) */
fst.q %f12,16(%sp)
st.l %r16,32(%sp) /* save integer regs (r16-r27) */
st.l %r17,36(%sp)
st.l %r18,40(%sp)
st.l %r19,44(%sp)
st.l %r20,48(%sp)
st.l %r21,52(%sp)
st.l %r22,56(%sp)
st.l %r23,60(%sp)
st.l %r24,64(%sp)
st.l %r25,68(%sp)
st.l %r26,72(%sp)
st.l %r27,76(%sp)
adds 80,%sp,%r16 /* compute the address of the new
va_list structure. Put in into
r16 so that it will be returned
to the caller. */
/* Initialize all fields of the new va_list structure. This
structure looks like:
typedef struct {
unsigned long ireg_used;
unsigned long freg_used;
long *reg_base;
long *mem_ptr;
} va_list;
*/
st.l %r0, 0(%r16) /* nfixed */
st.l %r0, 4(%r16) /* nfloating */
st.l %sp, 8(%r16) /* __va_ctl points to __va_struct. */
bri %r1 /* delayed return */
st.l %r28,12(%r16) /* pointer to overflow args */
#else /* not __svr4__ */
#if defined(__PARAGON__)
/*
* we'll use SVR4-ish varargs but need SVR3.2 assembler syntax,
* and we stand a better chance of hooking into libraries
* compiled by PGI. [andyp@ssd.intel.com]
*/
.text
.align 4
.globl __builtin_saveregs
__builtin_saveregs:
.globl ___builtin_saveregs
___builtin_saveregs:
andnot 0x0f,sp,sp /* round down to 16-byte boundary */
adds -96,sp,sp /* allocate stack space for reg save
area and also for a new va_list
structure */
/* Save all argument registers in the arg reg save area. The
arg reg save area must have the following layout (according
to the svr4 ABI):
struct {
union {
float freg[8];
double dreg[4];
} float_regs;
long ireg[12];
};
*/
fst.q f8, 0(sp)
fst.q f12,16(sp)
st.l r16,32(sp)
st.l r17,36(sp)
st.l r18,40(sp)
st.l r19,44(sp)
st.l r20,48(sp)
st.l r21,52(sp)
st.l r22,56(sp)
st.l r23,60(sp)
st.l r24,64(sp)
st.l r25,68(sp)
st.l r26,72(sp)
st.l r27,76(sp)
adds 80,sp,r16 /* compute the address of the new
va_list structure. Put in into
r16 so that it will be returned
to the caller. */
/* Initialize all fields of the new va_list structure. This
structure looks like:
typedef struct {
unsigned long ireg_used;
unsigned long freg_used;
long *reg_base;
long *mem_ptr;
} va_list;
*/
st.l r0, 0(r16) /* nfixed */
st.l r0, 4(r16) /* nfloating */
st.l sp, 8(r16) /* __va_ctl points to __va_struct. */
bri r1 /* delayed return */
st.l r28,12(r16) /* pointer to overflow args */
#else /* not __PARAGON__ */
.text
.align 4
.globl ___builtin_saveregs
___builtin_saveregs:
mov sp,r30
andnot 0x0f,sp,sp
adds -96,sp,sp /* allocate sufficient space on the stack */
/* Fill in the __va_struct. */
st.l r16, 0(sp) /* save integer regs (r16-r27) */
st.l r17, 4(sp) /* int fixed[12] */
st.l r18, 8(sp)
st.l r19,12(sp)
st.l r20,16(sp)
st.l r21,20(sp)
st.l r22,24(sp)
st.l r23,28(sp)
st.l r24,32(sp)
st.l r25,36(sp)
st.l r26,40(sp)
st.l r27,44(sp)
fst.q f8, 48(sp) /* save floating regs (f8-f15) */
fst.q f12,64(sp) /* int floating[8] */
/* Fill in the __va_ctl. */
st.l sp, 80(sp) /* __va_ctl points to __va_struct. */
st.l r28,84(sp) /* pointer to more args */
st.l r0, 88(sp) /* nfixed */
st.l r0, 92(sp) /* nfloating */
adds 80,sp,r16 /* return address of the __va_ctl. */
bri r1
mov r30,sp
/* recover stack and pass address to start
of data. */
#endif /* not __PARAGON__ */
#endif /* not __svr4__ */
/* Definitions for Motorola 680x0 running A/UX
Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file was renamed from aux.h because of MSDOS: aux.anything
isn't usable. Sigh. */
/* Execution environment */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) /* 68020, 68881 */
#define CPP_PREDEFINES "-Dunix -Dm68k -DAUX -DmacII \
-Asystem=unix -Asystem=AUX -Acpu=m68k -Amachine=m68k -Amachine=macII"
#define CPP_SPEC \
"%{!msoft-float:%{!ansi:-Dmc68881 }-D__HAVE_68881__ }\
-Acpu=mc68000 -D__mc68000__ %{!ansi:-Dmc68000 }\
%{!mc68000:%{!m68000:-Acpu=mc68020 -D__mc68020__ %{!ansi:-Dmc68020 }}}\
%{m68030:-Acpu=mc68030 -D__mc68030__ %{!ansi:-Dmc68030 }}\
%{m68040:-Acpu=mc68040 -D__mc68040__ %{!ansi:-Dmc68040 }}\
%{!ansi:-D__STDC__=2 }\
%{sbsd:-D_BSD_SOURCE -DBSD }%{ZB:-D_BSD_SOURCE -DBSD }\
%{ssysv:-D_SYSV_SOURCE -DSYSV -DUSG }%{ZS:-D_SYSV_SOURCE -DSYSV -DUSG }\
%{sposix:-D_POSIX_SOURCE -DPOSIX }%{ZP:-D_POSIX_SOURCE -DPOSIX }\
%{sposix+:-D_POSIX_SOURCE -DPOSIX }\
%{saux:-D_AUX_SOURCE }%{ZA:-D_AUX_SOURCE }\
%{!sbsd:%{!ZB:%{!ssysv:%{!ZS:%{!sposix:%{!ZP:%{!snone:\
-D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE }}}}}}}"
#define LIB_SPEC \
"%{sbsd:-lbsd }%{ZB:-lbsd }\
%{ssysv:-lsvid }%{ZS:-lsvid }\
%{sposix:-lposix }%{ZP:-lposix }%{sposix+:-lposix }\
%{!static:%{smac:-lmac_s -lat -lld -lmr }-lc_s }\
%{static:%{smac:-lmac -lat -lld -lmr }-lc }"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{pg:mcrt0.o%s }%{!pg:%{p:mcrt1.o%s }\
%{!p:%{smac:maccrt1.o%s low.o%s }%{!smac:crt1.o%s }}}\
crt2.o%s "
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtn.o%s "
/*===================================================================*/
/* Compilation environment -- mostly */
/* We provide atexit(), A/UX does not have it */
#define NEED_ATEXIT
/* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
and bzero */
#define TARGET_MEM_FUNCTIONS
/* Resize standard types */
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "unsigned int"
/* Every structure or union's size must be a multiple of 2 bytes. */
#define STRUCTURE_SIZE_BOUNDARY 16
/* Bits needed by collect */
#define OBJECT_FORMAT_COFF
#define MY_ISCOFF(m) ((m) == M68TVMAGIC || \
(m) == M68MAGIC || \
(m) == MC68TVMAGIC || \
(m) == MC68MAGIC || \
(m) == M68NSMAGIC)
#ifndef USE_COLLECT2
/* For .ctor/.dtor sections for collecting constructors */
/* We have special start/end files for defining [cd]tor lists */
#define CTOR_LISTS_DEFINED_EXTERNALLY
#endif
/*======================================================================*/
/* Calling convention and library support changes */
/* Define how to generate (in the callee) the output value of a function
and how to find (in the caller) the value returned by a function. VALTYPE
is the data type of the value (as a tree). If the precise function being
called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0.
For A/UX generate the result in d0, a0, or fp0 as appropriate. */
#undef FUNCTION_VALUE
#define FUNCTION_VALUE(VALTYPE, FUNC) \
(TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \
? gen_rtx_REG (TYPE_MODE (VALTYPE), 16) \
: (POINTER_TYPE_P (VALTYPE) \
? gen_rtx_REG (TYPE_MODE (VALTYPE), 8) \
: gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
#undef LIBCALL_VALUE
#define LIBCALL_VALUE(MODE) \
gen_rtx_REG ((MODE), ((TARGET_68881 && \
((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0))
/* 1 if N is a possible register number for a function value.
For A/UX allow d0, a0, or fp0 as return registers, for integral,
pointer, or floating types, respectively. Reject fp0 if not using a
68881 coprocessor. */
#undef FUNCTION_VALUE_REGNO_P
#define FUNCTION_VALUE_REGNO_P(N) \
((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16))
/* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
more than one register. */
#undef NEEDS_UNTYPED_CALL
#define NEEDS_UNTYPED_CALL 1
/* For compatibility with the large body of existing code which does not
always properly declare external functions returning pointer types, the
A/UX convention is to copy the value returned for pointer functions
from a0 to d0 in the function epilogue, so that callers that have
neglected to properly declare the callee can still find the correct return
value. */
#define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
{ \
if (current_function_returns_pointer \
&& ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \
asm_fprintf (FILE, "\t%s %Ra0,%Rd0\n", ASM_MOV_INSN); \
}
/* How to call the function profiler */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
asm_fprintf (FILE, "\t%Olea %LLP%d,%Ra0\n\t%Ojbsr %s\n", \
(LABELNO), FUNCTION_PROFILER_SYMBOL)
/* Finalize the trampoline by flushing the insn cache */
#undef FINALIZE_TRAMPOLINE
#define FINALIZE_TRAMPOLINE(TRAMP) \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
0, VOIDmode, 2, TRAMP, Pmode, \
plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode);
/* Clear the instruction cache from `beg' to `end'. This makes an
inline system call to SYS_sysm68k. The arguments are as follows:
sysm68k(105, addr, scope, cache, len)
105 - the subfunction code to clear the cache
addr - the start address for the flush
scope - the scope of the flush (see the cpush insn)
cache - which cache to flush (see the cpush insn)
len - a factor relating to the number of flushes to perform :
len/16 lines, or len/4096 pages.
While all this is only really relevant to 040's, the system call
will just return an error (which we ignore) on other systems. */
#define CLEAR_INSN_CACHE(beg, end) \
{ \
unsigned _beg = (unsigned)(beg), _end = (unsigned)(end); \
unsigned _len = ((_end / 16) - (_beg / 16) + 1) * 16; \
__asm __volatile( \
ASM_MOV_INSN " %1, %-\n\t" /* nr lines */ \
ASM_MOV_INSN " %#3, %-\n\t" /* insn+data caches */ \
ASM_MOV_INSN " %#1, %-\n\t" /* clear lines */ \
ASM_MOV_INSN " %0, %-\n\t" /* beginning of buffer */ \
ASM_MOV_INSN " %#105, %-\n\t" /* cache sub-function nr */ \
ASM_MOV_INSN " %#0, %-\n\t" /* dummy return address */ \
ASM_MOV_INSN " %#38, %/d0\n\t" /* system call nr */ \
"trap %#0\n\t" \
"add%.l %#24, %/sp" \
: /* no outputs */ \
: "g"(_beg), "g"(_len) \
: "%d0"); \
}
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