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
This commit is contained in:
parent
755ac5d480
commit
c7bdf0a6af
@ -1,3 +1,83 @@
|
||||
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>
|
||||
|
||||
|
921
gcc/config.gcc
921
gcc/config.gcc
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
/* 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[]));
|
@ -1,932 +0,0 @@
|
||||
/* Subroutines for insn-output.c for MIL-STD-1750.
|
||||
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000 Free Software Foundation, Inc.
|
||||
Contributed by O.M.Kellogg, DASA (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. */
|
||||
|
||||
#define __datalbl
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "function.h"
|
||||
#include "expr.h"
|
||||
#define HAVE_cc0
|
||||
#include "conditions.h"
|
||||
#include "real.h"
|
||||
#include "regs.h"
|
||||
#include "output.h"
|
||||
#include "flags.h"
|
||||
#include "tm_p.h"
|
||||
#include "target.h"
|
||||
#include "target-def.h"
|
||||
|
||||
struct datalabel_array datalbl[DATALBL_ARRSIZ];
|
||||
int datalbl_ndx = -1;
|
||||
struct jumplabel_array jmplbl[JMPLBL_ARRSIZ];
|
||||
int jmplbl_ndx = -1;
|
||||
int label_pending = 0, program_counter = 0;
|
||||
enum section current_section = Normal;
|
||||
const char *const sectname[4] =
|
||||
{"Init", "Normal", "Konst", "Static"};
|
||||
|
||||
static int which_bit PARAMS ((int));
|
||||
static bool assemble_integer_1750a PARAMS ((rtx, unsigned int, int));
|
||||
static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
#undef TARGET_ASM_BYTE_OP
|
||||
#define TARGET_ASM_BYTE_OP "\tdata\t"
|
||||
#undef TARGET_ASM_ALIGNED_HI_OP
|
||||
#define TARGET_ASM_ALIGNED_HI_OP "\tdatal\t"
|
||||
#undef TARGET_ASM_ALIGNED_SI_OP
|
||||
#define TARGET_ASM_ALIGNED_SI_OP NULL
|
||||
#undef TARGET_ASM_INTEGER
|
||||
#define TARGET_ASM_INTEGER assemble_integer_1750a
|
||||
|
||||
#undef TARGET_ASM_FUNCTION_PROLOGUE
|
||||
#define TARGET_ASM_FUNCTION_PROLOGUE output_function_prologue
|
||||
#undef TARGET_ASM_FUNCTION_EPILOGUE
|
||||
#define TARGET_ASM_FUNCTION_EPILOGUE output_function_epilogue
|
||||
|
||||
struct gcc_target targetm = TARGET_INITIALIZER;
|
||||
|
||||
/* 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
|
||||
output_function_prologue (file, size)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT size;
|
||||
{
|
||||
if (flag_verbose_asm)
|
||||
{
|
||||
int regno, regs_used = 0;
|
||||
|
||||
fprintf (file, "\t; registers used: ");
|
||||
for (regno = 0; regno < 14; regno++)
|
||||
if (regs_ever_live[regno])
|
||||
{
|
||||
fprintf (file, " %s", reg_names[regno]);
|
||||
regs_used++;
|
||||
}
|
||||
|
||||
if (regs_used == 0)
|
||||
fprintf (file, "(none)");
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
fprintf (file, "\n\t%s\tr15,%d",
|
||||
(size <= 16 ? "sisp" : "sim"), size);
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; reserve local-variable space");
|
||||
}
|
||||
|
||||
if (frame_pointer_needed)
|
||||
{
|
||||
fprintf(file, "\n\tpshm\tr14,r14");
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; push old frame");
|
||||
fprintf (file, "\n\tlr\tr14,r15");
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; set new frame");
|
||||
}
|
||||
|
||||
fprintf (file, "\n");
|
||||
program_counter = 0;
|
||||
jmplbl_ndx = -1;
|
||||
}
|
||||
|
||||
/* 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
|
||||
output_function_epilogue (file, size)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT size;
|
||||
{
|
||||
if (frame_pointer_needed)
|
||||
{
|
||||
fprintf (file, "\tlr\tr15,r14");
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; set stack ptr to frame ptr");
|
||||
fprintf (file, "\n\tpopm\tr14,r14");
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; restore previous frame ptr");
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
fprintf (file, "\t%s\tr15,%d",
|
||||
(size <= 16 ? "aisp" : "aim"), size);
|
||||
if (flag_verbose_asm)
|
||||
fprintf (file, " ; free up local-var space");
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
|
||||
fprintf (file, "\turs\tr15\n\n");
|
||||
}
|
||||
|
||||
void
|
||||
notice_update_cc (exp)
|
||||
rtx exp;
|
||||
{
|
||||
if (GET_CODE (exp) == SET)
|
||||
{
|
||||
enum rtx_code src_code = GET_CODE (SET_SRC (exp));
|
||||
/* Jumps do not alter the cc's. */
|
||||
if (SET_DEST (exp) == pc_rtx)
|
||||
return;
|
||||
/* Moving a register or constant into memory doesn't alter the cc's. */
|
||||
if (GET_CODE (SET_DEST (exp)) == MEM
|
||||
&& (src_code == REG || src_code == CONST_INT))
|
||||
return;
|
||||
/* Function calls clobber the cc's. */
|
||||
if (src_code == CALL)
|
||||
{
|
||||
CC_STATUS_INIT;
|
||||
return;
|
||||
}
|
||||
/* Emulated longword bit-ops leave cc's incorrect */
|
||||
if (GET_MODE (SET_DEST (exp)) == HImode ?
|
||||
src_code == AND || src_code == IOR ||
|
||||
src_code == XOR || src_code == NOT : 0)
|
||||
{
|
||||
CC_STATUS_INIT;
|
||||
return;
|
||||
}
|
||||
/* Tests and compares set the cc's in predictable ways. */
|
||||
if (SET_DEST (exp) == cc0_rtx)
|
||||
{
|
||||
CC_STATUS_INIT;
|
||||
cc_status.value1 = SET_SRC (exp);
|
||||
return;
|
||||
}
|
||||
/* Anything else will set cc_status. */
|
||||
cc_status.flags = CC_NO_OVERFLOW;
|
||||
cc_status.value1 = SET_SRC (exp);
|
||||
cc_status.value2 = SET_DEST (exp);
|
||||
return;
|
||||
}
|
||||
else if (GET_CODE (exp) == PARALLEL
|
||||
&& GET_CODE (XVECEXP (exp, 0, 0)) == SET)
|
||||
{
|
||||
if (SET_DEST (XVECEXP (exp, 0, 0)) == pc_rtx)
|
||||
return;
|
||||
if (SET_DEST (XVECEXP (exp, 0, 0)) == cc0_rtx)
|
||||
{
|
||||
CC_STATUS_INIT;
|
||||
cc_status.value1 = SET_SRC (XVECEXP (exp, 0, 0));
|
||||
return;
|
||||
}
|
||||
CC_STATUS_INIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_STATUS_INIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rtx
|
||||
function_arg (cum, mode, type, named)
|
||||
int cum;
|
||||
enum machine_mode mode;
|
||||
tree type;
|
||||
int named ATTRIBUTE_UNUSED;
|
||||
{
|
||||
int size;
|
||||
|
||||
if (MUST_PASS_IN_STACK (mode, type))
|
||||
return (rtx) 0;
|
||||
if (mode == BLKmode)
|
||||
size = int_size_in_bytes (type);
|
||||
else
|
||||
size = GET_MODE_SIZE (mode);
|
||||
if (cum + size < 12)
|
||||
return gen_rtx_REG (mode, cum);
|
||||
else
|
||||
return (rtx) 0;
|
||||
}
|
||||
|
||||
const char *
|
||||
movcnt_regno_adjust (op)
|
||||
rtx *op;
|
||||
{
|
||||
static char outstr[80];
|
||||
int op0r = REGNO (op[0]), op1r = REGNO (op[1]), op2r = REGNO (op[2]);
|
||||
#define dstreg op0r
|
||||
#define srcreg op1r
|
||||
#define cntreg op2r
|
||||
#define cntreg_1750 (op0r + 1)
|
||||
|
||||
if (cntreg == cntreg_1750)
|
||||
sprintf (outstr, "mov r%d,r%d", op0r, op1r);
|
||||
else if (dstreg + 1 == srcreg && cntreg > srcreg)
|
||||
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op2r, op1r, op0r, op2r);
|
||||
else if (dstreg == cntreg + 1)
|
||||
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op2r, op2r, op1r);
|
||||
else if (dstreg == srcreg + 1)
|
||||
sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d",
|
||||
op0r, op1r, op0r, op2r, op1r, op2r);
|
||||
else if (cntreg + 1 == srcreg)
|
||||
sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d",
|
||||
op2r, op1r, op0r, op2r, op2r, op0r);
|
||||
else if (cntreg == srcreg + 1)
|
||||
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op1r, op1r, op0r);
|
||||
else
|
||||
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d\n\txwr r%d,r%d",
|
||||
op2r, cntreg_1750, op0r, op1r, op2r, cntreg_1750);
|
||||
return outstr;
|
||||
}
|
||||
|
||||
const char *
|
||||
mod_regno_adjust (instr, op)
|
||||
const char *instr;
|
||||
rtx *op;
|
||||
{
|
||||
static char outstr[40];
|
||||
const char *const r = (!strncmp (instr, "dvr", 3) ? "r" : "");
|
||||
int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1;
|
||||
|
||||
if (modregno_gcc == modregno_1750
|
||||
|| (reg_renumber != NULL
|
||||
&& reg_renumber[modregno_gcc] >= 0
|
||||
&& reg_renumber[modregno_gcc] == reg_renumber[modregno_1750]))
|
||||
sprintf (outstr, "%s r%%0,%s%%2", instr, r);
|
||||
else
|
||||
sprintf (outstr, "lr r%d,r%d\n\t%s r%%0,%s%%2\n\txwr r%d,r%d",
|
||||
modregno_gcc, modregno_1750, instr, r, modregno_1750,
|
||||
modregno_gcc);
|
||||
return outstr;
|
||||
}
|
||||
|
||||
|
||||
/* Check if op is a valid memory operand for 1750A Load/Store instructions
|
||||
(memory indirection permitted.) */
|
||||
|
||||
int
|
||||
memop_valid (op)
|
||||
rtx op;
|
||||
{
|
||||
static int recurred = 0;
|
||||
int valid_operand;
|
||||
|
||||
if (GET_MODE (op) != Pmode && GET_MODE (op) != VOIDmode
|
||||
&& GET_MODE (op) != QImode)
|
||||
return 0;
|
||||
switch (GET_CODE (op))
|
||||
{
|
||||
case MEM:
|
||||
if (!recurred && GET_CODE (XEXP (op, 0)) == REG)
|
||||
return 1;
|
||||
case MINUS:
|
||||
case MULT:
|
||||
case DIV:
|
||||
return 0;
|
||||
case PLUS:
|
||||
recurred = 1;
|
||||
valid_operand = memop_valid (XEXP (op, 0));
|
||||
if (valid_operand)
|
||||
valid_operand = memop_valid (XEXP (op, 1));
|
||||
recurred = 0;
|
||||
return valid_operand;
|
||||
case REG:
|
||||
if (REGNO (op) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
case CONST:
|
||||
case CONST_INT:
|
||||
case SYMBOL_REF:
|
||||
case SUBREG:
|
||||
return 1;
|
||||
default:
|
||||
printf ("memop_valid: code=%d\n", (int) GET_CODE (op));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* predicate for the MOV instruction: */
|
||||
int
|
||||
mov_memory_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == REG);
|
||||
}
|
||||
|
||||
/* predicate for the STC instruction: */
|
||||
int
|
||||
small_nonneg_const (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||
{
|
||||
if (GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) <= 15)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* predicate for constant zero: */
|
||||
int
|
||||
zero_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
return op == CONST0_RTX (mode);
|
||||
}
|
||||
|
||||
|
||||
/* predicate for 1750 `B' addressing mode (Base Register with Offset)
|
||||
memory operand */
|
||||
int
|
||||
b_mode_operand (op)
|
||||
rtx op;
|
||||
{
|
||||
if (GET_CODE (op) == MEM)
|
||||
{
|
||||
rtx inner = XEXP (op, 0);
|
||||
if (GET_CODE (inner) == REG && REG_OK_FOR_INDEX_P (inner))
|
||||
return 1;
|
||||
if (GET_CODE (inner) == PLUS)
|
||||
{
|
||||
rtx plus_op0 = XEXP (inner, 0);
|
||||
if (GET_CODE (plus_op0) == REG && REG_OK_FOR_INDEX_P (plus_op0))
|
||||
{
|
||||
rtx plus_op1 = XEXP (inner, 1);
|
||||
if (GET_CODE (plus_op1) == CONST_INT
|
||||
&& INTVAL (plus_op1) >= 0
|
||||
&& INTVAL (plus_op1) <= 255)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Decide whether to output a conditional jump as a "Jump Conditional"
|
||||
or as a "Branch Conditional": */
|
||||
|
||||
int
|
||||
find_jmplbl (labelnum)
|
||||
int labelnum;
|
||||
{
|
||||
int i, found = 0;
|
||||
|
||||
for (i = 0; i <= jmplbl_ndx; i++)
|
||||
if (labelnum == jmplbl[i].num)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
if (found)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char *
|
||||
branch_or_jump (condition, targetlabel_number)
|
||||
const char *condition;
|
||||
int targetlabel_number;
|
||||
{
|
||||
static char buf[30];
|
||||
int index;
|
||||
|
||||
if ((index = find_jmplbl (targetlabel_number)) >= 0)
|
||||
if (program_counter - jmplbl[index].pc < 128)
|
||||
{
|
||||
sprintf (buf, "b%s %%l0", condition);
|
||||
return buf;
|
||||
}
|
||||
sprintf (buf, "jc %s,%%l0", condition);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
unsigned_comparison_operator (insn)
|
||||
rtx insn;
|
||||
{
|
||||
switch (GET_CODE (insn))
|
||||
{
|
||||
case GEU:
|
||||
case GTU:
|
||||
case LEU:
|
||||
case LTU:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
next_cc_user_is_unsigned (insn)
|
||||
rtx insn;
|
||||
{
|
||||
if ( !(insn = next_cc0_user (insn)))
|
||||
abort ();
|
||||
else if (GET_CODE (insn) == JUMP_INSN
|
||||
&& GET_CODE (PATTERN (insn)) == SET
|
||||
&& GET_CODE (SET_SRC (PATTERN (insn))) == IF_THEN_ELSE)
|
||||
return unsigned_comparison_operator (XEXP (SET_SRC (PATTERN (insn)), 0));
|
||||
else if (GET_CODE (insn) == INSN
|
||||
&& GET_CODE (PATTERN (insn)) == SET)
|
||||
return unsigned_comparison_operator (SET_SRC (PATTERN (insn)));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
||||
|
||||
static int addr_inc;
|
||||
|
||||
/* A C compound statement to output to stdio stream STREAM the
|
||||
assembler syntax for an instruction operand X. X is an RTL
|
||||
expression.
|
||||
|
||||
CODE is a value that can be used to specify one of several ways
|
||||
of printing the operand. It is used when identical operands
|
||||
must be printed differently depending on the context. CODE
|
||||
comes from the `%' specification that was used to request
|
||||
printing of the operand. If the specification was just `%DIGIT'
|
||||
then CODE is 0; if the specification was `%LTR DIGIT' then CODE
|
||||
is the ASCII code for LTR.
|
||||
|
||||
If X is a register, this macro should print the register's name.
|
||||
The names can be found in an array `reg_names' whose type is
|
||||
`char *[]'. `reg_names' is initialized from `REGISTER_NAMES'.
|
||||
|
||||
When the machine description has a specification `%PUNCT' (a `%'
|
||||
followed by a punctuation character), this macro is called with
|
||||
a null pointer for X and the punctuation character for CODE.
|
||||
|
||||
The 1750 specific codes are:
|
||||
'J' for the negative of a constant
|
||||
'Q' for printing addresses in B mode syntax
|
||||
'd' for the second register in a pair
|
||||
't' for the third register in a triple
|
||||
'b' for the bit number (using 1750 test bit convention)
|
||||
'B' for the bit number of the 1's complement (for bit clear)
|
||||
'w' for int - 16
|
||||
*/
|
||||
|
||||
void
|
||||
print_operand (file, x, letter)
|
||||
FILE *file;
|
||||
rtx x;
|
||||
int letter;
|
||||
{
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case REG:
|
||||
if (letter == 'd')
|
||||
fprintf (file, "%d", REGNO (x) + 1);
|
||||
else if (letter == 't')
|
||||
fprintf (file, "%d", REGNO (x) + 2);
|
||||
else
|
||||
fprintf (file, "%d", REGNO (x));
|
||||
break;
|
||||
|
||||
case SYMBOL_REF:
|
||||
fprintf (file, "%s", XSTR (x, 0));
|
||||
if (letter == 'A')
|
||||
fprintf (file, "+1");
|
||||
break;
|
||||
|
||||
case LABEL_REF:
|
||||
case CONST:
|
||||
case MEM:
|
||||
if (letter == 'Q')
|
||||
{
|
||||
rtx inner = XEXP (x, 0);
|
||||
switch (GET_CODE (inner))
|
||||
{
|
||||
case REG:
|
||||
fprintf (file, "r%d,0", REGNO (inner));
|
||||
break;
|
||||
case PLUS:
|
||||
fprintf (file, "r%d,%d", REGNO (XEXP (inner, 0)),
|
||||
INTVAL (XEXP (inner, 1)));
|
||||
break;
|
||||
default:
|
||||
fprintf (file, "[ill Q code=%d]", GET_CODE (inner));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
addr_inc = (letter == 'A' ? 1 : 0);
|
||||
output_address (XEXP (x, 0));
|
||||
}
|
||||
break;
|
||||
|
||||
case CONST_DOUBLE:
|
||||
{
|
||||
REAL_VALUE_TYPE r;
|
||||
char buf[30];
|
||||
|
||||
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
|
||||
REAL_VALUE_TO_DECIMAL (r, "%f", buf);
|
||||
|
||||
fputs (buf, file);
|
||||
}
|
||||
break;
|
||||
|
||||
case CONST_INT:
|
||||
if (letter == 'J')
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, -INTVAL (x));
|
||||
else if (letter == 'b')
|
||||
fprintf (file, "%d", which_bit (INTVAL (x)));
|
||||
else if (letter == 'B')
|
||||
fprintf (file, "%d", which_bit (~INTVAL (x)));
|
||||
else if (letter == 'w')
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) - 16);
|
||||
else
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
break;
|
||||
|
||||
case CODE_LABEL:
|
||||
fprintf (file, "L%d", XINT (x, 3));
|
||||
break;
|
||||
|
||||
case CALL:
|
||||
fprintf (file, "CALL nargs=");
|
||||
fprintf (file, HOST_PTR_PRINTF, (PTR) XEXP (x, 1));
|
||||
fprintf (file, ", func is either '%s' or '%s'",
|
||||
XSTR (XEXP (XEXP (x, 0), 1), 0), XSTR (XEXP (x, 0), 1));
|
||||
break;
|
||||
|
||||
case PLUS:
|
||||
{
|
||||
rtx op0 = XEXP (x, 0), op1 = XEXP (x, 1);
|
||||
int op0code = GET_CODE (op0), op1code = GET_CODE (op1);
|
||||
if (op1code == CONST_INT)
|
||||
switch (op0code)
|
||||
{
|
||||
case REG:
|
||||
fprintf (file, "%d,r%d ; p_o_PLUS for REG and CONST_INT",
|
||||
INTVAL (op1), REGNO (op0));
|
||||
break;
|
||||
case SYMBOL_REF:
|
||||
fprintf (file, "%d+%s", INTVAL (op1), XSTR (op0, 0));
|
||||
break;
|
||||
case MEM:
|
||||
fprintf (file, "%d,[mem:", INTVAL (op1));
|
||||
output_address (XEXP (op0, 0));
|
||||
fprintf (file, "] ;P_O plus");
|
||||
break;
|
||||
default:
|
||||
fprintf (file, "p_o_PLUS UFO, code=%d, with CONST=%d",
|
||||
(int) op0code, INTVAL (op1));
|
||||
}
|
||||
else if (op1code == SYMBOL_REF && op0code == REG)
|
||||
fprintf (file, "%s,r%d ; P_O: (plus reg sym)",
|
||||
XSTR (op1, 0), REGNO (op0));
|
||||
else
|
||||
fprintf (file, "p_o_+: op0code=%d, op1code=%d", op0code, op1code);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf (file, "p_o_UFO code=%d", GET_CODE (x));
|
||||
}
|
||||
|
||||
addr_inc = 0;
|
||||
}
|
||||
|
||||
void
|
||||
print_operand_address (file, addr)
|
||||
FILE *file;
|
||||
rtx addr;
|
||||
{
|
||||
switch (GET_CODE (addr))
|
||||
{
|
||||
case REG:
|
||||
fprintf (file, "%d,r%d ; P_O_A", addr_inc, REGNO (addr));
|
||||
break;
|
||||
case PLUS:
|
||||
{
|
||||
register rtx x = XEXP (addr, 0), y = XEXP (addr, 1);
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case REG:
|
||||
switch (GET_CODE (y))
|
||||
{
|
||||
case CONST:
|
||||
output_address (XEXP (y, 0));
|
||||
fprintf (file, ",r%d ;P_O_A reg + const expr", REGNO (x));
|
||||
break;
|
||||
case CONST_INT:
|
||||
fprintf (file, "%d,r%d", INTVAL (y) + addr_inc, REGNO (x));
|
||||
break;
|
||||
case SYMBOL_REF:
|
||||
fprintf (file, "%s", XSTR (y, 0));
|
||||
if (addr_inc)
|
||||
fprintf (file, "+%d", addr_inc);
|
||||
fprintf (file, ",r%d ; P_O_A reg + sym", REGNO (x));
|
||||
break;
|
||||
case LABEL_REF:
|
||||
output_address (XEXP (y, 0));
|
||||
fprintf (file, ",r%d ; P_O_A reg + label", REGNO (x));
|
||||
break;
|
||||
default:
|
||||
fprintf (file, "[P_O_A reg%d+UFO code=%d]",
|
||||
REGNO (x), GET_CODE (y));
|
||||
}
|
||||
break;
|
||||
case LABEL_REF:
|
||||
output_address (XEXP (x, 0));
|
||||
break;
|
||||
case SYMBOL_REF:
|
||||
switch (GET_CODE (y))
|
||||
{
|
||||
case CONST_INT:
|
||||
fprintf (file, "%d+%s", INTVAL (y) + addr_inc, XSTR (x, 0));
|
||||
break;
|
||||
case REG:
|
||||
fprintf (file, "%s,r%d ;P_O_A sym + reg",
|
||||
XSTR (x, 0), REGNO (y));
|
||||
break;
|
||||
default:
|
||||
fprintf (file, "P_O_A sym/lab+UFO[sym=%s,code(y)=%d]",
|
||||
XSTR (x, 0), GET_CODE (y));
|
||||
}
|
||||
break;
|
||||
case CONST:
|
||||
output_address (XEXP (x, 0));
|
||||
if (GET_CODE (y) == REG)
|
||||
fprintf (file, ",r%d ;P_O_A const + reg", REGNO (x));
|
||||
else
|
||||
fprintf (file, "P_O_A const+UFO code(y)=%d]", GET_CODE (y));
|
||||
break;
|
||||
case MEM:
|
||||
output_address (y);
|
||||
fprintf (file, ",[mem:");
|
||||
output_address (XEXP (x, 0));
|
||||
fprintf (file, "] ;P_O_A plus");
|
||||
break;
|
||||
default:
|
||||
fprintf (file, "P_O_A plus op1_UFO[code1=%d,code2=%d]",
|
||||
GET_CODE (x), GET_CODE (y));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CONST_INT:
|
||||
if (INTVAL (addr) < 0x10000 && INTVAL (addr) >= -0x10000)
|
||||
fprintf (file, "%d ; p_o_a const addr?!", INTVAL (addr));
|
||||
else
|
||||
{
|
||||
fprintf (file, "[p_o_a=ILLEGAL_CONST]");
|
||||
output_addr_const (file, addr);
|
||||
}
|
||||
break;
|
||||
case LABEL_REF:
|
||||
case SYMBOL_REF:
|
||||
fprintf (file, "%s", XSTR (addr, 0));
|
||||
if (addr_inc)
|
||||
fprintf (file, "+%d", addr_inc);
|
||||
break;
|
||||
case MEM:
|
||||
fprintf (file, "[memUFO:");
|
||||
output_address (XEXP (addr, 0));
|
||||
fprintf (file, "]");
|
||||
break;
|
||||
case CONST:
|
||||
output_address (XEXP (addr, 0));
|
||||
fprintf (file, " ;P_O_A const");
|
||||
break;
|
||||
case CODE_LABEL:
|
||||
fprintf (file, "L%d", XINT (addr, 3));
|
||||
break;
|
||||
default:
|
||||
fprintf (file, " p_o_a UFO, code=%d val=0x%x",
|
||||
(int) GET_CODE (addr), INTVAL (addr));
|
||||
break;
|
||||
}
|
||||
addr_inc = 0;
|
||||
}
|
||||
|
||||
/* Target hook for assembling integer objects. The 1750a version needs to
|
||||
keep track of how many bytes have been written. */
|
||||
|
||||
static bool
|
||||
assemble_integer_1750a (x, size, aligned_p)
|
||||
rtx x;
|
||||
unsigned int size;
|
||||
int aligned_p;
|
||||
{
|
||||
if (default_assemble_integer (x, size, aligned_p))
|
||||
{
|
||||
if (label_pending)
|
||||
label_pending = 0;
|
||||
datalbl[datalbl_ndx].size += size;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return non zero if the LS 16 bits of the given value has just one bit set,
|
||||
* otherwise return zero. Note this function may be used to detect one
|
||||
* bit clear by inverting the param.
|
||||
*/
|
||||
int
|
||||
one_bit_set_p (x)
|
||||
int x;
|
||||
{
|
||||
x &= 0xffff;
|
||||
return x && (x & (x - 1)) == 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the number of the least significant bit set, using the same
|
||||
* convention for bit numbering as in the MIL-STD-1750 sb instruction.
|
||||
*/
|
||||
static int
|
||||
which_bit (x)
|
||||
int x;
|
||||
{
|
||||
int b = 15;
|
||||
|
||||
while (b > 0 && (x & 1) == 0)
|
||||
{
|
||||
b--;
|
||||
x >>= 1;
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
/* Convert a REAL_VALUE_TYPE to the target float format:
|
||||
|
||||
MSB LSB MSB LSB
|
||||
------------------------------------------------------
|
||||
|S| Mantissa | Exponent |
|
||||
------------------------------------------------------
|
||||
0 1 23 24 31
|
||||
|
||||
*/
|
||||
|
||||
long
|
||||
real_value_to_target_single(in)
|
||||
REAL_VALUE_TYPE in;
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
struct {
|
||||
#if HOST_WORDS_BIG_ENDIAN
|
||||
unsigned int negative:1;
|
||||
unsigned int exponent:11;
|
||||
unsigned int mantissa0:20;
|
||||
unsigned int mantissa1:32;
|
||||
#else
|
||||
unsigned int mantissa1:32;
|
||||
unsigned int mantissa0:20;
|
||||
unsigned int exponent:11;
|
||||
unsigned int negative:1;
|
||||
#endif
|
||||
} s;
|
||||
} ieee;
|
||||
|
||||
unsigned int mant;
|
||||
int exp;
|
||||
|
||||
if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT)
|
||||
abort ();
|
||||
|
||||
ieee.d = in;
|
||||
|
||||
/* Don't bother with NaN, Inf, 0 special cases, since they'll be handled
|
||||
by the over/underflow code below. */
|
||||
exp = ieee.s.exponent - 0x3ff;
|
||||
mant = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29;
|
||||
|
||||
/* The sign is actually part of the mantessa. Since we're comming from
|
||||
IEEE we know that either bit 23 is set or we have a zero. */
|
||||
if (! ieee.s.negative)
|
||||
{
|
||||
mant >>= 1;
|
||||
exp += 1;
|
||||
}
|
||||
|
||||
/* Check for overflow. Crop to FLT_MAX. */
|
||||
if (exp > 127)
|
||||
{
|
||||
exp = 127;
|
||||
mant = (ieee.s.negative ? 0xffffff : 0x7fffff);
|
||||
}
|
||||
/* Underflow to zero. */
|
||||
else if (exp < -128)
|
||||
{
|
||||
exp = 0;
|
||||
mant = 0;
|
||||
}
|
||||
|
||||
return mant << 8 | (exp & 0xff);
|
||||
}
|
||||
|
||||
/* Convert a REAL_VALUE_TYPE to the target 1750a extended float format:
|
||||
|
||||
----------------------------------------------------
|
||||
| | Mantissa | | Mantissa |
|
||||
|S| MS |Exponent| LS |
|
||||
----------------------------------------------------
|
||||
0 1 23 24 31 32 47
|
||||
|
||||
*/
|
||||
|
||||
void
|
||||
real_value_to_target_double(in, out)
|
||||
REAL_VALUE_TYPE in;
|
||||
long out[];
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
struct {
|
||||
#if HOST_WORDS_BIG_ENDIAN
|
||||
unsigned int negative:1;
|
||||
unsigned int exponent:11;
|
||||
unsigned int mantissa0:20;
|
||||
unsigned int mantissa1:32;
|
||||
#else
|
||||
unsigned int mantissa1:32;
|
||||
unsigned int mantissa0:20;
|
||||
unsigned int exponent:11;
|
||||
unsigned int negative:1;
|
||||
#endif
|
||||
} s;
|
||||
} ieee;
|
||||
|
||||
unsigned int mant_h24, mant_l16;
|
||||
int exp;
|
||||
|
||||
if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT)
|
||||
abort ();
|
||||
|
||||
ieee.d = in;
|
||||
|
||||
/* Don't bother with NaN, Inf, 0 special cases, since they'll be handled
|
||||
by the over/underflow code below. */
|
||||
exp = ieee.s.exponent - 0x3ff;
|
||||
mant_h24 = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29;
|
||||
mant_l16 = (ieee.s.mantissa1 >> 13) & 0xffff;
|
||||
|
||||
/* The sign is actually part of the mantessa. Since we're comming from
|
||||
IEEE we know that either bit 23 is set or we have a zero. */
|
||||
if (! ieee.s.negative)
|
||||
{
|
||||
mant_l16 = mant_l16 >> 1 | (mant_h24 & 1) << 15;
|
||||
mant_h24 >>= 1;
|
||||
exp += 1;
|
||||
}
|
||||
|
||||
/* Check for overflow. Crop to DBL_MAX. */
|
||||
if (exp > 127)
|
||||
{
|
||||
exp = 127;
|
||||
mant_h24 = (ieee.s.negative ? 0xffffff : 0x7fffff);
|
||||
mant_l16 = 0xffff;
|
||||
}
|
||||
/* Underflow to zero. */
|
||||
else if (exp < -128)
|
||||
{
|
||||
exp = 0;
|
||||
mant_h24 = 0;
|
||||
mant_l16 = 0;
|
||||
}
|
||||
|
||||
out[0] = mant_h24 << 8 | (exp & 0xff);
|
||||
out[1] = mant_l16;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,158 +0,0 @@
|
||||
;; 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
|
||||
|
@ -1,65 +0,0 @@
|
||||
/* 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));
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
||||
/* 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"
|
@ -1,13 +0,0 @@
|
||||
# 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
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
# 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
|
@ -1,92 +0,0 @@
|
||||
/* 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
|
@ -1,46 +0,0 @@
|
||||
/* 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"
|
@ -1,33 +0,0 @@
|
||||
/* 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
|
@ -1,32 +0,0 @@
|
||||
/* 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
|
@ -1,66 +0,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
|
||||
|
@ -1,146 +0,0 @@
|
||||
/* 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
|
@ -1,107 +0,0 @@
|
||||
/* 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
|
@ -1,42 +0,0 @@
|
||||
/* 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 */
|
||||
|
@ -1,6 +0,0 @@
|
||||
# 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
|
@ -1,38 +0,0 @@
|
||||
/* 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 */
|
@ -1,692 +0,0 @@
|
||||
/* Subroutines for insn-output.c for Clipper
|
||||
Copyright (C) 1987, 1988, 1991, 1997, 1998, 1999, 2000, 2001
|
||||
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. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
#include "real.h"
|
||||
#include "insn-config.h"
|
||||
#include "conditions.h"
|
||||
#include "output.h"
|
||||
#include "insn-attr.h"
|
||||
#include "tree.h"
|
||||
#include "expr.h"
|
||||
#include "optabs.h"
|
||||
#include "libfuncs.h"
|
||||
#include "c-tree.h"
|
||||
#include "function.h"
|
||||
#include "flags.h"
|
||||
#include "recog.h"
|
||||
#include "tm_p.h"
|
||||
#include "target.h"
|
||||
#include "target-def.h"
|
||||
|
||||
static void clipper_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
static void clipper_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
static void clix_asm_out_constructor PARAMS ((rtx, int));
|
||||
static void clix_asm_out_destructor PARAMS ((rtx, int));
|
||||
|
||||
extern char regs_ever_live[];
|
||||
|
||||
extern int frame_pointer_needed;
|
||||
|
||||
static int frame_size;
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
#undef TARGET_ASM_ALIGNED_HI_OP
|
||||
#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
|
||||
|
||||
#undef TARGET_ASM_FUNCTION_PROLOGUE
|
||||
#define TARGET_ASM_FUNCTION_PROLOGUE clipper_output_function_prologue
|
||||
#undef TARGET_ASM_FUNCTION_EPILOGUE
|
||||
#define TARGET_ASM_FUNCTION_EPILOGUE clipper_output_function_epilogue
|
||||
|
||||
struct gcc_target targetm = TARGET_INITIALIZER;
|
||||
|
||||
/* Compute size of a clipper stack frame where 'lsize' is the required
|
||||
space for local variables. */
|
||||
|
||||
int
|
||||
clipper_frame_size (lsize)
|
||||
int lsize;
|
||||
{
|
||||
int i, size; /* total size of frame */
|
||||
int save_size;
|
||||
save_size = 0; /* compute size for reg saves */
|
||||
|
||||
for (i = 16; i < 32; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
save_size += 8;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
save_size += 4;
|
||||
|
||||
size = lsize + save_size;
|
||||
|
||||
size = (size + 7) & ~7; /* align to 64 Bit */
|
||||
return size;
|
||||
}
|
||||
|
||||
/* Prologue and epilogue output
|
||||
Function is entered with pc pushed, i.e. stack is 32 bit aligned
|
||||
|
||||
current_function_args_size == 0 means that the current function's args
|
||||
are passed totally in registers i.e fp is not used as ap.
|
||||
If frame_size is also 0 the current function does not push anything and
|
||||
can run with misaligned stack -> subq $4,sp / add $4,sp on entry and exit
|
||||
can be omitted. */
|
||||
|
||||
static void
|
||||
clipper_output_function_prologue (file, lsize)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT lsize; /* size for locals */
|
||||
{
|
||||
int i, offset;
|
||||
int size;
|
||||
|
||||
frame_size = size = clipper_frame_size (lsize);
|
||||
|
||||
if (frame_pointer_needed)
|
||||
{
|
||||
fputs ("\tpushw fp,sp\n", file);
|
||||
fputs ("\tmovw sp,fp\n", file);
|
||||
}
|
||||
else if (size != 0 || current_function_args_size != 0)
|
||||
{
|
||||
size += 4; /* keep stack aligned */
|
||||
frame_size = size; /* must push data or access args */
|
||||
}
|
||||
|
||||
if (size)
|
||||
{
|
||||
if (size < 16)
|
||||
fprintf (file, "\tsubq $%d,sp\n", size);
|
||||
else
|
||||
fprintf (file, "\tsubi $%d,sp\n", size);
|
||||
|
||||
/* register save slots are relative to sp, because we have small positive
|
||||
displacements and this works whether we have a frame pointer or not */
|
||||
|
||||
offset = 0;
|
||||
for (i = 16; i < 32; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
if (offset == 0)
|
||||
fprintf (file, "\tstord f%d,(sp)\n", i-16);
|
||||
else
|
||||
fprintf (file, "\tstord f%d,%d(sp)\n", i-16, offset);
|
||||
offset += 8;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
if (offset == 0)
|
||||
fprintf (file, "\tstorw r%d,(sp)\n", i);
|
||||
else
|
||||
fprintf (file, "\tstorw r%d,%d(sp)\n", i, offset);
|
||||
offset += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clipper_output_function_epilogue (file, size)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
|
||||
{
|
||||
int i, offset;
|
||||
|
||||
if (frame_pointer_needed)
|
||||
{
|
||||
offset = -frame_size;
|
||||
|
||||
for (i = 16; i < 32; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
fprintf (file, "\tloadd %d(fp),f%d\n", offset, i-16);
|
||||
offset += 8;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
fprintf (file, "\tloadw %d(fp),r%d\n", offset, i);
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
fputs ("\tmovw fp,sp\n\tpopw sp,fp\n\tret sp\n",
|
||||
file);
|
||||
}
|
||||
|
||||
else /* no frame pointer */
|
||||
{
|
||||
offset = 0;
|
||||
|
||||
for (i = 16; i < 32; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
if (offset == 0)
|
||||
fprintf (file, "\tloadd (sp),f%d\n", i-16);
|
||||
else
|
||||
fprintf (file, "\tloadd %d(sp),f%d\n", offset, i-16);
|
||||
offset += 8;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (regs_ever_live[i] && !call_used_regs[i])
|
||||
{
|
||||
if (offset == 0)
|
||||
fprintf (file, "\tloadw (sp),r%d\n", i);
|
||||
else
|
||||
fprintf (file, "\tloadw %d(sp),r%d\n", offset, i);
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
if (frame_size > 0)
|
||||
{
|
||||
if (frame_size < 16)
|
||||
fprintf (file, "\taddq $%d,sp\n", frame_size);
|
||||
else
|
||||
fprintf (file, "\taddi $%d,sp\n", frame_size);
|
||||
}
|
||||
|
||||
fputs ("\tret sp\n", file);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* blockmove
|
||||
*
|
||||
* clipper_movstr ()
|
||||
*/
|
||||
void
|
||||
clipper_movstr (operands)
|
||||
rtx *operands;
|
||||
{
|
||||
rtx dst,src,cnt,tmp,top,bottom=NULL_RTX,xops[3];
|
||||
int align;
|
||||
int fixed;
|
||||
|
||||
extern FILE *asm_out_file;
|
||||
|
||||
dst = operands[0];
|
||||
src = operands[1];
|
||||
/* don't change this operands[2]; gcc 2.3.3 doesn't honor clobber note */
|
||||
align = INTVAL (operands[3]);
|
||||
tmp = operands[4];
|
||||
cnt = operands[5];
|
||||
|
||||
if (GET_CODE (operands[2]) == CONST_INT) /* fixed size move */
|
||||
{
|
||||
if ((fixed = INTVAL (operands[2])) <= 0)
|
||||
abort ();
|
||||
|
||||
if (fixed <16)
|
||||
output_asm_insn ("loadq %2,%5", operands);
|
||||
else
|
||||
output_asm_insn ("loadi %2,%5", operands);
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed = 0;
|
||||
bottom = (rtx)gen_label_rtx (); /* need a bottom label */
|
||||
xops[0] = cnt; xops[1] = bottom;
|
||||
output_asm_insn ("movw %2,%5", operands); /* count is scratch reg 5 */
|
||||
output_asm_insn ("brle %l1", xops);
|
||||
}
|
||||
|
||||
|
||||
top = (rtx)gen_label_rtx (); /* top of loop label */
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (top));
|
||||
|
||||
|
||||
xops[0] = src; xops[1] = tmp; xops[2] = dst;
|
||||
|
||||
if (fixed && (align & 0x3) == 0) /* word aligned move with known size */
|
||||
{
|
||||
if (fixed >= 4)
|
||||
{
|
||||
rtx xops1[2];
|
||||
output_asm_insn(
|
||||
"loadw %a0,%1\n\taddq $4,%0\n\tstorw %1,%a2\n\taddq $4,%2",
|
||||
xops);
|
||||
|
||||
xops1[0] = cnt; xops1[1] = top;
|
||||
output_asm_insn ("subq $4,%0\n\tbrgt %l1", xops1);
|
||||
}
|
||||
|
||||
if (fixed & 0x2)
|
||||
{
|
||||
output_asm_insn ("loadh %a0,%1\n\tstorh %1,%a2", xops);
|
||||
if (fixed & 0x1)
|
||||
output_asm_insn ("loadb 2%a0,%1\n\tstorb %1,2%a2", xops);
|
||||
}
|
||||
else
|
||||
if (fixed & 0x1)
|
||||
output_asm_insn ("loadb %a0,%1\n\tstorb %1,%a2", xops);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_asm_insn(
|
||||
"loadb %a0,%1\n\taddq $1,%0\n\tstorb %1,%a2\n\taddq $1,%2",
|
||||
xops);
|
||||
|
||||
xops[0] = cnt; xops[1] = top;
|
||||
output_asm_insn ("subq $1,%0\n\tbrgt %l1", xops);
|
||||
}
|
||||
|
||||
if (fixed == 0)
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (bottom));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
print_operand_address (file, addr)
|
||||
FILE *file;
|
||||
register rtx addr;
|
||||
{
|
||||
rtx op0,op1;
|
||||
|
||||
switch (GET_CODE (addr))
|
||||
{
|
||||
case REG:
|
||||
fprintf (file, "(%s)", reg_names[REGNO (addr)]);
|
||||
break;
|
||||
|
||||
case PLUS:
|
||||
/* can be 'symbol + reg' or 'reg + reg' */
|
||||
|
||||
op0 = XEXP (addr, 0);
|
||||
op1 = XEXP (addr, 1);
|
||||
|
||||
if (GET_CODE (op0) == REG && GET_CODE (op1) == REG)
|
||||
{
|
||||
fprintf (file, "[%s](%s)",
|
||||
reg_names[REGNO (op0)], reg_names[REGNO (op1)]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (GET_CODE (op0) == REG && CONSTANT_ADDRESS_P (op1))
|
||||
{
|
||||
output_addr_const (file, op1);
|
||||
fprintf (file, "(%s)", reg_names[REGNO (op0)]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (GET_CODE (op1) == REG && CONSTANT_ADDRESS_P (op0))
|
||||
{
|
||||
output_addr_const (file, op0);
|
||||
fprintf (file, "(%s)", reg_names[REGNO (op1)]);
|
||||
break;
|
||||
}
|
||||
abort (); /* Oh no */
|
||||
|
||||
default:
|
||||
output_addr_const (file, addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
rev_cond_name (op)
|
||||
rtx op;
|
||||
{
|
||||
switch (GET_CODE (op))
|
||||
{
|
||||
case EQ:
|
||||
return "ne";
|
||||
case NE:
|
||||
return "eq";
|
||||
case LT:
|
||||
return "ge";
|
||||
case LE:
|
||||
return "gt";
|
||||
case GT:
|
||||
return "le";
|
||||
case GE:
|
||||
return "lt";
|
||||
case LTU:
|
||||
return "geu";
|
||||
case LEU:
|
||||
return "gtu";
|
||||
case GTU:
|
||||
return "leu";
|
||||
case GEU:
|
||||
return "ltu";
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Dump the argument register to the stack; return the location
|
||||
of the block. */
|
||||
|
||||
struct rtx_def *
|
||||
clipper_builtin_saveregs ()
|
||||
{
|
||||
rtx block, addr, r0_addr, r1_addr, f0_addr, f1_addr, mem;
|
||||
int set = get_varargs_alias_set ();
|
||||
|
||||
/* Allocate the save area for r0,r1,f0,f1 */
|
||||
|
||||
block = assign_stack_local (BLKmode, 6 * UNITS_PER_WORD, 2 * BITS_PER_WORD);
|
||||
|
||||
RTX_UNCHANGING_P (block) = 1;
|
||||
RTX_UNCHANGING_P (XEXP (block, 0)) = 1;
|
||||
|
||||
addr = XEXP (block, 0);
|
||||
|
||||
r0_addr = addr;
|
||||
r1_addr = plus_constant (addr, 4);
|
||||
f0_addr = plus_constant (addr, 8);
|
||||
f1_addr = plus_constant (addr, 16);
|
||||
|
||||
/* Store int regs */
|
||||
|
||||
mem = gen_rtx_MEM (SImode, r0_addr);
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (SImode, 0));
|
||||
|
||||
mem = gen_rtx_MEM (SImode, r1_addr);
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (SImode, 1));
|
||||
|
||||
/* Store float regs */
|
||||
|
||||
mem = gen_rtx_MEM (DFmode, f0_addr);
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (DFmode, 16));
|
||||
|
||||
mem = gen_rtx_MEM (DFmode, f1_addr);
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (DFmode, 17));
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
tree
|
||||
clipper_build_va_list ()
|
||||
{
|
||||
tree record, ap, reg, num;
|
||||
|
||||
/*
|
||||
struct
|
||||
{
|
||||
int __va_ap; // pointer to stack args
|
||||
void *__va_reg[4]; // pointer to r0,f0,r1,f1
|
||||
int __va_num; // number of args processed
|
||||
};
|
||||
*/
|
||||
|
||||
record = make_node (RECORD_TYPE);
|
||||
|
||||
num = build_decl (FIELD_DECL, get_identifier ("__va_num"),
|
||||
integer_type_node);
|
||||
DECL_FIELD_CONTEXT (num) = record;
|
||||
|
||||
reg = build_decl (FIELD_DECL, get_identifier ("__va_reg"),
|
||||
build_array_type (ptr_type_node,
|
||||
build_index_type (build_int_2 (3, 0))));
|
||||
DECL_FIELD_CONTEXT (reg) = record;
|
||||
TREE_CHAIN (reg) = num;
|
||||
|
||||
ap = build_decl (FIELD_DECL, get_identifier ("__va_ap"),
|
||||
integer_type_node);
|
||||
DECL_FIELD_CONTEXT (ap) = record;
|
||||
TREE_CHAIN (ap) = reg;
|
||||
|
||||
TYPE_FIELDS (record) = ap;
|
||||
layout_type (record);
|
||||
|
||||
return record;
|
||||
}
|
||||
|
||||
void
|
||||
clipper_va_start (stdarg_p, valist, nextarg)
|
||||
int stdarg_p;
|
||||
tree valist;
|
||||
rtx nextarg ATTRIBUTE_UNUSED;
|
||||
{
|
||||
tree ap_field, reg_field, num_field;
|
||||
tree t, u, save_area;
|
||||
|
||||
ap_field = TYPE_FIELDS (TREE_TYPE (valist));
|
||||
reg_field = TREE_CHAIN (ap_field);
|
||||
num_field = TREE_CHAIN (reg_field);
|
||||
|
||||
ap_field = build (COMPONENT_REF, TREE_TYPE (ap_field), valist, ap_field);
|
||||
reg_field = build (COMPONENT_REF, TREE_TYPE (reg_field), valist, reg_field);
|
||||
num_field = build (COMPONENT_REF, TREE_TYPE (num_field), valist, num_field);
|
||||
|
||||
/* Call __builtin_saveregs to save r0, r1, f0, and f1 in a block. */
|
||||
|
||||
save_area = make_tree (integer_type_node, expand_builtin_saveregs ());
|
||||
|
||||
/* Set __va_ap. */
|
||||
|
||||
t = make_tree (ptr_type_node, virtual_incoming_args_rtx);
|
||||
if (stdarg_p && current_function_args_info.size != 0)
|
||||
t = build (PLUS_EXPR, ptr_type_node, t,
|
||||
build_int_2 (current_function_args_info.size, 0));
|
||||
t = build (MODIFY_EXPR, TREE_TYPE (ap_field), ap_field, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
/* Set the four entries of __va_reg. */
|
||||
|
||||
t = build1 (NOP_EXPR, ptr_type_node, save_area);
|
||||
u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (0, 0));
|
||||
t = build (MODIFY_EXPR, ptr_type_node, u, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
t = fold (build (PLUS_EXPR, integer_type_node, save_area,
|
||||
build_int_2 (8, 0)));
|
||||
t = build1 (NOP_EXPR, ptr_type_node, save_area);
|
||||
u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (1, 0));
|
||||
t = build (MODIFY_EXPR, ptr_type_node, u, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
t = fold (build (PLUS_EXPR, integer_type_node, save_area,
|
||||
build_int_2 (4, 0)));
|
||||
t = build1 (NOP_EXPR, ptr_type_node, save_area);
|
||||
u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (2, 0));
|
||||
t = build (MODIFY_EXPR, ptr_type_node, u, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
t = fold (build (PLUS_EXPR, integer_type_node, save_area,
|
||||
build_int_2 (16, 0)));
|
||||
t = build1 (NOP_EXPR, ptr_type_node, save_area);
|
||||
u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (3, 0));
|
||||
t = build (MODIFY_EXPR, ptr_type_node, u, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
/* Set __va_num. */
|
||||
|
||||
t = build_int_2 (current_function_args_info.num, 0);
|
||||
t = build (MODIFY_EXPR, TREE_TYPE (num_field), num_field, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
}
|
||||
|
||||
rtx
|
||||
clipper_va_arg (valist, type)
|
||||
tree valist, type;
|
||||
{
|
||||
tree ap_field, reg_field, num_field;
|
||||
tree addr, t;
|
||||
HOST_WIDE_INT align;
|
||||
rtx addr_rtx, over_label = NULL_RTX, tr;
|
||||
|
||||
/*
|
||||
Integers:
|
||||
|
||||
if (VA.__va_num < 2)
|
||||
addr = VA.__va_reg[2 * VA.__va_num];
|
||||
else
|
||||
addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE);
|
||||
VA.__va_num++;
|
||||
|
||||
Floats:
|
||||
|
||||
if (VA.__va_num < 2)
|
||||
addr = VA.__va_reg[2 * VA.__va_num + 1];
|
||||
else
|
||||
addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE);
|
||||
VA.__va_num++;
|
||||
|
||||
Aggregates:
|
||||
|
||||
addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE);
|
||||
VA.__va_num++;
|
||||
*/
|
||||
|
||||
ap_field = TYPE_FIELDS (TREE_TYPE (valist));
|
||||
reg_field = TREE_CHAIN (ap_field);
|
||||
num_field = TREE_CHAIN (reg_field);
|
||||
|
||||
ap_field = build (COMPONENT_REF, TREE_TYPE (ap_field), valist, ap_field);
|
||||
reg_field = build (COMPONENT_REF, TREE_TYPE (reg_field), valist, reg_field);
|
||||
num_field = build (COMPONENT_REF, TREE_TYPE (num_field), valist, num_field);
|
||||
|
||||
addr_rtx = gen_reg_rtx (Pmode);
|
||||
|
||||
if (! AGGREGATE_TYPE_P (type))
|
||||
{
|
||||
tree inreg;
|
||||
rtx false_label;
|
||||
|
||||
over_label = gen_label_rtx ();
|
||||
false_label = gen_label_rtx ();
|
||||
|
||||
emit_cmp_and_jump_insns (expand_expr (num_field, NULL_RTX, 0,
|
||||
OPTAB_LIB_WIDEN),
|
||||
GEN_INT (2), GE, const0_rtx,
|
||||
TYPE_MODE (TREE_TYPE (num_field)),
|
||||
TREE_UNSIGNED (num_field), false_label);
|
||||
|
||||
inreg = fold (build (MULT_EXPR, integer_type_node, num_field,
|
||||
build_int_2 (2, 0)));
|
||||
if (FLOAT_TYPE_P (type))
|
||||
inreg = fold (build (PLUS_EXPR, integer_type_node, inreg,
|
||||
build_int_2 (1, 0)));
|
||||
inreg = fold (build (ARRAY_REF, ptr_type_node, reg_field, inreg));
|
||||
|
||||
tr = expand_expr (inreg, addr_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
if (tr != addr_rtx)
|
||||
emit_move_insn (addr_rtx, tr);
|
||||
|
||||
emit_jump_insn (gen_jump (over_label));
|
||||
emit_barrier ();
|
||||
emit_label (false_label);
|
||||
}
|
||||
|
||||
/* Round to alignment of `type', or at least integer alignment. */
|
||||
|
||||
align = TYPE_ALIGN (type);
|
||||
if (align < TYPE_ALIGN (integer_type_node))
|
||||
align = TYPE_ALIGN (integer_type_node);
|
||||
align /= BITS_PER_UNIT;
|
||||
|
||||
addr = fold (build (PLUS_EXPR, ptr_type_node, ap_field,
|
||||
build_int_2 (align-1, 0)));
|
||||
addr = fold (build (BIT_AND_EXPR, ptr_type_node, addr,
|
||||
build_int_2 (-align, -1)));
|
||||
addr = save_expr (addr);
|
||||
|
||||
tr = expand_expr (addr, addr_rtx, Pmode, EXPAND_NORMAL);
|
||||
if (tr != addr_rtx)
|
||||
emit_move_insn (addr_rtx, tr);
|
||||
|
||||
t = build (MODIFY_EXPR, TREE_TYPE (ap_field), ap_field,
|
||||
build (PLUS_EXPR, TREE_TYPE (ap_field),
|
||||
addr, build_int_2 (int_size_in_bytes (type), 0)));
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
if (over_label)
|
||||
emit_label (over_label);
|
||||
|
||||
t = build (MODIFY_EXPR, TREE_TYPE (num_field), num_field,
|
||||
build (PLUS_EXPR, TREE_TYPE (num_field),
|
||||
num_field, build_int_2 (1, 0)));
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
return addr_rtx;
|
||||
}
|
||||
|
||||
/* Return truth value of whether OP can be used as an word register
|
||||
operand. Reject (SUBREG:SI (REG:SF )) */
|
||||
|
||||
int
|
||||
int_reg_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
return (register_operand (op, mode) &&
|
||||
(GET_CODE (op) != SUBREG ||
|
||||
GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) == MODE_INT));
|
||||
}
|
||||
|
||||
/* Return truth value of whether OP can be used as a float register
|
||||
operand. Reject (SUBREG:SF (REG:SI )) )) */
|
||||
|
||||
int
|
||||
fp_reg_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
return (register_operand (op, mode) &&
|
||||
(GET_CODE (op) != SUBREG ||
|
||||
GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) == MODE_FLOAT));
|
||||
}
|
||||
|
||||
static void
|
||||
clix_asm_out_constructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
{
|
||||
init_section ();
|
||||
fputs ("\tloada ", asm_out_file);
|
||||
assemble_name (asm_out_file, XSTR (symbol, 0));
|
||||
fputs (",r0\n\tsubq $8,sp\n\tstorw r0,(sp)\n", asm_out_file);
|
||||
}
|
||||
|
||||
static void
|
||||
clix_asm_out_destructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
{
|
||||
fini_section ();
|
||||
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
|
||||
assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,125 +0,0 @@
|
||||
/* 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 */ \
|
||||
}
|
||||
|
||||
|
@ -1,50 +0,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));
|
@ -1,792 +0,0 @@
|
||||
/* Subroutines for insn-output.c for Convex.
|
||||
Copyright (C) 1988, 1993, 1994, 1997, 1998, 1999, 2000, 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.
|
||||
|
||||
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 "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
#include "real.h"
|
||||
#include "insn-config.h"
|
||||
#include "conditions.h"
|
||||
#include "insn-attr.h"
|
||||
#include "output.h"
|
||||
#include "function.h"
|
||||
#include "expr.h"
|
||||
#include "tm_p.h"
|
||||
#include "target.h"
|
||||
#include "target-def.h"
|
||||
|
||||
/* Tables used in convex.h */
|
||||
|
||||
char regno_ok_for_index_p_base[1 + LAST_VIRTUAL_REGISTER + 1];
|
||||
enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
|
||||
enum reg_class reg_class_from_letter[256];
|
||||
|
||||
/* Target cpu index. */
|
||||
|
||||
int target_cpu;
|
||||
|
||||
/* Boolean to keep track of whether the current section is .text or not.
|
||||
Used by .align handler in convex.h. */
|
||||
|
||||
int current_section_is_text;
|
||||
|
||||
/* Communication between output_compare and output_condjump. */
|
||||
|
||||
static rtx cmp_operand0, cmp_operand1;
|
||||
static char cmp_modech;
|
||||
|
||||
/* Forwards */
|
||||
|
||||
#if 0
|
||||
static rtx frame_argblock;
|
||||
static int frame_argblock_size;
|
||||
static rtx convert_arg_pushes ();
|
||||
#endif
|
||||
static void expand_movstr_call PARAMS ((rtx *));
|
||||
static void convex_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
static void convex_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
static int convex_adjust_cost PARAMS ((rtx, rtx, rtx, int));
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
#undef TARGET_ASM_BYTE_OP
|
||||
#define TARGET_ASM_BYTE_OP "\tds.b\t"
|
||||
#undef TARGET_ASM_ALIGNED_HI_OP
|
||||
#define TARGET_ASM_ALIGNED_HI_OP "\tds.h\t"
|
||||
#undef TARGET_ASM_ALIGNED_SI_OP
|
||||
#define TARGET_ASM_ALIGNED_SI_OP "\tds.w\t"
|
||||
|
||||
#undef TARGET_ASM_FUNCTION_PROLOGUE
|
||||
#define TARGET_ASM_FUNCTION_PROLOGUE convex_output_function_prologue
|
||||
#undef TARGET_ASM_FUNCTION_EPILOGUE
|
||||
#define TARGET_ASM_FUNCTION_EPILOGUE convex_output_function_epilogue
|
||||
#undef TARGET_SCHED_ADJUST_COST
|
||||
#define TARGET_SCHED_ADJUST_COST convex_adjust_cost
|
||||
|
||||
struct gcc_target targetm = TARGET_INITIALIZER;
|
||||
|
||||
/* 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
|
||||
convex_output_function_prologue (file, size)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT size;
|
||||
{
|
||||
size = ((size) + 7) & -8;
|
||||
if (size)
|
||||
{
|
||||
fprintf (file, "\tsub.w #");
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
|
||||
fprintf (file, ",sp\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* 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
|
||||
convex_output_function_epilogue (file, size)
|
||||
FILE *file;
|
||||
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* Follow function with a zero to stop c34 icache prefetching. */
|
||||
fprintf (file, "\tds.h 0\n");
|
||||
}
|
||||
|
||||
/* Adjust the cost of dependences. */
|
||||
static int
|
||||
convex_adjust_cost (insn, link, dep, cost)
|
||||
rtx insn;
|
||||
rtx link;
|
||||
rtx dep;
|
||||
int cost;
|
||||
{
|
||||
/* Antidependencies don't block issue. */
|
||||
if (REG_NOTE_KIND (link) != 0)
|
||||
cost = 0;
|
||||
/* C38 situations where delay depends on context */
|
||||
else if (TARGET_C38
|
||||
&& GET_CODE (PATTERN (insn)) == SET
|
||||
&& GET_CODE (PATTERN (dep)) == SET)
|
||||
{
|
||||
enum attr_type insn_type = get_attr_type (insn);
|
||||
enum attr_type dep_type = get_attr_type (dep);
|
||||
/* index register must be ready one cycle early */
|
||||
if (insn_type == TYPE_MLDW || insn_type == TYPE_MLDL
|
||||
|| (insn_type == TYPE_MST
|
||||
&& reg_mentioned_p (SET_DEST (PATTERN (dep)),
|
||||
SET_SRC (PATTERN (insn)))))
|
||||
cost += 1;
|
||||
/* alu forwarding off alu takes two */
|
||||
if (dep_type == TYPE_ALU
|
||||
&& insn_type != TYPE_ALU
|
||||
&& ! (insn_type == TYPE_MST
|
||||
&& SET_DEST (PATTERN (dep)) == SET_SRC (PATTERN (insn))))
|
||||
cost += 1;
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Here from OVERRIDE_OPTIONS at startup. Initialize constant tables. */
|
||||
|
||||
void
|
||||
init_convex ()
|
||||
{
|
||||
int regno;
|
||||
|
||||
/* Set A and S reg classes. */
|
||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
|
||||
if (A_REGNO_P (regno))
|
||||
{
|
||||
regno_ok_for_index_p[regno] = 1;
|
||||
regno_reg_class[regno] = INDEX_REGS;
|
||||
}
|
||||
else
|
||||
{
|
||||
regno_ok_for_index_p[regno] = 0;
|
||||
regno_reg_class[regno] = S_REGS;
|
||||
}
|
||||
|
||||
/* Can't index off the stack pointer, register 0. */
|
||||
regno_ok_for_index_p[STACK_POINTER_REGNUM] = 0;
|
||||
regno_reg_class[STACK_POINTER_REGNUM] = SP_REGS;
|
||||
|
||||
/* Can't index off aliases of the stack pointer. */
|
||||
regno_ok_for_index_p[VIRTUAL_INCOMING_ARGS_REGNUM] = 1;
|
||||
regno_ok_for_index_p[VIRTUAL_STACK_VARS_REGNUM] = 1;
|
||||
regno_ok_for_index_p[VIRTUAL_STACK_DYNAMIC_REGNUM] = 0;
|
||||
regno_ok_for_index_p[VIRTUAL_OUTGOING_ARGS_REGNUM] = 0;
|
||||
|
||||
/* Can't index off hard reg -1 == pseudos not assigned */
|
||||
regno_ok_for_index_p[-1] = 0;
|
||||
|
||||
/* Set reg class letters */
|
||||
reg_class_from_letter['a'] = A_REGS;
|
||||
reg_class_from_letter['A'] = INDEX_REGS;
|
||||
reg_class_from_letter['d'] = S_REGS;
|
||||
|
||||
/* Turn off floating point exception enables in the psw. */
|
||||
psw_disable_float ();
|
||||
}
|
||||
|
||||
void
|
||||
psw_disable_float ()
|
||||
{
|
||||
#if __convex__ && __GNUC__
|
||||
register int *p;
|
||||
asm ("mov fp,%0" : "=a" (p));
|
||||
while (p)
|
||||
{
|
||||
p[1] &= ~0x1000c400;
|
||||
p = (int *) p[2];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Here to output code for a compare insn. Output nothing, just
|
||||
record the operands and their mode. */
|
||||
|
||||
const char *
|
||||
output_cmp (operand0, operand1, modech)
|
||||
rtx operand0, operand1;
|
||||
int modech;
|
||||
{
|
||||
cmp_operand0 = operand0;
|
||||
cmp_operand1 = operand1;
|
||||
cmp_modech = modech;
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Output code for a conditional jump. The preceding instruction
|
||||
is necessarily a compare. Output two instructions, for example
|
||||
eq.w a1,a2
|
||||
jbra.t L5
|
||||
for
|
||||
(cmpsi a1 a2)
|
||||
(beq L5)
|
||||
*/
|
||||
|
||||
const char *
|
||||
output_condjump (label, cond, jbr_sense)
|
||||
rtx label;
|
||||
const char *cond;
|
||||
int jbr_sense;
|
||||
{
|
||||
rtx operands[3];
|
||||
char cmp_op[4];
|
||||
char buf[80];
|
||||
char jbr_regch;
|
||||
|
||||
strcpy (cmp_op, cond);
|
||||
|
||||
/* [BL] mean the value is being compared against immediate 0.
|
||||
Use neg.x, which produces the same carry that eq.x #0 would if it
|
||||
existed. In this case operands[1] is a scratch register, not a
|
||||
compare operand. */
|
||||
|
||||
if (cmp_modech == 'B' || cmp_modech == 'L')
|
||||
{
|
||||
cmp_modech = cmp_modech - 'A' + 'a';
|
||||
strcpy (cmp_op, "neg");
|
||||
}
|
||||
|
||||
/* [WH] mean the value being compared resulted from "add.[wh] #-1,rk"
|
||||
when rk was nonnegative -- we can omit equality compares against -1
|
||||
or inequality compares against 0. */
|
||||
|
||||
else if (cmp_modech == 'W' || cmp_modech == 'H')
|
||||
{
|
||||
if (! strcmp (cmp_op, "eq") && cmp_operand1 == constm1_rtx)
|
||||
jbr_sense ^= 't' ^ 'f';
|
||||
else if (! strcmp (cmp_op, "lt") && cmp_operand1 == const0_rtx)
|
||||
;
|
||||
else
|
||||
cmp_modech = cmp_modech - 'A' + 'a';
|
||||
}
|
||||
|
||||
/* Constant must be first; swap operands if necessary.
|
||||
If lt, le, ltu, leu are swapped, change to le, lt, leu, ltu
|
||||
and reverse the sense of the jump. */
|
||||
|
||||
if (! REG_P (cmp_operand1))
|
||||
{
|
||||
operands[0] = cmp_operand1;
|
||||
operands[1] = cmp_operand0;
|
||||
if (cmp_op[0] == 'l')
|
||||
{
|
||||
cmp_op[1] ^= 'e' ^ 't';
|
||||
jbr_sense ^= 't' ^ 'f';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
operands[0] = cmp_operand0;
|
||||
operands[1] = cmp_operand1;
|
||||
}
|
||||
|
||||
operands[2] = label;
|
||||
|
||||
if (S_REG_P (operands[1]))
|
||||
jbr_regch = 's';
|
||||
else if (A_REG_P (operands[1]))
|
||||
jbr_regch = 'a';
|
||||
else
|
||||
abort ();
|
||||
|
||||
if (cmp_modech == 'W' || cmp_modech == 'H')
|
||||
sprintf (buf, "jbr%c.%c %%l2", jbr_regch, jbr_sense);
|
||||
else
|
||||
sprintf (buf, "%s.%c %%0,%%1\n\tjbr%c.%c %%l2",
|
||||
cmp_op, cmp_modech, jbr_regch, jbr_sense);
|
||||
output_asm_insn (buf, operands);
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Return 1 if OP is valid for cmpsf.
|
||||
In IEEE mode, +/- zero compares are not handled by
|
||||
the immediate versions of eq.s and on some machines, lt.s, and le.s.
|
||||
So disallow 0.0 as the immediate operand of xx.s compares in IEEE mode. */
|
||||
|
||||
int
|
||||
nonmemory_cmpsf_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
#if _IEEE_FLOAT_
|
||||
if (op == CONST0_RTX (SFmode))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return nonmemory_operand (op, mode);
|
||||
}
|
||||
|
||||
/* Convex /bin/as does not like unary minus in some contexts.
|
||||
Simplify CONST addresses to remove it. */
|
||||
|
||||
rtx
|
||||
simplify_for_convex (x)
|
||||
rtx x;
|
||||
{
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case MINUS:
|
||||
if (GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||
&& INTVAL (XEXP (x, 1)) < 0)
|
||||
{
|
||||
PUT_CODE (x, PLUS);
|
||||
XEXP (x, 1) = GEN_INT (- INTVAL (XEXP (x, 1)));
|
||||
}
|
||||
break;
|
||||
|
||||
case CONST:
|
||||
return simplify_for_convex (XEXP (x, 0));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
/* Routines to separate CONST_DOUBLEs into component parts. */
|
||||
|
||||
int
|
||||
const_double_high_int (x)
|
||||
rtx x;
|
||||
{
|
||||
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
|
||||
return CONST_DOUBLE_LOW (x);
|
||||
else
|
||||
return CONST_DOUBLE_HIGH (x);
|
||||
}
|
||||
|
||||
int
|
||||
const_double_low_int (x)
|
||||
rtx x;
|
||||
{
|
||||
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
|
||||
return CONST_DOUBLE_HIGH (x);
|
||||
else
|
||||
return CONST_DOUBLE_LOW (x);
|
||||
}
|
||||
|
||||
/* Inline block copy. */
|
||||
|
||||
void
|
||||
expand_movstr (operands)
|
||||
rtx *operands;
|
||||
{
|
||||
rtx dest = operands[0];
|
||||
rtx src = operands[1];
|
||||
int align = INTVAL (operands[3]);
|
||||
int nregs, maxsize;
|
||||
unsigned len;
|
||||
enum machine_mode mode;
|
||||
rtx reg, load, store, prev_store, prev_store_2;
|
||||
int size;
|
||||
|
||||
/* Decide how many regs to use, depending on load latency, and what
|
||||
size pieces to move, depending on whether machine does unaligned
|
||||
loads and stores efficiently. */
|
||||
|
||||
if (TARGET_C1)
|
||||
{
|
||||
/* ld.l latency is 4, no alignment problems. */
|
||||
nregs = 3, maxsize = 8;
|
||||
}
|
||||
else if (TARGET_C2)
|
||||
{
|
||||
/* loads are latency 2 if we avoid ld.l not at least word aligned. */
|
||||
if (align >= 4)
|
||||
nregs = 2, maxsize = 8;
|
||||
else
|
||||
nregs = 2, maxsize = 4;
|
||||
}
|
||||
else if (TARGET_C34)
|
||||
{
|
||||
/* latency is 4 if aligned, horrible if not. */
|
||||
nregs = 3, maxsize = align;
|
||||
}
|
||||
else if (TARGET_C38)
|
||||
{
|
||||
/* latency is 2 if at least word aligned, 3 or 4 if unaligned. */
|
||||
if (align >= 4)
|
||||
nregs = 2, maxsize = 8;
|
||||
else
|
||||
nregs = 3, maxsize = 8;
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
|
||||
/* Caller is not necessarily prepared for us to fail in this
|
||||
expansion. So fall back by generating memcpy call here. */
|
||||
|
||||
if (GET_CODE (operands[2]) != CONST_INT
|
||||
|| (len = INTVAL (operands[2])) > (unsigned) 32 * maxsize)
|
||||
{
|
||||
expand_movstr_call (operands);
|
||||
return;
|
||||
}
|
||||
|
||||
reg = 0;
|
||||
prev_store = prev_store_2 = 0;
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
if (len >= 8 && maxsize >= 8)
|
||||
mode = DImode;
|
||||
else if (len >= 4 && maxsize >= 4)
|
||||
mode = SImode;
|
||||
else if (len >= 2 && maxsize >= 2)
|
||||
mode = HImode;
|
||||
else
|
||||
mode = QImode;
|
||||
|
||||
/* If no temp pseudo to reuse, or not the right mode, make one */
|
||||
if (! reg || GET_MODE (reg) != mode)
|
||||
reg = gen_reg_rtx (mode);
|
||||
|
||||
/* Get src and dest in the right mode */
|
||||
if (GET_MODE (src) != mode)
|
||||
{
|
||||
src = adjust_address (src, mode, 0);
|
||||
dest = adjust_address (dest, mode, 0);
|
||||
}
|
||||
|
||||
/* Make load and store patterns for this piece */
|
||||
load = gen_rtx_SET (VOIDmode, reg, src);
|
||||
store = gen_rtx_SET (VOIDmode, dest, reg);
|
||||
|
||||
/* Emit the load and the store from last time.
|
||||
When we emit a store, we can reuse its temp reg. */
|
||||
emit_insn (load);
|
||||
if (prev_store)
|
||||
{
|
||||
reg = SET_SRC (prev_store);
|
||||
emit_insn (prev_store);
|
||||
}
|
||||
else
|
||||
reg = 0;
|
||||
|
||||
/* Queue up the store, for next time or the time after that. */
|
||||
if (nregs == 2)
|
||||
prev_store = store;
|
||||
else
|
||||
prev_store = prev_store_2, prev_store_2 = store;
|
||||
|
||||
/* Advance to next piece. */
|
||||
size = GET_MODE_SIZE (mode);
|
||||
src = adjust_address (src, mode, size);
|
||||
dest = adjust_address (dest, mode, size);
|
||||
len -= size;
|
||||
}
|
||||
|
||||
/* Finally, emit the last stores. */
|
||||
if (prev_store)
|
||||
emit_insn (prev_store);
|
||||
if (prev_store_2)
|
||||
emit_insn (prev_store_2);
|
||||
}
|
||||
|
||||
static void
|
||||
expand_movstr_call (operands)
|
||||
rtx *operands;
|
||||
{
|
||||
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0,
|
||||
VOIDmode, 3,
|
||||
XEXP (operands[0], 0), Pmode,
|
||||
XEXP (operands[1], 0), Pmode,
|
||||
convert_to_mode (TYPE_MODE (sizetype), operands[2],
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
}
|
||||
|
||||
#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
|
||||
#define MAX_FLOAT "3.4028234663852886e+38"
|
||||
#define MIN_FLOAT "1.1754943508222875e-38"
|
||||
#else
|
||||
#define MAX_FLOAT "1.7014117331926443e+38"
|
||||
#define MIN_FLOAT "2.9387358770557188e-39"
|
||||
#endif
|
||||
|
||||
int
|
||||
check_float_value (mode, dp, overflow)
|
||||
enum machine_mode mode;
|
||||
REAL_VALUE_TYPE *dp;
|
||||
int overflow;
|
||||
{
|
||||
REAL_VALUE_TYPE d = *dp;
|
||||
REAL_VALUE_TYPE maxfloat = REAL_VALUE_ATOF (MAX_FLOAT, mode);
|
||||
REAL_VALUE_TYPE minfloat = REAL_VALUE_ATOF (MIN_FLOAT, mode);
|
||||
REAL_VALUE_TYPE neg_maxfloat = REAL_VALUE_NEGATE (maxfloat);
|
||||
REAL_VALUE_TYPE neg_minfloat = REAL_VALUE_NEGATE (minfloat);
|
||||
|
||||
if (overflow)
|
||||
{
|
||||
*dp = maxfloat;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (mode == SFmode)
|
||||
{
|
||||
if (REAL_VALUES_LESS (maxfloat, d))
|
||||
{
|
||||
*dp = maxfloat;
|
||||
return 1;
|
||||
}
|
||||
else if (REAL_VALUES_LESS (d, neg_maxfloat))
|
||||
{
|
||||
*dp = neg_maxfloat;
|
||||
return 1;
|
||||
}
|
||||
else if ((REAL_VALUES_LESS (dconst0, d)
|
||||
&& REAL_VALUES_LESS (d, minfloat))
|
||||
|| (REAL_VALUES_LESS (d, dconst0)
|
||||
&& REAL_VALUES_LESS (neg_minfloat, d)))
|
||||
{
|
||||
*dp = dconst0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Output the label at the start of a function.
|
||||
Precede it with the number of formal args so debuggers will have
|
||||
some idea of how many args to print. */
|
||||
|
||||
void
|
||||
asm_declare_function_name (file, name, decl)
|
||||
FILE *file;
|
||||
const char *name;
|
||||
tree decl;
|
||||
{
|
||||
int nargs = list_length (DECL_ARGUMENTS (decl));
|
||||
|
||||
const char *p;
|
||||
char c;
|
||||
static char vers[4];
|
||||
int i;
|
||||
|
||||
p = version_string;
|
||||
for (i = 0; i < 3; ) {
|
||||
c = *p;
|
||||
if (ISDIGIT (c))
|
||||
vers[i++] = c;
|
||||
if (c == 0 || c == ' ')
|
||||
vers[i++] = '0';
|
||||
else
|
||||
p++;
|
||||
}
|
||||
fprintf (file, "\tds.b \"g%s\"\n", vers);
|
||||
|
||||
if (nargs < 100)
|
||||
fprintf (file, "\tds.b \"+%02d\\0\"\n", nargs);
|
||||
else
|
||||
fprintf (file, "\tds.b \"+00\\0\"\n");
|
||||
|
||||
ASM_OUTPUT_LABEL (file, name);
|
||||
}
|
||||
|
||||
/* Print an instruction operand X on file FILE.
|
||||
CODE is the code from the %-spec that requested printing this operand;
|
||||
if `%z3' was used to print operand 3, then CODE is 'z'. */
|
||||
/* Convex codes:
|
||||
%u prints a CONST_DOUBLE's high word
|
||||
%v prints a CONST_DOUBLE's low word
|
||||
%z prints a CONST_INT shift count as a multiply operand -- viz. 1 << n.
|
||||
*/
|
||||
|
||||
void
|
||||
print_operand (file, x, code)
|
||||
FILE *file;
|
||||
rtx x;
|
||||
int code;
|
||||
{
|
||||
long u[2];
|
||||
REAL_VALUE_TYPE d;
|
||||
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case REG:
|
||||
fprintf (file, "%s", reg_names[REGNO (x)]);
|
||||
break;
|
||||
|
||||
case MEM:
|
||||
output_address (XEXP (x, 0));
|
||||
break;
|
||||
|
||||
case CONST_DOUBLE:
|
||||
REAL_VALUE_FROM_CONST_DOUBLE (d, x);
|
||||
switch (GET_MODE (x)) {
|
||||
case DFmode:
|
||||
REAL_VALUE_TO_TARGET_DOUBLE (d, u);
|
||||
if (code == 'u')
|
||||
fprintf (file, "#%#lx", u[0]);
|
||||
else if (code == 'v')
|
||||
fprintf (file, "#%#lx", u[1]);
|
||||
else
|
||||
outfloat (file, d, "%.17e", "#", "");
|
||||
break;
|
||||
case SFmode:
|
||||
outfloat (file, d, "%.9e", "#", "");
|
||||
break;
|
||||
default:
|
||||
if (code == 'u')
|
||||
{
|
||||
fprintf (file, "#");
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_HIGH (x));
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (file, "#");
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (code == 'z')
|
||||
{
|
||||
if (GET_CODE (x) != CONST_INT)
|
||||
abort ();
|
||||
fprintf (file, "#%d", 1 << INTVAL (x));
|
||||
}
|
||||
else
|
||||
{
|
||||
putc ('#', file);
|
||||
output_addr_const (file, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Print a memory operand whose address is X, on file FILE. */
|
||||
|
||||
void
|
||||
print_operand_address (file, addr)
|
||||
FILE *file;
|
||||
rtx addr;
|
||||
{
|
||||
rtx index = 0;
|
||||
rtx offset = 0;
|
||||
|
||||
if (GET_CODE (addr) == MEM)
|
||||
{
|
||||
fprintf (file, "@");
|
||||
addr = XEXP (addr, 0);
|
||||
}
|
||||
|
||||
switch (GET_CODE (addr))
|
||||
{
|
||||
case REG:
|
||||
index = addr;
|
||||
break;
|
||||
|
||||
case PLUS:
|
||||
index = XEXP (addr, 0);
|
||||
if (REG_P (index))
|
||||
offset = XEXP (addr, 1);
|
||||
else
|
||||
{
|
||||
offset = XEXP (addr, 0);
|
||||
index = XEXP (addr, 1);
|
||||
if (! REG_P (index))
|
||||
abort ();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
offset = addr;
|
||||
break;
|
||||
}
|
||||
|
||||
if (offset)
|
||||
output_addr_const (file, offset);
|
||||
|
||||
if (index)
|
||||
fprintf (file, "(%s)", reg_names[REGNO (index)]);
|
||||
}
|
||||
|
||||
/* Output a float to FILE, value VALUE, format FMT, preceded by PFX
|
||||
and followed by SFX. */
|
||||
|
||||
void
|
||||
outfloat (file, value, fmt, pfx, sfx)
|
||||
FILE *file;
|
||||
REAL_VALUE_TYPE value;
|
||||
const char *fmt, *pfx, *sfx;
|
||||
{
|
||||
char buf[64];
|
||||
fputs (pfx, file);
|
||||
REAL_VALUE_TO_DECIMAL (value, fmt, buf);
|
||||
fputs (buf, file);
|
||||
fputs (sfx, file);
|
||||
}
|
||||
|
||||
/* Here during RTL generation of return. If we are at the final return
|
||||
in a function, go through the function and replace pushes with stores
|
||||
into a frame arg block. This is similar to what ACCUMULATE_OUTGOING_ARGS
|
||||
does, but we must index off the frame pointer, not the stack pointer,
|
||||
and the calling sequence does not require the arg block to be at the
|
||||
top of the stack. */
|
||||
|
||||
void
|
||||
replace_arg_pushes ()
|
||||
{
|
||||
/* Doesn't work yet. */
|
||||
}
|
||||
|
||||
/* Output the insns needed to do a call. operands[] are
|
||||
0 - MEM, the place to call
|
||||
1 - CONST_INT, the number of bytes in the arg list
|
||||
2 - CONST_INT, the number of arguments
|
||||
3 - CONST_INT, the number of bytes to pop
|
||||
4 - address of the arg list.
|
||||
*/
|
||||
|
||||
const char *
|
||||
output_call (insn, operands)
|
||||
rtx insn ATTRIBUTE_UNUSED, *operands;
|
||||
{
|
||||
if (operands[4] == stack_pointer_rtx)
|
||||
output_asm_insn ("mov sp,ap", operands);
|
||||
else
|
||||
abort ();
|
||||
|
||||
if (TARGET_ARGCOUNT)
|
||||
output_asm_insn ("pshea %a2", operands);
|
||||
|
||||
output_asm_insn ("calls %0", operands);
|
||||
|
||||
output_asm_insn ("ld.w 12(fp),ap", operands);
|
||||
|
||||
if (operands[4] == stack_pointer_rtx && operands[3] != const0_rtx)
|
||||
output_asm_insn ("add.w %3,sp", operands);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/* Here after reloading, before the second scheduling pass. */
|
||||
|
||||
void
|
||||
emit_ap_optimizations ()
|
||||
{
|
||||
/* Removed for now. */
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,416 +0,0 @@
|
||||
|
||||
# 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
|
@ -1,4 +0,0 @@
|
||||
/* This header file is to avoid trouble with semi-ANSI header files
|
||||
on the Convex in system version 8.0. */
|
||||
|
||||
#define _PROTO(list) ()
|
@ -1,31 +0,0 @@
|
||||
/* 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 */
|
||||
|
@ -1,275 +0,0 @@
|
||||
/* 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);
|
||||
}
|
||||
}
|
@ -1,807 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. Elxsi version.
|
||||
Copyright (C) 1987, 1988, 1992, 1995, 1996, 1998, 1999, 2000, 2001, 2002
|
||||
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. */
|
||||
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#define CPP_PREDEFINES "-Delxsi -Dunix -Asystem=unix -Acpu=elxsi -Amachine=elxsi"
|
||||
|
||||
/* Print subsidiary information on the compiler version in use. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (elxsi)");
|
||||
|
||||
/* Run-time compilation parameters selecting different hardware subsets. */
|
||||
|
||||
extern int target_flags;
|
||||
|
||||
/* Macros used in the machine description to test the flags. */
|
||||
|
||||
/* Nonzero if compiling code that Unix assembler can assemble. */
|
||||
#define TARGET_UNIX_ASM (target_flags & 1)
|
||||
|
||||
|
||||
/* Macro to define tables used to set the flags.
|
||||
This is a list in braces of pairs in braces,
|
||||
each pair being { "NAME", VALUE }
|
||||
where VALUE is the bits to set or minus the bits to clear.
|
||||
An empty string NAME is used to identify the default VALUE. */
|
||||
|
||||
#define TARGET_SWITCHES \
|
||||
{ {"unix", 1, N_("Generate code the unix assembler can handle")}, \
|
||||
{"embos", -1, N_("Generate code an embedded assembler can handle")},\
|
||||
{ "", TARGET_DEFAULT, NULL}}
|
||||
|
||||
/* Default target_flags if no switches specified. */
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT 1
|
||||
#endif
|
||||
|
||||
/* Target machine storage layout */
|
||||
|
||||
/* Define this if most significant bit is lowest numbered
|
||||
in instructions that operate on numbered bit-fields.
|
||||
This is not true on the VAX. */
|
||||
#define BITS_BIG_ENDIAN 0
|
||||
|
||||
/* Define this if most significant byte of a word is the lowest numbered. */
|
||||
#define BYTES_BIG_ENDIAN 1
|
||||
|
||||
/* Define this if most significant word of a multiword number is numbered. */
|
||||
#define WORDS_BIG_ENDIAN 1
|
||||
|
||||
#define INT_TYPE_SIZE 32
|
||||
|
||||
#define LONG_TYPE_SIZE 32
|
||||
|
||||
#define LONG_LONG_TYPE_SIZE 64
|
||||
|
||||
#define FLOAT_TYPE_SIZE 32
|
||||
|
||||
#define DOUBLE_TYPE_SIZE 64
|
||||
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
/* Width of a word, in units (bytes). */
|
||||
#define UNITS_PER_WORD 8
|
||||
|
||||
/* Width in bits of a pointer.
|
||||
See also the macro `Pmode' defined below. */
|
||||
#define POINTER_SIZE 32
|
||||
|
||||
/* Allocation boundary (in *bits*) for storing pointers in memory. */
|
||||
#define POINTER_BOUNDARY 32
|
||||
|
||||
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
||||
#define PARM_BOUNDARY 32
|
||||
|
||||
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
||||
#define STACK_BOUNDARY 32
|
||||
|
||||
/* Allocation boundary (in *bits*) for the code of a function. */
|
||||
#define FUNCTION_BOUNDARY 8
|
||||
|
||||
/* Alignment of field after `int : 0' in a structure. */
|
||||
#define EMPTY_FIELD_BOUNDARY 8
|
||||
|
||||
/* Every structure's size must be a multiple of this. */
|
||||
#define STRUCTURE_SIZE_BOUNDARY 32
|
||||
|
||||
/* A bitfield declared as `int' forces `int' alignment for the struct. */
|
||||
#define PCC_BITFIELD_TYPE_MATTERS 1
|
||||
|
||||
/* No data type wants to be aligned rounder than this. */
|
||||
#define BIGGEST_ALIGNMENT 32
|
||||
|
||||
/* Define this if move instructions will actually fail to work
|
||||
when given unaligned data. */
|
||||
#define STRICT_ALIGNMENT 0
|
||||
|
||||
/* Standard register usage. */
|
||||
|
||||
/* Number of actual hardware registers.
|
||||
The hardware registers are assigned numbers for the compiler
|
||||
from 0 to just below FIRST_PSEUDO_REGISTER.
|
||||
All registers that the compiler knows about must be given numbers,
|
||||
even those that are not normally considered general registers. */
|
||||
#define FIRST_PSEUDO_REGISTER 16
|
||||
|
||||
/* 1 for registers that have pervasive standard uses
|
||||
and are not available for the register allocator.
|
||||
On the elxsi, these is the .r15 (aka .sp). */
|
||||
#define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
|
||||
|
||||
/* 1 for registers not available across function calls.
|
||||
These must include the FIXED_REGISTERS and also any
|
||||
registers that can be used without being saved.
|
||||
The latter must include the registers where values are returned
|
||||
and the register where structure-value addresses are passed.
|
||||
Aside from that, you can include as many other registers as you like. */
|
||||
#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
|
||||
|
||||
/* Return number of consecutive hard regs needed starting at reg REGNO
|
||||
to hold something of mode MODE.
|
||||
This is ordinarily the length in words of a value of mode MODE
|
||||
but can be less for certain modes in special long registers.
|
||||
On the VAX, all registers are one word long. */
|
||||
#define HARD_REGNO_NREGS(REGNO, MODE) \
|
||||
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
|
||||
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
|
||||
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
|
||||
|
||||
/* Value is 1 if it is a good idea to tie two pseudo registers
|
||||
when one has mode MODE1 and one has mode MODE2.
|
||||
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
|
||||
for any hard reg, then this must be 0 for correct output. */
|
||||
#define MODES_TIEABLE_P(MODE1, MODE2) 1
|
||||
|
||||
/* Specify the registers used for certain standard purposes.
|
||||
The values of these macros are register numbers. */
|
||||
|
||||
/* Register to use for pushing function arguments. */
|
||||
#define STACK_POINTER_REGNUM 15
|
||||
|
||||
/* Base register for access to local variables of the function. */
|
||||
#define FRAME_POINTER_REGNUM 14
|
||||
|
||||
/* Value should be nonzero if functions must have frame pointers.
|
||||
Zero means the frame pointer need not be set up (and parms
|
||||
may be accessed via the stack pointer) in functions that seem suitable.
|
||||
This is computed in `reload', in reload1.c. */
|
||||
#define FRAME_POINTER_REQUIRED 0
|
||||
|
||||
#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \
|
||||
{ int regno; \
|
||||
int offset = 0; \
|
||||
for( regno=0; regno < FIRST_PSEUDO_REGISTER; regno++ ) \
|
||||
if( regs_ever_live[regno] && !call_used_regs[regno] ) \
|
||||
offset += 8; \
|
||||
(DEPTH) = (offset + ((get_frame_size() + 3) & ~3) ); \
|
||||
(DEPTH) = 0; \
|
||||
}
|
||||
|
||||
/* Base register for access to arguments of the function. */
|
||||
#define ARG_POINTER_REGNUM 14
|
||||
|
||||
/* Register in which static-chain is passed to a function. */
|
||||
#define STATIC_CHAIN_REGNUM 0
|
||||
|
||||
/* Register in which address to store a structure value
|
||||
is passed to a function. */
|
||||
#define STRUCT_VALUE_REGNUM 1
|
||||
|
||||
/* Define the classes of registers for register constraints in the
|
||||
machine description. Also define ranges of constants.
|
||||
|
||||
One of the classes must always be named ALL_REGS and include all hard regs.
|
||||
If there is more than one class, another class must be named NO_REGS
|
||||
and contain no registers.
|
||||
|
||||
The name GENERAL_REGS must be the name of a class (or an alias for
|
||||
another name such as ALL_REGS). This is the class of registers
|
||||
that is allowed by "g" or "r" in a register constraint.
|
||||
Also, registers outside this class are allocated only when
|
||||
instructions express preferences for them.
|
||||
|
||||
The classes must be numbered in nondecreasing order; that is,
|
||||
a larger-numbered class must never be contained completely
|
||||
in a smaller-numbered class.
|
||||
|
||||
For any two classes, it is very desirable that there be another
|
||||
class that represents their union. */
|
||||
|
||||
/* The VAX has only one kind of registers, so NO_REGS and ALL_REGS
|
||||
are the only classes. */
|
||||
|
||||
enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
|
||||
|
||||
#define N_REG_CLASSES (int) LIM_REG_CLASSES
|
||||
|
||||
/* Give names of register classes as strings for dump file. */
|
||||
|
||||
#define REG_CLASS_NAMES \
|
||||
{"NO_REGS", "GENERAL_REGS", "ALL_REGS" }
|
||||
|
||||
/* Define which registers fit in which classes.
|
||||
This is an initializer for a vector of HARD_REG_SET
|
||||
of length N_REG_CLASSES. */
|
||||
|
||||
#define REG_CLASS_CONTENTS {{0}, {0x07fff}, {0xffff}}
|
||||
|
||||
/* The same information, inverted:
|
||||
Return the class number of the smallest class containing
|
||||
reg number REGNO. This could be a conditional expression
|
||||
or could index an array. */
|
||||
|
||||
#define REGNO_REG_CLASS(REGNO) (REGNO == 15 ? ALL_REGS : GENERAL_REGS)
|
||||
|
||||
/* The class value for index registers, and the one for base regs. */
|
||||
|
||||
#define INDEX_REG_CLASS GENERAL_REGS
|
||||
#define BASE_REG_CLASS GENERAL_REGS
|
||||
|
||||
/* Get reg_class from a letter such as appears in the machine description. */
|
||||
|
||||
#define REG_CLASS_FROM_LETTER(C) NO_REGS
|
||||
|
||||
/* The letters I, J, K, L and M in a register constraint string
|
||||
can be used to stand for particular ranges of immediate operands.
|
||||
This macro defines what the ranges are.
|
||||
C is the letter, and VALUE is a constant value.
|
||||
Return 1 if VALUE is in the range specified by C. */
|
||||
|
||||
#define CONST_OK_FOR_LETTER_P(VALUE, C) \
|
||||
((C) == 'I' ? (VALUE) >=-16 && (VALUE) <=15 : 0)
|
||||
|
||||
/* Similar, but for floating constants, and defining letters G and H.
|
||||
Here VALUE is the CONST_DOUBLE rtx itself. */
|
||||
|
||||
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1
|
||||
|
||||
/* Given an rtx X being reloaded into a reg required to be
|
||||
in class CLASS, return the class of reg to actually use.
|
||||
In general this is just CLASS; but on some machines
|
||||
in some cases it is preferable to use a more restrictive class. */
|
||||
|
||||
#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
|
||||
|
||||
/* Return the maximum number of consecutive registers
|
||||
needed to represent mode MODE in a register of class CLASS. */
|
||||
/* On the VAX, this is always the size of MODE in words,
|
||||
since all registers are the same size. */
|
||||
#define CLASS_MAX_NREGS(CLASS, MODE) \
|
||||
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
|
||||
/* Stack layout; function entry, exit and calling. */
|
||||
|
||||
/* Define this if pushing a word on the stack
|
||||
makes the stack pointer a smaller address. */
|
||||
#define STACK_GROWS_DOWNWARD
|
||||
|
||||
/* Define this if the nominal address of the stack frame
|
||||
is at the high-address end of the local variables;
|
||||
that is, each additional local variable allocated
|
||||
goes at a more negative offset in the frame. */
|
||||
#define FRAME_GROWS_DOWNWARD
|
||||
|
||||
/* Offset within stack frame to start allocating local variables at.
|
||||
If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
|
||||
first local allocated. Otherwise, it is the offset to the BEGINNING
|
||||
of the first local allocated. */
|
||||
#define STARTING_FRAME_OFFSET -4
|
||||
|
||||
/* Offset of first parameter from the argument pointer register value. */
|
||||
#define FIRST_PARM_OFFSET(FNDECL) 4
|
||||
|
||||
/* Value is 1 if returning from a function call automatically
|
||||
pops the arguments described by the number-of-args field in the call.
|
||||
FUNDECL is the declaration node of the function (as a tree),
|
||||
FUNTYPE is the data type of the function (as a tree),
|
||||
or for a library call it is an identifier node for the subroutine name.
|
||||
|
||||
On the VAX, the RET insn always pops all the args for any function. */
|
||||
|
||||
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE)
|
||||
|
||||
/* 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. */
|
||||
|
||||
/* On the VAX the return value is in R0 regardless. */
|
||||
|
||||
#define FUNCTION_VALUE(VALTYPE, FUNC) \
|
||||
gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
|
||||
|
||||
/* Define how to find the value returned by a library function
|
||||
assuming the value has mode MODE. */
|
||||
|
||||
/* On the VAX the return value is in R0 regardless. */
|
||||
|
||||
#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)
|
||||
|
||||
/* Define this if PCC uses the nonreentrant convention for returning
|
||||
structure and union values. */
|
||||
|
||||
#define PCC_STATIC_STRUCT_RETURN
|
||||
|
||||
/* 1 if N is a possible register number for a function value.
|
||||
On the VAX, R0 is the only register thus used. */
|
||||
|
||||
#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
|
||||
|
||||
/* 1 if N is a possible register number for function argument passing.
|
||||
On the VAX, no registers are used in this way. */
|
||||
|
||||
#define FUNCTION_ARG_REGNO_P(N) 0
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
during the scan of that argument list. This data type should
|
||||
hold all necessary information about the function itself
|
||||
and about the args processed so far, enough to enable macros
|
||||
such as FUNCTION_ARG to determine where the next arg should go.
|
||||
|
||||
On the VAX, this is a single integer, which is a number of bytes
|
||||
of arguments scanned so far. */
|
||||
|
||||
#define CUMULATIVE_ARGS int
|
||||
|
||||
/* Initialize a variable CUM of type CUMULATIVE_ARGS
|
||||
for a call to a function whose data type is FNTYPE.
|
||||
For a library call, FNTYPE is 0.
|
||||
|
||||
On the VAX, the offset starts at 0. */
|
||||
|
||||
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,x,INDIRECT) \
|
||||
((CUM) = 0)
|
||||
|
||||
/* Update the data in CUM to advance over an argument
|
||||
of mode MODE and data type TYPE.
|
||||
(TYPE is null for libcalls where that information may not be available.) */
|
||||
|
||||
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
|
||||
((CUM) += ((MODE) != BLKmode \
|
||||
? (GET_MODE_SIZE (MODE) + 3) & ~3 \
|
||||
: (int_size_in_bytes (TYPE) + 3) & ~3))
|
||||
|
||||
/* Define where to put the arguments to a function.
|
||||
Value is zero to push the argument on the stack,
|
||||
or a hard register in which to store the argument.
|
||||
|
||||
MODE is the argument's machine mode.
|
||||
TYPE is the data type of the argument (as a tree).
|
||||
This is null for libcalls where that information may
|
||||
not be available.
|
||||
CUM is a variable of type CUMULATIVE_ARGS which gives info about
|
||||
the preceding args and about the function being called.
|
||||
NAMED is nonzero if this argument is a named parameter
|
||||
(otherwise it is an extra parameter matching an ellipsis). */
|
||||
|
||||
/* On the VAX all args are pushed. */
|
||||
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0
|
||||
|
||||
/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
for profiling a function entry. */
|
||||
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
fprintf (FILE, "\tld.64\t.r0,.LP%d\n\tcall\tmcount\n", (LABELNO));
|
||||
|
||||
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
|
||||
the stack pointer does not matter. The value is tested only in
|
||||
functions that have frame pointers.
|
||||
No definition is equivalent to always zero. */
|
||||
|
||||
#define EXIT_IGNORE_STACK 0
|
||||
|
||||
/* If the memory address ADDR is relative to the frame pointer,
|
||||
correct it to be relative to the stack pointer instead.
|
||||
This is for when we don't use a frame pointer.
|
||||
ADDR should be a variable name. */
|
||||
|
||||
#define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) \
|
||||
{ int offset = -1; \
|
||||
rtx regs = stack_pointer_rtx; \
|
||||
if (ADDR == frame_pointer_rtx) \
|
||||
offset = 0; \
|
||||
else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 1) == frame_pointer_rtx \
|
||||
&& GET_CODE (XEXP (ADDR, 0)) == CONST_INT) \
|
||||
offset = INTVAL (XEXP (ADDR, 0)); \
|
||||
else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 0) == frame_pointer_rtx \
|
||||
&& GET_CODE (XEXP (ADDR, 1)) == CONST_INT) \
|
||||
offset = INTVAL (XEXP (ADDR, 1)); \
|
||||
else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 0) == frame_pointer_rtx) \
|
||||
{ rtx other_reg = XEXP (ADDR, 1); \
|
||||
offset = 0; \
|
||||
regs = gen_rtx_PLUS (Pmode, stack_pointer_rtx, other_reg); } \
|
||||
else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 1) == frame_pointer_rtx) \
|
||||
{ rtx other_reg = XEXP (ADDR, 0); \
|
||||
offset = 0; \
|
||||
regs = gen_rtx_PLUS (Pmode, stack_pointer_rtx, other_reg); } \
|
||||
if (offset >= 0) \
|
||||
{ int regno; \
|
||||
extern char call_used_regs[]; \
|
||||
offset += 4; /* I don't know why??? */ \
|
||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
|
||||
if (regs_ever_live[regno] && ! call_used_regs[regno]) \
|
||||
offset += 8; \
|
||||
ADDR = plus_constant (regs, offset + (DEPTH)); } }
|
||||
|
||||
|
||||
/* Addressing modes, and classification of registers for them. */
|
||||
|
||||
/* #define HAVE_POST_INCREMENT 0 */
|
||||
/* #define HAVE_POST_DECREMENT 0 */
|
||||
|
||||
/* #define HAVE_PRE_DECREMENT 0 */
|
||||
/* #define HAVE_PRE_INCREMENT 0 */
|
||||
|
||||
/* Macros to check register numbers against specific register classes. */
|
||||
|
||||
/* These assume that REGNO is a hard or pseudo reg number.
|
||||
They give nonzero only if REGNO is a hard reg of the suitable class
|
||||
or a pseudo reg currently allocated to a suitable hard reg.
|
||||
Since they use reg_renumber, they are safe only once reg_renumber
|
||||
has been allocated, which happens in local-alloc.c. */
|
||||
|
||||
#define REGNO_OK_FOR_INDEX_P(regno) \
|
||||
((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)
|
||||
#define REGNO_OK_FOR_BASE_P(regno) \
|
||||
((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)
|
||||
|
||||
/* Maximum number of registers that can appear in a valid memory address. */
|
||||
|
||||
#define MAX_REGS_PER_ADDRESS 2
|
||||
|
||||
/* 1 if X is an rtx for a constant that is a valid address. */
|
||||
|
||||
#define CONSTANT_ADDRESS_P(X) \
|
||||
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|
||||
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|
||||
|| GET_CODE (X) == HIGH)
|
||||
|
||||
/* Nonzero if the constant value X is a legitimate general operand.
|
||||
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
|
||||
|
||||
#define LEGITIMATE_CONSTANT_P(X) \
|
||||
(GET_CODE (X) != CONST_DOUBLE)
|
||||
|
||||
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
|
||||
and check its validity for a certain class.
|
||||
We have two alternate definitions for each of them.
|
||||
The usual definition accepts all pseudo regs; the other rejects
|
||||
them unless they have been allocated suitable hard regs.
|
||||
The symbol REG_OK_STRICT causes the latter definition to be used.
|
||||
|
||||
Most source files want to accept pseudo regs in the hope that
|
||||
they will get allocated to the class that the insn wants them to be in.
|
||||
Source files for reload pass need to be strict.
|
||||
After reload, it makes no difference, since pseudo regs have
|
||||
been eliminated by then. */
|
||||
|
||||
#ifndef REG_OK_STRICT
|
||||
|
||||
/* Nonzero if X is a hard reg that can be used as an index
|
||||
or if it is a pseudo reg. */
|
||||
#define REG_OK_FOR_INDEX_P(X) 1
|
||||
/* Nonzero if X is a hard reg that can be used as a base reg
|
||||
or if it is a pseudo reg. */
|
||||
#define REG_OK_FOR_BASE_P(X) 1
|
||||
|
||||
#else
|
||||
|
||||
/* Nonzero if X is a hard reg that can be used as an index. */
|
||||
#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
|
||||
/* Nonzero if X is a hard reg that can be used as a base reg. */
|
||||
#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
|
||||
|
||||
#endif
|
||||
|
||||
/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
|
||||
that is a valid memory address for an instruction.
|
||||
The MODE argument is the machine mode for the MEM expression
|
||||
that wants to use this address.
|
||||
|
||||
CONSTANT_ADDRESS_P is actually machine-independent. */
|
||||
|
||||
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
|
||||
{ \
|
||||
if (GET_CODE (X) == REG) goto ADDR; \
|
||||
if (CONSTANT_ADDRESS_P (X)) goto ADDR; \
|
||||
if (GET_CODE (X) == PLUS) \
|
||||
{ \
|
||||
/* Handle [index]<address> represented with index-sum outermost */\
|
||||
if (GET_CODE (XEXP (X, 0)) == REG \
|
||||
&& REG_OK_FOR_BASE_P (XEXP (X, 0)) \
|
||||
&& GET_CODE (XEXP (X, 1)) == CONST_INT) \
|
||||
goto ADDR; \
|
||||
if (GET_CODE (XEXP (X, 1)) == REG \
|
||||
&& REG_OK_FOR_BASE_P (XEXP (X, 0)) \
|
||||
&& GET_CODE (XEXP (X, 0)) == CONST_INT) \
|
||||
goto ADDR; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/* Try machine-dependent ways of modifying an illegitimate address
|
||||
to be legitimate. If we find one, return the new, valid address.
|
||||
This macro is used in only one place: `memory_address' in explow.c.
|
||||
|
||||
OLDX is the address as it was before break_out_memory_refs was called.
|
||||
In some cases it is useful to look at this to decide what needs to be done.
|
||||
|
||||
MODE and WIN are passed so that this macro can use
|
||||
GO_IF_LEGITIMATE_ADDRESS.
|
||||
|
||||
It is always safe for this macro to do nothing. It exists to recognize
|
||||
opportunities to optimize the output.
|
||||
|
||||
For the VAX, nothing needs to be done. */
|
||||
|
||||
#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
|
||||
|
||||
/* Go to LABEL if ADDR (a legitimate address expression)
|
||||
has an effect that depends on the machine mode it is used for. */
|
||||
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
|
||||
|
||||
|
||||
/* Specify the machine mode that this machine uses
|
||||
for the index in the tablejump instruction. */
|
||||
#define CASE_VECTOR_MODE SImode
|
||||
|
||||
/* Define as C expression which evaluates to nonzero if the tablejump
|
||||
instruction expects the table to contain offsets from the address of the
|
||||
table.
|
||||
Do not define this if the table should contain absolute addresses. */
|
||||
/* #define CASE_VECTOR_PC_RELATIVE 1 */
|
||||
|
||||
/* Define this as 1 if `char' should by default be signed; else as 0. */
|
||||
#define DEFAULT_SIGNED_CHAR 1
|
||||
|
||||
/* This flag, if defined, says the same insns that convert to a signed fixnum
|
||||
also convert validly to an unsigned one. */
|
||||
#define FIXUNS_TRUNC_LIKE_FIX_TRUNC
|
||||
|
||||
/* Max number of bytes we can move from memory to memory
|
||||
in one reasonably fast instruction. */
|
||||
#define MOVE_MAX 8
|
||||
|
||||
/* Nonzero if access to memory by bytes is slow and undesirable. */
|
||||
#define SLOW_BYTE_ACCESS 0
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
|
||||
is done just by pretending it is already truncated. */
|
||||
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
|
||||
|
||||
/* Specify the machine mode that pointers have.
|
||||
After generation of rtl, the compiler makes no further distinction
|
||||
between pointers and any other objects of this machine mode. */
|
||||
#define Pmode SImode
|
||||
|
||||
/* A function address in a call instruction
|
||||
is a byte address (for indexing purposes)
|
||||
so give the MEM rtx a byte's mode. */
|
||||
#define FUNCTION_MODE QImode
|
||||
|
||||
/* Compute the cost of computing a constant rtl expression RTX
|
||||
whose rtx-code is CODE. The body of this macro is a portion
|
||||
of a switch statement. If the code is computed here,
|
||||
return it with a return statement. Otherwise, break from the switch. */
|
||||
|
||||
#define CONST_COSTS(RTX,CODE,OUTER_CODE) \
|
||||
case CONST_INT: \
|
||||
/* Constant zero is super cheap due to clr instruction. */ \
|
||||
if (RTX == const0_rtx) return 0; \
|
||||
if ((unsigned) INTVAL (RTX) < 077) return 1; \
|
||||
case CONST: \
|
||||
case LABEL_REF: \
|
||||
case SYMBOL_REF: \
|
||||
return 3; \
|
||||
case CONST_DOUBLE: \
|
||||
return 5;
|
||||
|
||||
/*
|
||||
* We can use the BSD C library routines for the gnulib calls that are
|
||||
* still generated, since that's what they boil down to anyways.
|
||||
*/
|
||||
|
||||
/* #define UDIVSI3_LIBCALL "*udiv" */
|
||||
/* #define UMODSI3_LIBCALL "*urem" */
|
||||
|
||||
/* Tell final.c how to eliminate redundant test instructions. */
|
||||
|
||||
/* Here we define machine-dependent flags and fields in cc_status
|
||||
(see `conditions.h'). No extra ones are needed for the VAX. */
|
||||
|
||||
/* Store in cc_status the expressions
|
||||
that the condition codes will describe
|
||||
after execution of an instruction whose pattern is EXP.
|
||||
Do not alter them if the instruction would not alter the cc's. */
|
||||
|
||||
#define NOTICE_UPDATE_CC(EXP, INSN) \
|
||||
CC_STATUS_INIT;
|
||||
|
||||
|
||||
/* Control the assembler format that we output. */
|
||||
|
||||
/* Output the name of the file we are compiling. */
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \
|
||||
do { fprintf (STREAM, "\t.file\t"); \
|
||||
output_quoted_string (STREAM, NAME); \
|
||||
fprintf (STREAM, "\n"); \
|
||||
} while (0)
|
||||
|
||||
/* Output at beginning of assembler file. */
|
||||
#define ASM_FILE_START(FILE) fputs ("", (FILE));
|
||||
|
||||
/* Output to assembler file text saying following lines
|
||||
may contain character constants, extra white space, comments, etc. */
|
||||
|
||||
#define ASM_APP_ON ""
|
||||
|
||||
/* Output to assembler file text saying following lines
|
||||
no longer contain unusual constructs. */
|
||||
|
||||
#define ASM_APP_OFF ""
|
||||
|
||||
/* Output before read-only data. */
|
||||
|
||||
#define TEXT_SECTION_ASM_OP "\t.inst"
|
||||
|
||||
/* Output before writable data. */
|
||||
|
||||
#define DATA_SECTION_ASM_OP "\t.var"
|
||||
|
||||
/* How to refer to registers in assembler output.
|
||||
This sequence is indexed by compiler's hard-register-number (see above). */
|
||||
|
||||
#define REGISTER_NAMES \
|
||||
{".r0", ".r1", ".r2", ".r3", ".r4", ".r5", ".r6", ".r7", ".r8", \
|
||||
".r9", ".r10", ".r11", ".r12", ".r13", ".r14", ".sp"}
|
||||
|
||||
/* This is BSD, so it wants DBX format. */
|
||||
|
||||
/* #define DBX_DEBUGGING_INFO */
|
||||
|
||||
/* Do not break .stabs pseudos into continuations. */
|
||||
|
||||
#define DBX_CONTIN_LENGTH 0
|
||||
|
||||
/* This is the char to use for continuation (in case we need to turn
|
||||
continuation back on). */
|
||||
|
||||
#define DBX_CONTIN_CHAR '?'
|
||||
|
||||
/* Don't use the `xsfoo;' construct in DBX output; this system
|
||||
doesn't support it. */
|
||||
|
||||
#define DBX_NO_XREFS
|
||||
|
||||
/* This is how to output the definition of a user-level label named NAME,
|
||||
such as the label on a static function or variable NAME. */
|
||||
|
||||
#define ASM_OUTPUT_LABEL(FILE,NAME) \
|
||||
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
|
||||
|
||||
/* This is how to output a command to make the user-level label named NAME
|
||||
defined for reference from other files. */
|
||||
|
||||
#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
|
||||
do { fputs ("\t.extdef\t", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
|
||||
|
||||
/* 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)
|
||||
|
||||
/* This is how to store into the string LABEL
|
||||
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(LABEL,PREFIX,NUM) \
|
||||
sprintf (LABEL, ".%s%d", PREFIX, NUM)
|
||||
|
||||
/* This is how to output an insn to push a register on the stack.
|
||||
It need not be very fast code. */
|
||||
|
||||
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
|
||||
fprintf (FILE, "\tsubi.64\t4,.sp\n\tst.32\t%s,[.sp]\n", reg_names[REGNO])
|
||||
|
||||
/* This is how to output an insn to pop a register from the stack.
|
||||
It need not be very fast code. */
|
||||
|
||||
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
|
||||
fprintf (FILE, "\tld.32\t%s,[.sp]\n\taddi.64\t4,.sp\n", reg_names[REGNO])
|
||||
|
||||
/* This is how to output an element of a case-vector that is absolute.
|
||||
(The VAX does not use such vectors,
|
||||
but we must define this macro anyway.) */
|
||||
|
||||
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
|
||||
fprintf (FILE, "\t.data .L%d{32}\n", VALUE)
|
||||
|
||||
/* This is how to output an element of a case-vector that is relative. */
|
||||
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
||||
fprintf (FILE, "\t.data .L%d-.L%d{32}\n", VALUE, REL)
|
||||
|
||||
/* 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) \
|
||||
do { if (LOG!=0) fprintf (FILE, "\t.align\t%d\n", (LOG)); } while (0)
|
||||
|
||||
/* 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.space %d\n", (SIZE))
|
||||
|
||||
/* 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), ",%d\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 (".bss ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%d,%d\n", (SIZE),(ROUNDED)))
|
||||
|
||||
/* Store in OUTPUT a string (made with alloca) containing
|
||||
an assembler-name for a local static variable named NAME.
|
||||
LABELNO is an integer which is different for each call. */
|
||||
|
||||
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
|
||||
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
|
||||
sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
|
||||
|
||||
/* Print an instruction operand X on file FILE.
|
||||
CODE is the code from the %-spec that requested printing this operand;
|
||||
if `%z3' was used to print operand 3, then CODE is 'z'. */
|
||||
|
||||
#define PRINT_OPERAND(FILE, X, CODE) \
|
||||
{ \
|
||||
if (CODE == 'r' && GET_CODE (X) == MEM && GET_CODE (XEXP (X, 0)) == REG) \
|
||||
fprintf (FILE, "%s", reg_names[REGNO (XEXP (X, 0))]); \
|
||||
else if (GET_CODE (X) == REG) \
|
||||
fprintf (FILE, "%s", reg_names[REGNO (X)]); \
|
||||
else if (GET_CODE (X) == MEM) \
|
||||
output_address (XEXP (X, 0)); \
|
||||
else \
|
||||
{ \
|
||||
/*debug_rtx(X);*/ \
|
||||
putc ('=', FILE); \
|
||||
output_addr_const (FILE, X); } \
|
||||
}
|
||||
|
||||
/* Print a memory operand whose address is X, on file FILE.
|
||||
This uses a function in output-vax.c. */
|
||||
|
||||
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
||||
print_operand_address (FILE, ADDR)
|
||||
|
||||
/* These are stubs, and have yet to bee written. */
|
||||
|
||||
#define TRAMPOLINE_SIZE 26
|
||||
#define TRAMPOLINE_TEMPLATE(FILE)
|
||||
#define INITIALIZE_TRAMPOLINE(TRAMP,FNADDR,CXT)
|
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
||||
/* 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
|
@ -1,64 +0,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
|
@ -1,118 +0,0 @@
|
||||
/* 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 */
|
@ -1,29 +0,0 @@
|
||||
/* 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))
|
@ -1,244 +0,0 @@
|
||||
/* 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"
|
@ -1,35 +0,0 @@
|
||||
/* 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
|
@ -1,101 +0,0 @@
|
||||
/* 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
|
@ -1,41 +0,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"
|
@ -1,66 +0,0 @@
|
||||
/* 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 ""
|
@ -1,183 +0,0 @@
|
||||
/* 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))
|
@ -1,65 +0,0 @@
|
||||
! 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
|
@ -1,46 +0,0 @@
|
||||
! 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
|
@ -1,207 +0,0 @@
|
||||
/* 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)
|
@ -1,7 +0,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
|
||||
|
@ -1,76 +0,0 @@
|
||||
/* 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
|
@ -1,668 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler.
|
||||
Intel 386 (OSF/1 with OSF/rose) version.
|
||||
Copyright (C) 1991, 1992, 1993, 1996, 1998, 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 OSF_OS
|
||||
|
||||
#undef WORD_SWITCH_TAKES_ARG
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names"))
|
||||
|
||||
/* This defines which switch letters take arguments. On svr4, most of
|
||||
the normal cases (defined in gcc.c) apply, and we also have -h* and
|
||||
-z* options (for the linker). */
|
||||
|
||||
#define SWITCH_TAKES_ARG(CHAR) \
|
||||
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
||||
|| (CHAR) == 'h' \
|
||||
|| (CHAR) == 'z')
|
||||
|
||||
#define MASK_HALF_PIC 010000000000 /* Mask for half-pic code */
|
||||
#define MASK_HALF_PIC_DEBUG 004000000000 /* Debug flag */
|
||||
#define MASK_ELF 002000000000 /* ELF not rose */
|
||||
#define MASK_NO_UNDERSCORES 000400000000 /* suppress leading _ */
|
||||
#define MASK_LARGE_ALIGN 000200000000 /* align to >word boundaries */
|
||||
#define MASK_NO_MCOUNT 000100000000 /* profiling uses mcount_ptr */
|
||||
|
||||
#define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC)
|
||||
#define TARGET_DEBUG (target_flags & MASK_HALF_PIC_DEBUG)
|
||||
#define HALF_PIC_DEBUG TARGET_DEBUG
|
||||
#define TARGET_ELF (target_flags & MASK_ELF)
|
||||
#define TARGET_ROSE ((target_flags & MASK_ELF) == 0)
|
||||
#define TARGET_UNDERSCORES ((target_flags & MASK_NO_UNDERSCORES) == 0)
|
||||
#define TARGET_LARGE_ALIGN (target_flags & MASK_LARGE_ALIGN)
|
||||
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
|
||||
|
||||
#undef SUBTARGET_SWITCHES
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{ "half-pic", MASK_HALF_PIC, \
|
||||
N_("Emit half-PIC code") }, \
|
||||
{ "no-half-pic", -MASK_HALF_PIC, "" }, \
|
||||
{ "debug-half-pic", MASK_HALF_PIC_DEBUG, \
|
||||
0 /* intentionally undoc */ }, \
|
||||
{ "debugb", MASK_HALF_PIC_DEBUG, \
|
||||
0 /* intentionally undoc */ }, \
|
||||
{ "elf", MASK_ELF, \
|
||||
N_("Emit ELF object code") }, \
|
||||
{ "rose", -MASK_ELF, \
|
||||
N_("Emit ROSE object code") }, \
|
||||
{ "underscores", -MASK_NO_UNDERSCORES, \
|
||||
N_("Symbols have a leading underscore") }, \
|
||||
{ "no-underscores", MASK_NO_UNDERSCORES, "" }, \
|
||||
{ "large-align", MASK_LARGE_ALIGN, \
|
||||
N_("Align to >word boundaries") }, \
|
||||
{ "no-large-align", -MASK_LARGE_ALIGN, "" }, \
|
||||
{ "mcount", -MASK_NO_MCOUNT, \
|
||||
N_("Use mcount for profiling") }, \
|
||||
{ "mcount-ptr", MASK_NO_MCOUNT, \
|
||||
N_("Use mcount_ptr for profiling") }, \
|
||||
{ "no-mcount", MASK_NO_MCOUNT, "" },
|
||||
|
||||
/* OSF/rose uses stabs, not dwarf. */
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
||||
#ifndef DWARF_DEBUGGING_INFO
|
||||
#define DWARF_DEBUGGING_INFO /* enable dwarf debugging for testing */
|
||||
#endif
|
||||
|
||||
/* Handle #pragma weak and #pragma pack. */
|
||||
|
||||
#define HANDLE_SYSV_PRAGMA
|
||||
#define SUPPORTS_WEAK TARGET_ELF
|
||||
|
||||
/* Change default predefines. */
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) \
|
||||
%{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
|
||||
%{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
|
||||
%{mno-underscores: -D__NO_UNDERSCORES__} \
|
||||
%{melf: %{!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: -mrose }} \
|
||||
%{melf: %{!munderscores: %{!mno-underscores: -mno-underscores }} \
|
||||
%{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \
|
||||
%{!melf: %{!munderscores: %{!mno-underscores: -munderscores }} \
|
||||
%{!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} \
|
||||
%{!melf: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
|
||||
%{nostdlib} %{noshrlib} %{glue}} \
|
||||
%{melf: %{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 LIB_SPEC
|
||||
#define LIB_SPEC "-lc"
|
||||
|
||||
#undef LIBG_SPEC
|
||||
#define LIBG_SPEC ""
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
|
||||
#undef TARGET_VERSION_INTERNAL
|
||||
|
||||
#define I386_VERSION " 80386, OSF/rose objects"
|
||||
|
||||
#define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
|
||||
#define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define this macro if the system header files support C++ as well
|
||||
as C. This macro inhibits the usual method of using system header
|
||||
files in C++, which is to pretend that the file's contents are
|
||||
enclosed in `extern "C" {...}'. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
/* Turn off long double being 96 bits. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
#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)))
|
||||
|
||||
/* 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 = (TARGET_UNDERSCORES) ? "_" : ""; \
|
||||
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 && HALF_PIC_P ()) \
|
||||
{ \
|
||||
rtx symdef; \
|
||||
\
|
||||
HALF_PIC_EXTERNAL ("mcount"); \
|
||||
symdef = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, "mcount")); \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *%s%s\n", prefix, XSTR (symdef, 0)); \
|
||||
} \
|
||||
\
|
||||
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)
|
||||
|
||||
/* A C function or functions which are needed in the library to
|
||||
support block profiling. When support goes into libc, undo
|
||||
the #if 0. */
|
||||
|
||||
#if 0
|
||||
#undef BLOCK_PROFILING_CODE
|
||||
#define BLOCK_PROFILING_CODE
|
||||
#endif
|
||||
|
||||
/* Prefix for internally generated assembler labels. If we aren't using
|
||||
underscores, we are using prefix `.'s to identify labels that should
|
||||
be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
|
||||
#undef LPREFIX
|
||||
#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L")
|
||||
|
||||
/* 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'. */
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
|
||||
sprintf ((BUF), "*%s%s%ld", (TARGET_UNDERSCORES) ? "" : ".", \
|
||||
(PREFIX), (long)(NUMBER))
|
||||
|
||||
/* This is how to output an internal numbered label where
|
||||
PREFIX is the class of label and NUM is the number within the class. */
|
||||
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \
|
||||
PREFIX, NUM)
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
/* target_flags is not accessible by the preprocessor */
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX "_"
|
||||
|
||||
/* This is how to output a reference to a user-level label named NAME. */
|
||||
|
||||
#undef ASM_OUTPUT_LABELREF
|
||||
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
|
||||
fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME)
|
||||
|
||||
/* This is how to output an element of a case-vector that is relative.
|
||||
This is only used for PIC code. See comments by the `casesi' insn in
|
||||
i386.md for an explanation of the expression this outputs. */
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
||||
fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
|
||||
|
||||
/* Output a definition */
|
||||
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
|
||||
do \
|
||||
{ \
|
||||
fprintf ((FILE), "%s", SET_ASM_OP); \
|
||||
assemble_name (FILE, LABEL1); \
|
||||
fprintf (FILE, ","); \
|
||||
assemble_name (FILE, LABEL2); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* A C expression to output text to align the location counter in the
|
||||
way that is desirable at a point in the code that is reached only
|
||||
by jumping.
|
||||
|
||||
This macro need not be defined if you don't want any special
|
||||
alignment to be done at such a time. Most machine descriptions do
|
||||
not currently define the macro. */
|
||||
|
||||
#undef LABEL_ALIGN_AFTER_BARRIER
|
||||
#define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
|
||||
((!TARGET_LARGE_ALIGN && i386_align_jumps > 2) ? 2 : i386_align_jumps)
|
||||
|
||||
/* A C expression to output text to align the location counter in the
|
||||
way that is desirable at the beginning of a loop.
|
||||
|
||||
This macro need not be defined if you don't want any special
|
||||
alignment to be done at such a time. Most machine descriptions do
|
||||
not currently define the macro. */
|
||||
|
||||
#undef LOOP_ALIGN
|
||||
#define LOOP_ALIGN(LABEL) (i386_align_loops)
|
||||
|
||||
/* A C statement to output to the stdio stream STREAM an assembler
|
||||
command to advance the location counter to a multiple of 2 to the
|
||||
POWER bytes. POWER will be a C expression of type `int'. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
|
||||
fprintf (STREAM, "\t.align\t%d\n", \
|
||||
(!TARGET_LARGE_ALIGN && (POWER) > 2) ? 2 : (POWER))
|
||||
|
||||
/* A C expression that is 1 if the RTX X is a constant which is a
|
||||
valid address. On most machines, this can be defined as
|
||||
`CONSTANT_P (X)', but a few machines are more restrictive in
|
||||
which constant addresses are supported.
|
||||
|
||||
`CONSTANT_P' accepts integer-values expressions whose values are
|
||||
not explicitly known, such as `symbol_ref', `label_ref', and
|
||||
`high' expressions and `const' arithmetic expressions, in
|
||||
addition to `const_int' and `const_double' expressions. */
|
||||
|
||||
#define CONSTANT_ADDRESS_P_ORIG(X) \
|
||||
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|
||||
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|
||||
|| GET_CODE (X) == HIGH)
|
||||
|
||||
#undef CONSTANT_ADDRESS_P
|
||||
#define CONSTANT_ADDRESS_P(X) \
|
||||
((CONSTANT_ADDRESS_P_ORIG (X)) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
|
||||
|
||||
/* Nonzero if the constant value X is a legitimate general operand.
|
||||
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
|
||||
|
||||
#undef LEGITIMATE_CONSTANT_P
|
||||
#define LEGITIMATE_CONSTANT_P(X) \
|
||||
(!HALF_PIC_P () \
|
||||
|| GET_CODE (X) == CONST_DOUBLE \
|
||||
|| GET_CODE (X) == CONST_INT \
|
||||
|| !HALF_PIC_ADDRESS_P (X))
|
||||
|
||||
/* Sometimes certain combinations of command options do not make sense
|
||||
on a particular target machine. You can define a macro
|
||||
`OVERRIDE_OPTIONS' to take account of this. This macro, if
|
||||
defined, is executed once just after all the command options have
|
||||
been parsed. */
|
||||
|
||||
#undef SUBTARGET_OVERRIDE_OPTIONS
|
||||
#define SUBTARGET_OVERRIDE_OPTIONS \
|
||||
{ \
|
||||
/* \
|
||||
if (TARGET_ELF && TARGET_HALF_PIC) \
|
||||
{ \
|
||||
target_flags &= ~MASK_HALF_PIC; \
|
||||
flag_pic = 1; \
|
||||
} \
|
||||
*/ \
|
||||
\
|
||||
if (TARGET_ROSE && flag_pic) \
|
||||
{ \
|
||||
target_flags |= MASK_HALF_PIC; \
|
||||
flag_pic = 0; \
|
||||
} \
|
||||
\
|
||||
if (TARGET_HALF_PIC) \
|
||||
half_pic_init (); \
|
||||
}
|
||||
|
||||
/* Define this macro if references to a symbol must be treated
|
||||
differently depending on something about the variable or
|
||||
function named by the symbol (such as what section it is in).
|
||||
|
||||
The macro definition, if any, is executed immediately after the
|
||||
rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
|
||||
The value of the rtl will be a `mem' whose address is a
|
||||
`symbol_ref'.
|
||||
|
||||
The usual thing for this macro to do is to a flag in the
|
||||
`symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
|
||||
name string in the `symbol_ref' (if one bit is not enough
|
||||
information).
|
||||
|
||||
The best way to modify the name string is by adding text to the
|
||||
beginning, with suitable punctuation to prevent any ambiguity.
|
||||
Allocate the new name in `saveable_obstack'. You will have to
|
||||
modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
|
||||
and output the name accordingly.
|
||||
|
||||
You can also check the information stored in the `symbol_ref' in
|
||||
the definition of `GO_IF_LEGITIMATE_ADDRESS' or
|
||||
`PRINT_OPERAND_ADDRESS'. */
|
||||
|
||||
#undef ENCODE_SECTION_INFO
|
||||
#define ENCODE_SECTION_INFO(DECL, FIRST) \
|
||||
do \
|
||||
{ \
|
||||
if (HALF_PIC_P ()) \
|
||||
{ \
|
||||
if (FIRST) \
|
||||
HALF_PIC_ENCODE (DECL); \
|
||||
} \
|
||||
else if (flag_pic) \
|
||||
{ \
|
||||
rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|
||||
? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
|
||||
SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
|
||||
= (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|
||||
|| ! TREE_PUBLIC (DECL)); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef SELECT_SECTION
|
||||
#define SELECT_SECTION(DECL, RELOC, ALIGN) \
|
||||
{ \
|
||||
if (RELOC && HALF_PIC_P ()) \
|
||||
data_section (); \
|
||||
\
|
||||
else if (TREE_CODE (DECL) == STRING_CST) \
|
||||
{ \
|
||||
if (flag_writable_strings) \
|
||||
data_section (); \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
\
|
||||
else if (TREE_CODE (DECL) != VAR_DECL) \
|
||||
readonly_data_section (); \
|
||||
\
|
||||
else if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
|
||||
|| !DECL_INITIAL (DECL) \
|
||||
|| (DECL_INITIAL (DECL) != error_mark_node \
|
||||
&& !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
|
||||
data_section (); \
|
||||
\
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
}
|
||||
|
||||
|
||||
/* Define the strings used for the special svr4 .type and .size directives.
|
||||
These strings generally do not vary from one system running svr4 to
|
||||
another, but if a given system (e.g. m88k running svr) needs to use
|
||||
different pseudo-op names for these, they may be overridden in the
|
||||
file which includes this one. */
|
||||
|
||||
#define TYPE_ASM_OP "\t.type\t"
|
||||
#define SIZE_ASM_OP "\t.size\t"
|
||||
#define SET_ASM_OP "\t.set\t"
|
||||
|
||||
/* This is how we tell the assembler that a symbol is weak. */
|
||||
|
||||
#define ASM_WEAKEN_LABEL(FILE,NAME) \
|
||||
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
|
||||
fputc ('\n', FILE); } while (0)
|
||||
|
||||
/* The following macro defines the format used to output the second
|
||||
operand of the .type assembler directive. Different svr4 assemblers
|
||||
expect various different forms for this operand. The one given here
|
||||
is just a default. You may need to override it in your machine-
|
||||
specific tm.h file (depending upon the particulars of your assembler). */
|
||||
|
||||
#define TYPE_OPERAND_FMT "@%s"
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
STREAM any text necessary for declaring the name NAME of an
|
||||
initialized variable which is being defined. This macro must
|
||||
output the label definition (perhaps using `ASM_OUTPUT_LABEL').
|
||||
The argument DECL is the `VAR_DECL' tree node representing the
|
||||
variable.
|
||||
|
||||
If this macro is not defined, then the variable name is defined
|
||||
in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
|
||||
|
||||
#undef ASM_DECLARE_OBJECT_NAME
|
||||
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
ASM_OUTPUT_LABEL(STREAM,NAME); \
|
||||
HALF_PIC_DECLARE (NAME); \
|
||||
if (TARGET_ELF) \
|
||||
{ \
|
||||
fprintf (STREAM, "%s", TYPE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
putc (',', STREAM); \
|
||||
fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \
|
||||
putc ('\n', STREAM); \
|
||||
size_directive_output = 0; \
|
||||
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
fprintf (STREAM, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Output the size directive for a decl in rest_of_decl_compilation
|
||||
in the case where we did not do so before the initializer.
|
||||
Once we find the error_mark_node, we know that the value of
|
||||
size_directive_output was set
|
||||
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
|
||||
|
||||
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
|
||||
do { \
|
||||
const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
||||
if (TARGET_ELF \
|
||||
&& !flag_inhibit_size_directive && DECL_SIZE (DECL) \
|
||||
&& ! AT_END && TOP_LEVEL \
|
||||
&& DECL_INITIAL (DECL) == error_mark_node \
|
||||
&& !size_directive_output) \
|
||||
{ \
|
||||
fprintf (FILE, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (FILE, name); \
|
||||
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* This is how to declare a function name. */
|
||||
|
||||
#undef ASM_DECLARE_FUNCTION_NAME
|
||||
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
|
||||
do \
|
||||
{ \
|
||||
ASM_OUTPUT_LABEL(STREAM,NAME); \
|
||||
HALF_PIC_DECLARE (NAME); \
|
||||
if (TARGET_ELF) \
|
||||
{ \
|
||||
fprintf (STREAM, "%s", TYPE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
putc (',', STREAM); \
|
||||
fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
|
||||
putc ('\n', STREAM); \
|
||||
ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Write the extra assembler code needed to declare a function's result.
|
||||
Most svr4 assemblers don't require any special declaration of the
|
||||
result value, but there are exceptions. */
|
||||
|
||||
#ifndef ASM_DECLARE_RESULT
|
||||
#define ASM_DECLARE_RESULT(FILE, RESULT)
|
||||
#endif
|
||||
|
||||
/* This is how to declare the size of a function. */
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
if (TARGET_ELF && !flag_inhibit_size_directive) \
|
||||
{ \
|
||||
char label[256]; \
|
||||
static int labelno; \
|
||||
labelno++; \
|
||||
ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
|
||||
ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
|
||||
fprintf (FILE, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (FILE, (FNAME)); \
|
||||
fprintf (FILE, ","); \
|
||||
assemble_name (FILE, label); \
|
||||
fprintf (FILE, "-"); \
|
||||
assemble_name (FILE, (FNAME)); \
|
||||
putc ('\n', FILE); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define IDENT_ASM_OP "\t.ident\t"
|
||||
|
||||
/* Allow #sccs in preprocessor. */
|
||||
|
||||
#define SCCS_DIRECTIVE
|
||||
|
||||
/* This says what to print at the end of the assembly file */
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(STREAM) \
|
||||
do \
|
||||
{ \
|
||||
if (HALF_PIC_P ()) \
|
||||
HALF_PIC_FINISH (STREAM); \
|
||||
ix86_asm_file_end (STREAM); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Tell collect that the object format is OSF/rose. */
|
||||
#define OBJECT_FORMAT_ROSE
|
||||
|
||||
/* Tell collect where the appropriate binaries are. */
|
||||
#define REAL_NM_FILE_NAME "/usr/ccs/gcc/bfd-nm"
|
||||
#define REAL_STRIP_FILE_NAME "/usr/ccs/bin/strip"
|
||||
|
||||
/* 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
|
||||
|
||||
/* Generate calls to memcpy, etc., not bcopy, etc. */
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* 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
|
||||
|
||||
/* Map i386 registers to the numbers dwarf expects. Of course this is
|
||||
different from what stabs expects. */
|
||||
|
||||
#undef DBX_REGISTER_NUMBER
|
||||
#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \
|
||||
? svr4_dbx_register_map[n] \
|
||||
: dbx_register_map[n])
|
@ -1,28 +0,0 @@
|
||||
/* 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)");
|
@ -1,44 +0,0 @@
|
||||
/* 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
|
@ -1,45 +0,0 @@
|
||||
/* 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
|
@ -1,5 +0,0 @@
|
||||
/* Sequent DYNIX/ptx 2.x (SVr3) */
|
||||
|
||||
/* Use atexit for static destructors, instead of defining
|
||||
our own exit function. */
|
||||
#undef NEED_ATEXIT
|
@ -1,146 +0,0 @@
|
||||
/* 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
|
@ -1,78 +0,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
|
@ -1,138 +0,0 @@
|
||||
/* 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)
|
@ -1,11 +0,0 @@
|
||||
#
|
||||
# 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 =
|
@ -1,8 +0,0 @@
|
||||
# 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
|
@ -1,2 +0,0 @@
|
||||
# If compiling with the osf gcc, avoid sharing code.
|
||||
TCFLAGS = -pic-none
|
@ -1,18 +0,0 @@
|
||||
# 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
|
@ -1,2 +0,0 @@
|
||||
#undef ASCII_DATA_ASM_OP
|
||||
#define ASCII_DATA_ASM_OP "\t.ascii\t"
|
@ -1,44 +0,0 @@
|
||||
#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)
|
@ -1,345 +0,0 @@
|
||||
/* Target definitions for GNU compiler for Alliant FX/2800
|
||||
running Concentrix 2.2
|
||||
Copyright (C) 1991, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Howard Chu (hyc@hanauma.jpl.nasa.gov).
|
||||
|
||||
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. */
|
||||
|
||||
/* The Alliant fx2800 running Concentrix 2.x is weird. This is basically
|
||||
a BSD 4.3 based operating system, but it uses svr4 ELF format object
|
||||
files and it somehow puts BSD stabs records into the ELF files for
|
||||
symbolic debug information. The assembler is "mostly an SVR4 assembler
|
||||
with some Alliant additions. We based it on the `Intel 80860 Assembly
|
||||
Language Specification' from AT&T." */
|
||||
|
||||
/* This file consists of three sections. The first section establishes
|
||||
definitions unique to the Alliant FX/2800. The next section reconciles
|
||||
differences between Alliant and i860v4.h, and the last overrides the
|
||||
remaining differences with svr4.h */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (i860 Alliant)");
|
||||
|
||||
/* atexit is not present prior to Concentrix 2.2. Uncomment the following
|
||||
if you're on 2.1 or older. */
|
||||
|
||||
/* #define NEED_ATEXIT */
|
||||
|
||||
#define I860_STRICT_ABI_PROLOGUES
|
||||
|
||||
/* There is no avoiding this; -L does not exist at all (in Concentrix 2.2). */
|
||||
#define LINK_LIBGCC_SPECIAL 1
|
||||
|
||||
/* Most of the Alliant-specific definitions here are to get stab info that
|
||||
Alliant's dbx can understand. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
#define DEFAULT_GDB_EXTENSIONS 0
|
||||
#define DBX_NO_XREFS
|
||||
#define DBX_NO_EXTRA_TAGS
|
||||
|
||||
/* Alliant dbx also needs to see the function stab before anything
|
||||
else in the function. */
|
||||
|
||||
#define DBX_FUNCTION_FIRST
|
||||
#define DBX_LBRAC_FIRST
|
||||
|
||||
/* Alliant dbx also needs to see the end of a function somewhere. */
|
||||
|
||||
#define DBX_OUTPUT_FUNCTION_END(file,decl) \
|
||||
fprintf (file, ".stab \"\",.,0x%x,0,0\n", N_EFUN)
|
||||
|
||||
/* Alliant dbx has predefined types, so they must be emitted with the
|
||||
proper type numbers. The defined types are:
|
||||
|
||||
Type # C, Fortran, Pascal Types
|
||||
-- ------------------------
|
||||
1 char, integer*1
|
||||
2 short, integer*2
|
||||
3 int, long, integer*4, integer
|
||||
4 logical*1, byte
|
||||
5 logical*2
|
||||
6 logical*4, logical
|
||||
7 float, real*4, real
|
||||
8 double, real*8, double
|
||||
9 single complex, complex*8, complex
|
||||
10 double complex, doublecomplex
|
||||
11 character
|
||||
12 void
|
||||
13 nil
|
||||
14 boolean
|
||||
15 unsigned char, ubyte
|
||||
16 unsigned short, uword
|
||||
17 unsigned, unsigned int, unsigned long, ulong
|
||||
18 quad, logical*8
|
||||
19 long long, integer*8
|
||||
20 unsigned long long, uquad*8
|
||||
21-100 reserved for future predefined types
|
||||
100 long redefine same as 3
|
||||
101 unsigned long same as 17
|
||||
-- --------------------
|
||||
102 First user program type
|
||||
|
||||
Since long and unsigned long are int references, they must be handled
|
||||
as special cases. The Alliant compiler doesn't use types 18-20, so it
|
||||
sets long & unsigned long in 18 & 19, not in 100 & 101 as shown above. */
|
||||
|
||||
#define DBX_OUTPUT_STANDARD_TYPES(syms) \
|
||||
{ static const char *const dtyps[] = { \
|
||||
"", "char", "short int", "int", "logical*1", \
|
||||
"logical*2", "logical*4", "float", "double", "complex", \
|
||||
"doublecomplex", "character", "void", "nil", "boolean", \
|
||||
"unsigned char", "short unsigned int", "unsigned int", \
|
||||
"logical*8", "long long int", "long long unsigned int",""}; \
|
||||
\
|
||||
tree decl; \
|
||||
int i; \
|
||||
\
|
||||
for (i=1;*dtyps[i];i++) \
|
||||
for (decl = syms; decl; decl = TREE_CHAIN(decl)) \
|
||||
if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && \
|
||||
!strcmp(IDENTIFIER_POINTER(DECL_NAME(decl)), dtyps[i])) { \
|
||||
TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \
|
||||
typevec[i] = TYPE_DEFINED; \
|
||||
dbxout_symbol (decl, 0); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
for (decl = syms; decl; decl = TREE_CHAIN(decl)) \
|
||||
if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && \
|
||||
!strcmp(IDENTIFIER_POINTER(DECL_NAME(decl)),"long int")) { \
|
||||
TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \
|
||||
typevec[i] = TYPE_DEFINED; \
|
||||
fprintf(asmfile,".stab \"long int:t%d=3\",0,0x%x,0,0\n", \
|
||||
i++,N_LSYM); \
|
||||
TREE_ASM_WRITTEN (decl) = 1; \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
for (decl = syms; decl; decl = TREE_CHAIN(decl)) \
|
||||
if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && !strcmp( \
|
||||
IDENTIFIER_POINTER(DECL_NAME(decl)),"long unsigned int")) { \
|
||||
TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \
|
||||
typevec[i] = TYPE_DEFINED; \
|
||||
fprintf(asmfile,".stab \"long unsigned int:t%d=17\",0,0x%x,0,0\n",\
|
||||
i++,N_LSYM); \
|
||||
TREE_ASM_WRITTEN (decl) = 1; \
|
||||
break; \
|
||||
} \
|
||||
next_type_number = i; };
|
||||
|
||||
/* Alliant dbx doesn't understand split names... */
|
||||
|
||||
#define DBX_CONTIN_LENGTH 0
|
||||
|
||||
/* The syntax for stabs records is also different; there is only a single
|
||||
".stab" directive instead of the 3 directives in BSD, and the order of
|
||||
arguments is slightly changed. */
|
||||
|
||||
#define ASM_STABS_OP "\t.stab "
|
||||
#define ASM_STABN_OP "\t.stab "
|
||||
#define ASM_STABD_OP "\t.stab "
|
||||
|
||||
#define DBX_MEMPARM_STABS_LETTER 'k'
|
||||
#define DBX_REGPARM_STABS_LETTER 'r'
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file,num) \
|
||||
fprintf (file, "\t.stab \"\",.,0x%x,0,%d\n", \
|
||||
N_SLINE,num)
|
||||
|
||||
#if 0 /* Alliant dbx only reads first N_SO, so it
|
||||
ignores the filename if dir is present. */
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(file,name) \
|
||||
fprintf (file, ".stab \"%s/\",.Ltext0,0x%x,0,0\n", \
|
||||
name, N_SO)
|
||||
#else
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(file,name)
|
||||
#endif
|
||||
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(file,name) \
|
||||
fprintf (file, ".stab "); \
|
||||
output_quoted_string (file, name); \
|
||||
fprintf (file, ",.Ltext0,0x%x,0,0\n", N_SO); \
|
||||
text_section (); \
|
||||
ASM_OUTPUT_INTERNAL_LABEL (file, "Ltext", 0)
|
||||
|
||||
#define DBX_OUTPUT_SOURCE_FILENAME(file,name) \
|
||||
do { fprintf (file, ".stab "); \
|
||||
output_quoted_string (file, name); \
|
||||
fprintf (file, ",.Ltext0,0x%x,0,0\n", N_SOL); \
|
||||
} while (0)
|
||||
|
||||
#define DBX_OUTPUT_CONSTANT_SYMBOL(file,name,ival) \
|
||||
fprintf (file, ".stab \"%s:c=i%d\",0,0x%x,0,0\n", \
|
||||
name, ival, N_LSYM)
|
||||
|
||||
#define DBX_FINISH_SYMBOL(decl) \
|
||||
int line = 0; \
|
||||
fprintf (asmfile, "\","); \
|
||||
if (current_sym_addr) \
|
||||
output_addr_const (asmfile, current_sym_addr); \
|
||||
else \
|
||||
fprintf (asmfile, "%d", current_sym_value); \
|
||||
if (decl != 0 && TREE_CODE(decl) == FUNCTION_DECL) \
|
||||
line=DECL_SOURCE_LINE (decl); \
|
||||
fprintf (asmfile, ",0x%x,%d,%d\n", current_sym_code, \
|
||||
line!=0?64:0,line)
|
||||
|
||||
#define DBX_OUTPUT_CATCH(file,decl,name) \
|
||||
fprintf (file, ".stab \"%s:C1\",", \
|
||||
IDENTIFIER_POINTER (DECL_NAME (decl))); \
|
||||
assemble_name (file, name); \
|
||||
fprintf (file, ",0x%x,0,0\n", N_CATCH)
|
||||
|
||||
#define DBX_OUTPUT_LBRAC(file,name) \
|
||||
if (depth > 1) { \
|
||||
fprintf (file, ".stab \"\","); \
|
||||
assemble_name (file, name); \
|
||||
fprintf (file, ",0x%x,0,%d\n", N_LBRAC, depth); }
|
||||
|
||||
#define DBX_OUTPUT_RBRAC(file,name) \
|
||||
if (depth > 1) { \
|
||||
fprintf (file, ".stab \"\","); \
|
||||
assemble_name (file, name); \
|
||||
fprintf (file, ",0x%x,0,%d\n", N_RBRAC, depth); }
|
||||
|
||||
#define DBX_OUTPUT_ENUM(file,type) \
|
||||
fprintf (file, "e3"); \
|
||||
CHARS(2); \
|
||||
for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem)) \
|
||||
{ \
|
||||
fprintf (asmfile, "%s:%d,", \
|
||||
IDENTIFIER_POINTER (TREE_PURPOSE (tem)), \
|
||||
TREE_INT_CST_LOW (TREE_VALUE (tem))); \
|
||||
CHARS (11 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem))); \
|
||||
if (TREE_CHAIN (tem) != 0) \
|
||||
CONTIN; \
|
||||
} \
|
||||
putc (';', asmfile); \
|
||||
CHARS (1);
|
||||
|
||||
/* Undefine some things defined in i860.h because the native C compiler
|
||||
on the FX/2800 emits code to do these operations inline. For GCC,
|
||||
we will use the default implementation of these things... i.e.
|
||||
generating calls to libgcc routines. */
|
||||
|
||||
#undef DIVSI3_LIBCALL
|
||||
#undef UDIVSI3_LIBCALL
|
||||
#undef REMSI3_LIBCALL
|
||||
#undef UREMSI3_LIBCALL
|
||||
|
||||
/* Global pointer needs to be 8 byte aligned? Link error if not... */
|
||||
|
||||
#define DATA_ALIGNMENT(dummy,align) \
|
||||
((TREE_PUBLIC (decl) && \
|
||||
(POINTER_TYPE_P (TREE_TYPE (decl)))) ? 64: align)
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
fprintf (FILE, "\tcall __mcount_\n\tnop\n")
|
||||
|
||||
/* Overrides for i860v4.h begin here */
|
||||
|
||||
/* Provide a set of pre-definitions and pre-assertions appropriate for
|
||||
the i860 running Concentrix 2.x. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Di860 -Dunix -DBSD4_3 -Dalliant -Asystem=unix -Asystem=bsd -Acpu=i860 -Amachine=i860"
|
||||
|
||||
#undef I860_REG_PREFIX
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START "//"
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE)
|
||||
#undef ASM_OUTPUT_FUNCTION_PREFIX
|
||||
#define ASM_OUTPUT_FUNCTION_PREFIX(FILE,NAME) \
|
||||
fputs("\tnop\n", (FILE)); \
|
||||
current_function_original_name = (NAME)
|
||||
#undef ASM_OUTPUT_PROLOGUE_SUFFIX
|
||||
|
||||
/* Overrides for svr4.h begin here */
|
||||
|
||||
#undef SWITCH_TAKES_ARG
|
||||
#undef WORD_SWITCH_TAKES_ARG
|
||||
|
||||
#undef ASM_SPEC
|
||||
#undef ASM_FINAL_SPEC
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#undef MD_EXEC_PREFIX
|
||||
|
||||
/* Generate an error message if -p option is selected. Concentrix 2.x
|
||||
does not support prof format profiling, only gprof is supported. */
|
||||
|
||||
#define CPP_SPEC "%{p:%e-p option not supported: use -pg instead}"
|
||||
|
||||
/* Provide an appropriate LIB_SPEC. The crtend.o file provides part of the
|
||||
support for getting C++ file-scope static objects constructed before
|
||||
entering `main'. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{g*:-lg} %{!pg:-lc}%{pg:-lc_p} crtend.o%s"
|
||||
|
||||
/* Tell linker to strip local symbols, since assembler may not. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-X"
|
||||
|
||||
/* Get the correct startup file for regular or profiled code. Also
|
||||
use the crtbegin.o file for C++ ... */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!pg:crt0.o%s}%{pg:gcrt0.o%s} crtbegin.o%s"
|
||||
|
||||
#undef SCCS_DIRECTIVE
|
||||
#undef NO_DOLLAR_IN_LABEL
|
||||
#undef TARGET_MEM_FUNCTIONS
|
||||
|
||||
#undef DWARF_DEBUGGING_INFO
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX "_"
|
||||
|
||||
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
|
||||
|
||||
/* ??? Is this used anywhere? */
|
||||
#undef BSS_ASM_OP
|
||||
#define BSS_ASM_OP "\t.lcomm "
|
||||
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(FILE) \
|
||||
do { \
|
||||
if (current_function_original_name != NULL) { \
|
||||
const char *long_op = integer_asm_op (4, FALSE); \
|
||||
tdesc_section(); \
|
||||
fprintf ((FILE), "%s __ETEXT\n", long_op); \
|
||||
fprintf ((FILE), "%s 0\n", long_op); \
|
||||
fputs ("\t.long\t__ETEXT\n", (FILE)); \
|
||||
fputs ("\t.long\t0\n", (FILE)); \
|
||||
text_section(); \
|
||||
fputs("__ETEXT:\n", (FILE)); \
|
||||
} \
|
||||
if (!flag_no_ident) \
|
||||
fprintf ((FILE), "\t.ident\t\"GCC: (GNU) %s\"\n", \
|
||||
version_string); \
|
||||
} while (0)
|
@ -1,61 +0,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 */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
/* 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
|
@ -1,188 +0,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
|
@ -1,164 +0,0 @@
|
||||
/* 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; \
|
||||
} \
|
||||
}
|
@ -1,143 +0,0 @@
|
||||
/* 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; \
|
||||
} \
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
# 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
|
@ -1,201 +0,0 @@
|
||||
/* 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__ */
|
@ -1,203 +0,0 @@
|
||||
/* 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"); \
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. Altos 3068 68020 version.
|
||||
Copyright (C) 1988, 1989, 1993, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Jyrki Kuoppala <jkp@cs.hut.fi>
|
||||
|
||||
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 "m68k/m68k.h"
|
||||
|
||||
/* See m68k.h. 7 means 68020 with 68881. */
|
||||
/* 5 is without 68881. Change to 7 if you have 68881 */
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020)
|
||||
|
||||
/* Don't try using XFmode. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
#endif
|
||||
|
||||
/* Define __HAVE_68881__ in preprocessor,
|
||||
according to the -m flags.
|
||||
This will control the use of inline 68881 insns in certain macros.
|
||||
Also inform the program which CPU this is for. */
|
||||
|
||||
#if TARGET_DEFAULT & MASK_68881
|
||||
|
||||
/* -m68881 is the default */
|
||||
#define CPP_SPEC \
|
||||
"%{!msoft-float:-D__HAVE_68881__ }\
|
||||
%{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
|
||||
|
||||
#else
|
||||
|
||||
/* -msoft-float is the default */
|
||||
#define CPP_SPEC \
|
||||
"%{m68881:-D__HAVE_68881__ }\
|
||||
%{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
|
||||
|
||||
#endif
|
||||
|
||||
/* -m68000 requires special flags to the assembler. */
|
||||
|
||||
#define ASM_SPEC \
|
||||
"%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem=unix -Acpu=m68k -Amachine=m68k"
|
||||
|
||||
/* Every structure or union's size must be a multiple of 2 bytes. */
|
||||
|
||||
#define STRUCTURE_SIZE_BOUNDARY 16
|
||||
|
||||
/* Generate calls to memcpy, memcmp and memset. */
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* We use gnu assembler, linker and gdb, so we want DBX format. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* Tell some conditionals we will use GAS. Is this really used? */
|
||||
|
||||
#define USE_GAS
|
||||
|
||||
#undef ASM_OUTPUT_FLOAT_OPERAND
|
||||
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
|
||||
do { \
|
||||
if (CODE == 'f') \
|
||||
{ \
|
||||
char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
|
||||
fprintf (FILE, "#0r%s", dstr); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
long l; \
|
||||
REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
|
||||
if (sizeof (int) == sizeof (long)) \
|
||||
asm_fprintf ((FILE), "%I0x%x", (int) l); \
|
||||
else \
|
||||
asm_fprintf ((FILE), "%I0x%lx", l); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#undef ASM_OUTPUT_DOUBLE_OPERAND
|
||||
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
|
||||
do { char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
|
||||
fprintf (FILE, "#0r%s", dstr); \
|
||||
} while (0)
|
||||
|
||||
/* Return pointer values in both d0 and a0. */
|
||||
|
||||
#undef FUNCTION_EXTRA_EPILOGUE
|
||||
#define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
|
||||
{ \
|
||||
if (current_function_returns_pointer \
|
||||
&& ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \
|
||||
fprintf (FILE, "\tmovel d0,a0\n"); \
|
||||
}
|
@ -1,205 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. Apollo 680X0 version.
|
||||
Copyright (C) 1989, 1992, 1996, 1997, 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. */
|
||||
|
||||
#include "m68k/m68k.h"
|
||||
|
||||
/* This symbol may be tested in other files for special Apollo handling */
|
||||
|
||||
#define TM_APOLLO
|
||||
|
||||
/* See m68k.h. 7 means 68020 with 68881. */
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
|
||||
#endif
|
||||
|
||||
/* Target switches for the Apollo is the same as in m68k.h, except
|
||||
there is no Sun FPA. */
|
||||
|
||||
#undef TARGET_SWITCHES
|
||||
#define TARGET_SWITCHES \
|
||||
{ { "68020", 5}, \
|
||||
{ "c68020", 5}, \
|
||||
{ "68881", 2}, \
|
||||
{ "bitfield", 4}, \
|
||||
{ "68000", -5}, \
|
||||
{ "c68000", -5}, \
|
||||
{ "soft-float", -0102}, \
|
||||
{ "nobitfield", -4}, \
|
||||
{ "rtd", 8}, \
|
||||
{ "nortd", -8}, \
|
||||
{ "short", 040}, \
|
||||
{ "noshort", -040}, \
|
||||
{ "", TARGET_DEFAULT}}
|
||||
|
||||
/* Define __HAVE_68881__ in preprocessor,
|
||||
according to the -m flags.
|
||||
This will control the use of inline 68881 insns in certain macros.
|
||||
Also inform the program which CPU this is for. */
|
||||
|
||||
#if TARGET_DEFAULT & MASK_68881
|
||||
|
||||
/* -m68881 is the default */
|
||||
#define CPP_SPEC \
|
||||
"%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\
|
||||
%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
|
||||
%{!ansi:-D_APOLLO_SOURCE}}"
|
||||
|
||||
#else
|
||||
|
||||
/* -msoft-float is the default */
|
||||
#define CPP_SPEC \
|
||||
"%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
|
||||
%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
|
||||
%{!ansi:-D_APOLLO_SOURCE}}"
|
||||
|
||||
#endif
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
/* These are the ones defined by Apollo, plus mc68000 for uniformity with
|
||||
GCC on other 68000 systems. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dapollo -Daegis -Dunix -Asystem=unix -Acpu=m68k -Amachine=m68k"
|
||||
|
||||
/* cpp has to support a #sccs directive for the /usr/include files */
|
||||
|
||||
#define SCCS_DIRECTIVE
|
||||
|
||||
/* Allow #ident but output nothing for it. */
|
||||
|
||||
#define IDENT_DIRECTIVE
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME)
|
||||
|
||||
/* -m68000 requires special flags to the assembler. */
|
||||
|
||||
#define ASM_SPEC \
|
||||
"%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
|
||||
|
||||
/* STARTFILE_SPEC
|
||||
Note that includes knowledge of the default specs for gcc, ie. no
|
||||
args translates to the same effect as -m68881 */
|
||||
|
||||
#if TARGET_DEFAULT & MASK_68881
|
||||
/* -m68881 is the default */
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
#else
|
||||
/* -msoft-float is the default */
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
#endif
|
||||
|
||||
/* Specify library to handle `-a' basic block profiling. */
|
||||
|
||||
#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
|
||||
%{a:/usr/lib/bb_link.o} "
|
||||
|
||||
/* Debugging is not supported yet */
|
||||
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
/* troy@cbme.unsw.edu.au says people are still using sr10.2
|
||||
and it does not support atexit. */
|
||||
#define NEED_ATEXIT
|
||||
|
||||
/* Every structure or union's size must be a multiple of 2 bytes. */
|
||||
|
||||
#define STRUCTURE_SIZE_BOUNDARY 16
|
||||
|
||||
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
||||
#undef STACK_BOUNDARY
|
||||
#define STACK_BOUNDARY 32
|
||||
|
||||
/* Functions which return large structures get the address
|
||||
to place the wanted value from a hidden parameter. */
|
||||
|
||||
#undef PCC_STATIC_STRUCT_RETURN
|
||||
#undef STRUCT_VALUE_REGNUM
|
||||
#define STRUCT_VALUE 0
|
||||
#define STRUCT_VALUE_INCOMING 0
|
||||
|
||||
/* Specify how to pad function arguments.
|
||||
Arguments are not padded at all; the stack is kept aligned on long
|
||||
boundaries. */
|
||||
|
||||
#define FUNCTION_ARG_PADDING(mode, size) none
|
||||
|
||||
/* The definition of this macro imposes a limit on the size of
|
||||
an aggregate object which can be treated as if it were a scalar
|
||||
object. */
|
||||
|
||||
#define MAX_FIXED_MODE_SIZE BITS_PER_WORD
|
||||
|
||||
/* The definition of this macro implies that there are cases where
|
||||
a scalar value cannot be returned in registers.
|
||||
For Apollo, anything larger than one integer register is returned
|
||||
using the structure-value mechanism, i.e. objects of DFmode are
|
||||
returned that way. */
|
||||
|
||||
#define RETURN_IN_MEMORY(type) \
|
||||
(TYPE_MODE (type) == BLKmode \
|
||||
|| GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
|
||||
|
||||
/* In order to link with Apollo libraries, we can't prefix external
|
||||
symbols with an underscore. */
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
|
||||
/* Use a prefix for local labels, just to be on the save side. */
|
||||
|
||||
#undef LOCAL_LABEL_PREFIX
|
||||
#define LOCAL_LABEL_PREFIX "."
|
||||
|
||||
/* Use a register prefix to avoid clashes with external symbols (classic
|
||||
example: `extern char PC;' in termcap). */
|
||||
|
||||
#undef REGISTER_PREFIX
|
||||
#define REGISTER_PREFIX "%"
|
||||
|
||||
/* config/m68k.md has an explicit reference to the program counter,
|
||||
prefix this by the register prefix. */
|
||||
|
||||
#define ASM_RETURN_CASE_JUMP \
|
||||
do { \
|
||||
if (TARGET_5200) \
|
||||
return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
|
||||
else \
|
||||
return "jmp %%pc@(2,%0:w)"; \
|
||||
} while (0)
|
||||
|
||||
/* Here are the new register names. */
|
||||
|
||||
#undef REGISTER_NAMES
|
||||
#ifndef SUPPORT_SUN_FPA
|
||||
#define REGISTER_NAMES \
|
||||
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
|
||||
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
|
||||
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
|
||||
#else /* SUPPORTED_SUN_FPA */
|
||||
#define REGISTER_NAMES \
|
||||
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
|
||||
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
|
||||
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
|
||||
"%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
|
||||
"%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
|
||||
"%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
|
||||
"%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
|
||||
#endif /* defined SUPPORT_SUN_FPA */
|
@ -1,129 +0,0 @@
|
||||
/* Startup code for A/UX
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
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 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.)
|
||||
|
||||
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. */
|
||||
|
||||
/* This file is compiled three times to produce crt1.o, mcrt1.o, and
|
||||
maccrt1.o. The final two are created by defining MCRT1 and MACCRT1
|
||||
respectively. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef MCRT1
|
||||
#include <unistd.h>
|
||||
#include <mon.h>
|
||||
#endif
|
||||
|
||||
/* Extern function declarations */
|
||||
|
||||
extern void initfpu(void);
|
||||
extern void __istart(void);
|
||||
extern void __compatmode(void);
|
||||
extern void _cleanup(void);
|
||||
extern int main(int, char **, char **);
|
||||
extern void exit(int) __attribute__((noreturn));
|
||||
extern void _exit(int) __attribute__((noreturn));
|
||||
|
||||
#ifdef MACCRT1
|
||||
extern void InitMac(void);
|
||||
#endif
|
||||
#ifdef MCRT1
|
||||
static void monitor_start(void);
|
||||
#endif
|
||||
|
||||
/* Global variables */
|
||||
|
||||
char **environ;
|
||||
char *__splimit; /* address of top of stack */
|
||||
|
||||
|
||||
/* Initialize system and run */
|
||||
|
||||
void _start() __attribute__((noreturn));
|
||||
void _start()
|
||||
{
|
||||
register int *fp __asm__("%a6");
|
||||
register char *d0 __asm__("%d0");
|
||||
char **argv;
|
||||
int argc;
|
||||
|
||||
__splimit = d0;
|
||||
argc = fp[1];
|
||||
argv = (char **)&fp[2];
|
||||
environ = &argv[argc+1];
|
||||
|
||||
initfpu();
|
||||
__istart();
|
||||
__compatmode();
|
||||
|
||||
atexit(_cleanup);
|
||||
#ifdef MCRT1
|
||||
monitor_start();
|
||||
#endif
|
||||
#ifdef MACCRT1
|
||||
InitMac();
|
||||
#endif
|
||||
|
||||
exit(main(argc, argv, environ));
|
||||
}
|
||||
|
||||
|
||||
#ifdef MCRT1
|
||||
/* Start/Stop program monitor */
|
||||
|
||||
extern void monitor(void *, void *, WORD *, int, int);
|
||||
|
||||
static WORD *monitor_buffer;
|
||||
|
||||
static void monitor_cleanup(void)
|
||||
{
|
||||
monitor(NULL, NULL, NULL, 0, 0);
|
||||
free(monitor_buffer);
|
||||
}
|
||||
|
||||
static void monitor_start(void)
|
||||
{
|
||||
extern int etext;
|
||||
extern int stext __asm__(".text");
|
||||
|
||||
/* Choice of buffer size should be "no more than a few times
|
||||
smaller than the program size" -- I don't believe that there
|
||||
are any (useful) functions smaller than two insns (4 bytes)
|
||||
so that is the scale factor used here */
|
||||
int len = (&etext - &stext + 1) / 4;
|
||||
|
||||
monitor_buffer = (WORD *)calloc(len, sizeof(WORD));
|
||||
if (monitor_buffer == NULL)
|
||||
{
|
||||
static const char msg[] = "mcrt1: could not allocate monitor buffer\n";
|
||||
write(2, msg, sizeof(msg)-1);
|
||||
_exit(-1);
|
||||
}
|
||||
|
||||
/* I'm not sure why the count cap at 600 -- but that is what A/UX does */
|
||||
monitor(&stext, &etext, monitor_buffer, len, 600);
|
||||
|
||||
atexit(monitor_cleanup);
|
||||
}
|
||||
#endif /* MCRT1 */
|
@ -1,42 +0,0 @@
|
||||
/* More startup code for A/UX */
|
||||
|
||||
#include "tconfig.h"
|
||||
|
||||
#ifdef USE_BIN_AS
|
||||
file "crt2.s"
|
||||
|
||||
/* The init section is used to support shared libraries */
|
||||
init
|
||||
global __istart
|
||||
|
||||
__istart:
|
||||
link %fp,&-4
|
||||
#else
|
||||
.file "crt2.s"
|
||||
|
||||
/* The init section is used to support shared libraries */
|
||||
.section .init, "x"
|
||||
.even
|
||||
.globl __istart
|
||||
|
||||
__istart:
|
||||
link %fp,#-4
|
||||
|
||||
#ifndef USE_COLLECT2
|
||||
/* The ctors and dtors sections are used to support COFF collection of
|
||||
c++ constructors and destructors */
|
||||
.section .ctors, "d"
|
||||
.even
|
||||
.globl __CTOR_LIST__
|
||||
|
||||
__CTOR_LIST__:
|
||||
.long -1
|
||||
|
||||
.section .dtors, "d"
|
||||
.even
|
||||
.globl __DTOR_LIST__
|
||||
|
||||
__DTOR_LIST__:
|
||||
.long -1
|
||||
#endif /* USE_COLLECT2 */
|
||||
#endif /* USE_BIN_AS */
|
@ -1,26 +0,0 @@
|
||||
/* More startup code for A/UX */
|
||||
|
||||
#include "tconfig.h"
|
||||
|
||||
#ifdef USE_BIN_AS
|
||||
file "crtn.s"
|
||||
|
||||
init
|
||||
|
||||
unlk %fp
|
||||
rts
|
||||
#else
|
||||
.file "crtn.s"
|
||||
|
||||
.section .init, "x"
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
#ifndef USE_COLLECT2
|
||||
.section .ctors, "d"
|
||||
.long 0
|
||||
|
||||
.section .dtors, "d"
|
||||
.long 0
|
||||
#endif /* USE_COLLECT2 */
|
||||
#endif /* USE_BIN_AS */
|
@ -1,94 +0,0 @@
|
||||
/* Generic atexit()
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
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 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.)
|
||||
|
||||
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. */
|
||||
|
||||
/* Rather than come up with some ugly hack to make mcrt1 work, it is
|
||||
better to just go ahead and provide atexit(). */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void exit(int) __attribute__((noreturn));
|
||||
void _exit(int) __attribute__((noreturn));
|
||||
void _cleanup(void);
|
||||
|
||||
|
||||
#define FNS_PER_BLOCK 32
|
||||
|
||||
struct atexit_fn_block
|
||||
{
|
||||
struct atexit_fn_block *next;
|
||||
void (*fns[FNS_PER_BLOCK])(void);
|
||||
short used;
|
||||
};
|
||||
|
||||
|
||||
/* statically allocate the first block */
|
||||
static struct atexit_fn_block atexit_fns;
|
||||
static struct atexit_fn_block *current_block = &atexit_fns;
|
||||
|
||||
|
||||
int atexit(void (*fn)(void))
|
||||
{
|
||||
if (current_block->used >= FNS_PER_BLOCK)
|
||||
{
|
||||
struct atexit_fn_block *new_block =
|
||||
(struct atexit_fn_block *)malloc(sizeof(struct atexit_fn_block));
|
||||
if (new_block == NULL)
|
||||
return -1;
|
||||
|
||||
new_block->used = 0;
|
||||
new_block->next = current_block;
|
||||
current_block = new_block;
|
||||
}
|
||||
|
||||
current_block->fns[current_block->used++] = fn;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void exit(int status)
|
||||
{
|
||||
struct atexit_fn_block *block = current_block, *old_block;
|
||||
short i;
|
||||
|
||||
while (1)
|
||||
{
|
||||
for (i = block->used; --i >= 0 ;)
|
||||
(*block->fns[i])();
|
||||
if (block == &atexit_fns)
|
||||
break;
|
||||
/* I know what you are thinking -- we are about to exit, why free?
|
||||
Because it is friendly to memory leak detectors, that's why. */
|
||||
old_block = block;
|
||||
block = block->next;
|
||||
free(old_block);
|
||||
}
|
||||
|
||||
_exit(status);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/* GLD link script for building mac-compatible executables */
|
||||
|
||||
OUTPUT_FORMAT("coff-m68k")
|
||||
|
||||
SEARCH_DIR(@tooldir@/lib);
|
||||
SEARCH_DIR(@libdir@);
|
||||
SEARCH_DIR(/lib);
|
||||
SEARCH_DIR(/usr/lib);
|
||||
SEARCH_DIR(@local_prefix@/lib);
|
||||
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.lowmem 0 (DSECT) : {
|
||||
/usr/lib/low.o (.data)
|
||||
}
|
||||
.text 0x10000000 : {
|
||||
*(.text)
|
||||
*(.init)
|
||||
*(.fini)
|
||||
etext = .;
|
||||
_etext = .;
|
||||
}
|
||||
.data ALIGN(0x40000) : {
|
||||
*(.data)
|
||||
*(.ctors)
|
||||
*(.dtors)
|
||||
edata = .;
|
||||
_edata = .;
|
||||
}
|
||||
.bss : {
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
end = .;
|
||||
_end = .;
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
/* Profiling support code for A/UX
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
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 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.)
|
||||
|
||||
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. */
|
||||
|
||||
/* This routine is called at the beginning of functions compiled with -p
|
||||
or -pg. The A/UX libraries call mcount%, but gas cannot generate
|
||||
symbols with embedded percent signs. Previous ports of GCC to A/UX
|
||||
have done things like (1) assemble a stub routine with the native
|
||||
assembler, or (2) assemble a stub routine with gas and edit the object
|
||||
file. This solution has the advantage that it can interoperate with
|
||||
the A/UX version and can be used in an eventual port of glibc to A/UX. */
|
||||
|
||||
#ifndef __GNUC__
|
||||
#error This file uses GNU C extensions
|
||||
#endif
|
||||
|
||||
#include "tconfig.h"
|
||||
#include <mon.h>
|
||||
|
||||
struct cnt *_countbase;
|
||||
|
||||
#ifdef FUNCTION_PROFILER_SYMBOL
|
||||
void __mcount() __asm__(FUNCTION_PROFILER_SYMBOL);
|
||||
#endif
|
||||
|
||||
void __mcount()
|
||||
{
|
||||
register long **pfncnt __asm__("%a0");
|
||||
register long *fncnt = *pfncnt;
|
||||
|
||||
if (!fncnt)
|
||||
{
|
||||
struct cnt *newcnt = _countbase++;
|
||||
newcnt->fnpc = (char *)__builtin_return_address(0);
|
||||
*pfncnt = fncnt = &newcnt->mcnt;
|
||||
}
|
||||
*fncnt += 1;
|
||||
}
|
@ -1,177 +0,0 @@
|
||||
/* Definitions for Motorola 680x0 running A/UX using /bin/as
|
||||
Copyright (C) 1996, 1997, 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 USE_BIN_AS
|
||||
|
||||
#ifndef USE_COLLECT2
|
||||
#define USE_COLLECT2
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include "m68k/sgs.h"
|
||||
|
||||
#define ASM_SPEC "%{m68030:-68030 }%{m68040:-68040 }"
|
||||
|
||||
/* Modify AT&T SGS assembler syntax */
|
||||
/* A/UX's as doesn't do dots in pseudo-ops */
|
||||
|
||||
#define SDB_DEBUGGING_INFO
|
||||
|
||||
#define NO_DOLLAR_IN_LABEL
|
||||
#define NO_DOT_IN_LABEL
|
||||
|
||||
#undef INT_OP_GROUP
|
||||
#define INT_OP_GROUP INT_OP_NO_DOT
|
||||
|
||||
#undef TEXT_SECTION_ASM_OP
|
||||
#define TEXT_SECTION_ASM_OP "\ttext"
|
||||
|
||||
#undef DATA_SECTION_ASM_OP
|
||||
#define DATA_SECTION_ASM_OP "\tdata\t1"
|
||||
|
||||
#undef SPACE_ASM_OP
|
||||
#define SPACE_ASM_OP "\tspace\t"
|
||||
|
||||
#undef ALIGN_ASM_OP
|
||||
#define ALIGN_ASM_OP "\talign\t"
|
||||
|
||||
#undef GLOBAL_ASM_OP
|
||||
#define GLOBAL_ASM_OP "\tglobal\t"
|
||||
|
||||
#undef SWBEG_ASM_OP
|
||||
#define SWBEG_ASM_OP "\tswbeg\t"
|
||||
|
||||
#undef SET_ASM_OP
|
||||
#define SET_ASM_OP "\tset\t"
|
||||
|
||||
#undef ASM_PN_FORMAT
|
||||
#define ASM_PN_FORMAT "%s%%%d"
|
||||
|
||||
#undef LOCAL_LABEL_PREFIX
|
||||
#define LOCAL_LABEL_PREFIX "L%"
|
||||
|
||||
#define ADDITIONAL_REGISTER_NAMES { {"%a6", 14}, {"%a7", 15} }
|
||||
|
||||
#undef ASM_OUTPUT_COMMON
|
||||
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs ("\tcomm\t", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs ("\tlcomm\t", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
output_file_directive ((FILE), main_input_filename)
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_FILENAME
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \
|
||||
( fputs ("\tfile\t", (FILE)), \
|
||||
output_quoted_string ((FILE), (NAME)), \
|
||||
fputc ('\n', (FILE)) )
|
||||
|
||||
#undef ASM_OUTPUT_CASE_FETCH
|
||||
#define ASM_OUTPUT_CASE_FETCH(file, labelno, regname) \
|
||||
asm_fprintf (file, "10(%Rpc,%s.", regname)
|
||||
|
||||
#define SGS_NO_LI
|
||||
|
||||
/* Random macros describing parts of SDB data. */
|
||||
|
||||
#define PUT_SDB_SCL(a) \
|
||||
fprintf(asm_out_file, "\tscl\t%d%s", (a), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_INT_VAL(a) \
|
||||
fprintf (asm_out_file, "\tval\t%d%s", (a), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_VAL(a) \
|
||||
( fputs ("\tval\t", asm_out_file), \
|
||||
output_addr_const (asm_out_file, (a)), \
|
||||
fprintf (asm_out_file, SDB_DELIM))
|
||||
|
||||
#define PUT_SDB_DEF(a) \
|
||||
do { fprintf (asm_out_file, "\tdef\t"); \
|
||||
ASM_OUTPUT_LABELREF (asm_out_file, a); \
|
||||
fprintf (asm_out_file, SDB_DELIM); } while (0)
|
||||
|
||||
#define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s%s", a, SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file)
|
||||
|
||||
#define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o%s", a, SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d%s", a, SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t")
|
||||
|
||||
#define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a)
|
||||
|
||||
#define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d%s", a, SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_TAG(a) \
|
||||
do { fprintf (asm_out_file, "\ttag\t"); \
|
||||
ASM_OUTPUT_LABELREF (asm_out_file, a); \
|
||||
fprintf (asm_out_file, SDB_DELIM); } while (0)
|
||||
|
||||
#define PUT_SDB_BLOCK_START(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\tdef\t~bb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_BLOCK_END(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\tdef\t~eb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_FUNCTION_START(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\tdef\t~bf%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_FUNCTION_END(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\tdef\t~ef%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_EPILOGUE_END(NAME) \
|
||||
do { fprintf (asm_out_file, "\tdef\t"); \
|
||||
ASM_OUTPUT_LABELREF (asm_out_file, NAME); \
|
||||
fprintf (asm_out_file, \
|
||||
"%s\tval\t~%s\tscl\t-1%s\tendef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM); } while (0)
|
||||
|
||||
#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
|
||||
sprintf ((BUFFER), "~%dfake", (NUMBER));
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
fprintf((FILE), "\tln\t%d\n", \
|
||||
(sdb_begin_function_line > 1 ? \
|
||||
(LINE) - sdb_begin_function_line : 1))
|
||||
|
||||
#define ASM_MOV_INSN "mov.l"
|
||||
|
||||
#define FUNCTION_PROFILER_SYMBOL "mcount%"
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
@ -1,46 +0,0 @@
|
||||
/* Definitions for Motorola 680x0 running A/UX using GAS
|
||||
Copyright (C) 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. */
|
||||
|
||||
#define USE_GAS
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include "m68k/m68k.h"
|
||||
#include "m68k/coff.h"
|
||||
|
||||
#define ASM_SPEC "%{m68000:-Am68000 }%{m68030:-Am68030 }%{m68040:-Am68040 }"
|
||||
|
||||
/* Output #ident as a .ident. */
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME) \
|
||||
fprintf (FILE, "\t.ident \"%s\"\n", NAME);
|
||||
|
||||
#ifdef USE_COLLECT2
|
||||
/* for the sake of link-level compatibility with /bin/as version */
|
||||
#define NO_DOLLAR_IN_LABEL
|
||||
#define NO_DOT_IN_LABEL
|
||||
#endif
|
||||
|
||||
#define ADDITIONAL_REGISTER_NAMES { {"%fp", 14}, {"%a7", 15} }
|
||||
|
||||
#define ASM_MOV_INSN "movel"
|
||||
|
||||
#define FUNCTION_PROFILER_SYMBOL "__mcount"
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
@ -1,29 +0,0 @@
|
||||
/* Definitions for Motorola 680x0 running A/UX using GLD
|
||||
Copyright (C) 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. */
|
||||
|
||||
#define USE_GNU_LD
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define LINK_SPEC \
|
||||
"%{p:-L/lib/libp -L/usr/lib/libp }%{pg:-L/lib/libp -L/usr/lib/libp }\
|
||||
%{smac:-T low.gld%s }"
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
@ -1,35 +0,0 @@
|
||||
/* Definitions for Motorola 680x0 running A/UX using /bin/ld
|
||||
Copyright (C) 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. */
|
||||
|
||||
#define USE_BIN_LD
|
||||
|
||||
#ifndef USE_COLLECT2
|
||||
#define USE_COLLECT2
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define LINK_SPEC \
|
||||
"%{p:-L/lib/libp -L/usr/lib/libp }%{pg:-L/lib/libp -L/usr/lib/libp }\
|
||||
%{smac:low.ld%s }%{!smac:shlib.ld%s }"
|
||||
|
||||
#define SWITCHES_NEED_SPACES "o"
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
@ -1,48 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler.
|
||||
Convergent Technologies MiniFrame version,
|
||||
using GAS and binutils with COFF encapsulation.
|
||||
|
||||
Written by Ronald Cole
|
||||
|
||||
Because the MiniFrame's C compiler is so completely lobotomized,
|
||||
bootstrapping this is damn near impossible!
|
||||
Write to me for information on obtaining the binaries...
|
||||
|
||||
bug reports to csusac!unify!rjc@ucdavis.edu
|
||||
|
||||
Copyright (C) 1990 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. */
|
||||
|
||||
#include "m68k/3b1g.h"
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dmc68000 -Dmc68k -Dunix -Dctix -Asystem=unix -Acpu=m68k -Amachine=m68k"
|
||||
|
||||
/* Where to look for robotussinized startfiles. */
|
||||
#undef STANDARD_STARTFILE_PREFIX
|
||||
#define STANDARD_STARTFILE_PREFIX "/usr/local/lib/gnu/"
|
||||
|
||||
/* Generate calls to the MiniFrame's library (for speed). */
|
||||
#define DIVSI3_LIBCALL "ldiv"
|
||||
#define UDIVSI3_LIBCALL "uldiv"
|
||||
#define MODSI3_LIBCALL "lrem"
|
||||
#define UMODSI3_LIBCALL "ulrem"
|
||||
#define MULSI3_LIBCALL "lmul"
|
||||
#define UMULSI3_LIBCALL "ulmul"
|
@ -1,492 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler.
|
||||
Bull DPX/2 200 and 300 systems (m68k, SysVr3).
|
||||
Copyright (C) 1987, 1993, 1994, 1995, 1996, 1999, 2000, 2002
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr).
|
||||
|
||||
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. */
|
||||
|
||||
|
||||
#ifndef USE_GAS
|
||||
#define MOTOROLA /* Use Motorola syntax rather than "MIT" */
|
||||
#define SGS_NO_LI /* Suppress jump table label usage */
|
||||
#define VERSADOS /* This is the name of the assembler we have */
|
||||
#endif
|
||||
|
||||
#include "m68k/m68k.h"
|
||||
#include "svr3.h"
|
||||
|
||||
#undef INT_OP_GROUP
|
||||
#define INT_OP_GROUP INT_OP_DC
|
||||
|
||||
/* We use collect2 instead of ctors_section constructors. */
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#undef FINI_SECTION_ASM_OP
|
||||
#undef DTORS_SECTION_ASM_OP
|
||||
#undef DO_GLOBAL_CTORS_BODY
|
||||
|
||||
/* Remove handling for a separate constant data section. We put
|
||||
constant data in text_section, which is the default. */
|
||||
#undef TARGET_ASM_SELECT_SECTION
|
||||
#undef EXTRA_SECTIONS
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#undef READONLY_DATA_SECTION_ASM_OP
|
||||
|
||||
#define DPX2
|
||||
|
||||
/* See m68k.h. 7 means 68020 with 68881.
|
||||
* We really have 68030 and 68882,
|
||||
* but this will get us going.
|
||||
*/
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
|
||||
#endif
|
||||
|
||||
#define OBJECT_FORMAT_COFF
|
||||
|
||||
#ifdef CPP_PREDEFINES
|
||||
#undef CPP_PREDEFINES
|
||||
#endif
|
||||
/*
|
||||
* define all the things the compiler should
|
||||
*/
|
||||
#ifdef ncl_mr
|
||||
# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_mr=1 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"
|
||||
#else
|
||||
# ifdef ncl_el
|
||||
# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_el -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"
|
||||
# else
|
||||
# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#undef CPP_SPEC
|
||||
/*
|
||||
* you can't get a DPX/2 without a 68882 but allow it
|
||||
* to be ignored...
|
||||
*/
|
||||
# define __HAVE_68881__ 1
|
||||
# define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }"
|
||||
|
||||
#undef DO_GLOBAL_CTORS_BODY /* don't use svr3.h version */
|
||||
#undef DO_GLOBAL_DTORS_BODY
|
||||
|
||||
#ifndef USE_GAS
|
||||
/*
|
||||
* handle the native MOTOROLA VERSAdos assembler.
|
||||
*/
|
||||
|
||||
/* See m68k.h. 3 means 68020 with 68881 and no bitfield
|
||||
* bitfield instructions do not seem to work a clean way.
|
||||
*/
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_68881|MASK_68020)
|
||||
|
||||
/* The native assembler doesn't support fmovecr. */
|
||||
#define NO_ASM_FMOVECR
|
||||
|
||||
#undef TEXT_SECTION_ASM_OP
|
||||
#define TEXT_SECTION_ASM_OP "\tsection 10"
|
||||
#undef DATA_SECTION_ASM_OP
|
||||
#define DATA_SECTION_ASM_OP "\tsection 15"
|
||||
#define BSS_SECTION_ASM_OP "\tsection 14"
|
||||
|
||||
|
||||
/* Don't try using XFmode. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_FILENAME
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \
|
||||
do { \
|
||||
fprintf (FILE, "\t.file\t"); \
|
||||
output_quoted_string (FILE, NA); \
|
||||
putc ('\n', FILE); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* we don't seem to support any of:
|
||||
* .globl
|
||||
* .even
|
||||
* .align
|
||||
* .ascii
|
||||
*/
|
||||
#undef ASM_OUTPUT_SKIP
|
||||
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
||||
fprintf (FILE, "\tdcb.b %u,0\n", (SIZE))
|
||||
|
||||
#undef GLOBAL_ASM_OP
|
||||
#define GLOBAL_ASM_OP "\txdef\t"
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG) >= 1) \
|
||||
fprintf (FILE, "\tds.w 0\n");
|
||||
|
||||
|
||||
#define STRING_LIMIT (0)
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON ""
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF ""
|
||||
/*
|
||||
* dc.b 'hello, world!'
|
||||
* dc.b 10,0
|
||||
* is how we have to output "hello, world!\n"
|
||||
*/
|
||||
#undef ASM_OUTPUT_ASCII
|
||||
#define ASM_OUTPUT_ASCII(asm_out_file, p, thissize) \
|
||||
do { register int i, c, f=0, len=0; \
|
||||
for (i = 0; i < thissize; i++) { \
|
||||
c = p[i]; \
|
||||
if (c == '\'' || c < ' ' || c > 127) { \
|
||||
switch(f) { \
|
||||
case 0: /* need to output dc.b etc */ \
|
||||
fprintf(asm_out_file, "\tdc.b %d", c); \
|
||||
f=1; \
|
||||
break; \
|
||||
case 1: \
|
||||
fprintf(asm_out_file, ",%d", c); \
|
||||
break; \
|
||||
default: \
|
||||
/* close a string */ \
|
||||
fprintf(asm_out_file, "'\n\tdc.b %d", c); \
|
||||
f=1; \
|
||||
break; \
|
||||
} \
|
||||
} else { \
|
||||
switch(f) { \
|
||||
case 0: \
|
||||
fprintf(asm_out_file, "\tdc.b '%c", c); \
|
||||
f=2; \
|
||||
break; \
|
||||
case 2: \
|
||||
if (len >= 79) { \
|
||||
fprintf(asm_out_file, "'\n\tdc.b '%c", c); \
|
||||
len = 0; } \
|
||||
else \
|
||||
fprintf(asm_out_file, "%c", c); \
|
||||
break; \
|
||||
default: \
|
||||
len = 0; \
|
||||
fprintf(asm_out_file, "\n\tdc.b '%c", c); \
|
||||
f=2; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
len++; \
|
||||
} \
|
||||
if (f==2) \
|
||||
putc('\'', asm_out_file); \
|
||||
putc('\n', asm_out_file); } while (0)
|
||||
|
||||
/* This is how to output an insn to push a register on the stack.
|
||||
It need not be very fast code. */
|
||||
|
||||
#undef ASM_OUTPUT_REG_PUSH
|
||||
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
|
||||
fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO])
|
||||
|
||||
/* This is how to output an insn to pop a register from the stack.
|
||||
It need not be very fast code. */
|
||||
|
||||
#undef ASM_OUTPUT_REG_POP
|
||||
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
|
||||
fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO])
|
||||
|
||||
|
||||
#define PUT_SDB_FUNCTION_START(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\t.def\t.bf%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_FUNCTION_END(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\t.def\t.ef%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_BLOCK_START(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\t.def\t.bb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_BLOCK_END(LINE) \
|
||||
fprintf (asm_out_file, \
|
||||
"\t.def\t.eb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \
|
||||
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
||||
|
||||
#define PUT_SDB_EPILOGUE_END(NAME)
|
||||
|
||||
/* Output type in decimal not in octal as done in sdbout.c */
|
||||
#define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0%d%s", a, SDB_DELIM)
|
||||
|
||||
/* Translate Motorola opcodes such as `jbeq'
|
||||
into VERSAdos opcodes such as `beq'.
|
||||
Change `fbeq' to `fbseq', `fbne' to `fbsneq'.
|
||||
*/
|
||||
|
||||
#undef ASM_OUTPUT_OPCODE
|
||||
#define ASM_OUTPUT_OPCODE(FILE, PTR) \
|
||||
{ if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \
|
||||
{ ++(PTR); \
|
||||
while (*(PTR) != ' ') \
|
||||
{ putc (*(PTR), (FILE)); ++(PTR); } \
|
||||
} \
|
||||
else if ((PTR)[0] == 'f') \
|
||||
{ \
|
||||
if (!strncmp ((PTR), "fbeq", 4)) \
|
||||
{ fprintf ((FILE), "fbseq"); (PTR) += 4; } \
|
||||
else if (!strncmp ((PTR), "fbne", 4)) \
|
||||
{ fprintf ((FILE), "fbsneq"); (PTR) += 4; } \
|
||||
} \
|
||||
else if ((PTR)[0] == 'b' && (PTR)[1] == 'f') \
|
||||
{ \
|
||||
char *s; \
|
||||
if ((s = (char*)strchr ((PTR), '{'))) \
|
||||
while (*s != '}') { \
|
||||
if (*s == 'b') \
|
||||
/* hack, I replace it with R ie nothing */ \
|
||||
*s = '0'; \
|
||||
s++; } \
|
||||
} \
|
||||
}
|
||||
|
||||
/* This is how to output an element of a case-vector that is absolute.
|
||||
(The 68000 does not use such vectors,
|
||||
but we must define this macro anyway.) */
|
||||
#undef ASM_OUTPUT_ADDR_VEC_ELT
|
||||
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
|
||||
asm_fprintf (FILE, "\tdc.l %LL%d\n", VALUE)
|
||||
|
||||
/* This is how to output an element of a case-vector that is relative. */
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
||||
asm_fprintf (FILE, "\tdc.w %LL%d-%LL%d\n", VALUE, REL)
|
||||
|
||||
/* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to
|
||||
keep switch tables in the text section. */
|
||||
#define JUMP_TABLES_IN_TEXT_SECTION 1
|
||||
|
||||
/* Output a float value (represented as a C double) as an immediate operand.
|
||||
This macro is a 68k-specific macro. */
|
||||
#undef ASM_OUTPUT_FLOAT_OPERAND
|
||||
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
|
||||
do { \
|
||||
if (CODE == 'f') \
|
||||
{ \
|
||||
char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
|
||||
asm_fprintf ((FILE), "%I%s", dstr); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
long l; \
|
||||
REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
|
||||
if (sizeof (int) == sizeof (long)) \
|
||||
asm_fprintf ((FILE), "%I$%x", (int) l); \
|
||||
else \
|
||||
asm_fprintf ((FILE), "%I$%lx", l); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Output a double value (represented as a C double) as an immediate operand.
|
||||
This macro is a 68k-specific macro. */
|
||||
#undef ASM_OUTPUT_DOUBLE_OPERAND
|
||||
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
|
||||
do { char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
|
||||
asm_fprintf (FILE, "%I%s", dstr); \
|
||||
} while (0)
|
||||
|
||||
/* Note, long double immediate operands are not actually
|
||||
generated by m68k.md. */
|
||||
#undef ASM_OUTPUT_LONG_DOUBLE_OPERAND
|
||||
#define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \
|
||||
do { char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
|
||||
asm_fprintf (FILE, "%I%s", dstr); \
|
||||
} while (0)
|
||||
|
||||
#undef ASM_OUTPUT_COMMON
|
||||
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs ("\t.comm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
do { \
|
||||
int align = exact_log2 (ROUNDED); \
|
||||
/*fprintf ((FILE), "\tsection 14\n"); */ \
|
||||
data_section (); \
|
||||
ASM_OUTPUT_ALIGN ((FILE), align) \
|
||||
ASM_OUTPUT_LABEL ((FILE), (NAME)); \
|
||||
fprintf ((FILE), "\tdcb.b %u,0\n", (ROUNDED)); \
|
||||
/* fprintf ((FILE), "\tsection 10\n"); */ \
|
||||
} while (0)
|
||||
|
||||
#undef PRINT_OPERAND_ADDRESS
|
||||
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
||||
{ register rtx reg1, reg2, breg, ireg; \
|
||||
register rtx addr = ADDR; \
|
||||
rtx offset; \
|
||||
switch (GET_CODE (addr)) \
|
||||
{ \
|
||||
case REG: \
|
||||
fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \
|
||||
break; \
|
||||
case PRE_DEC: \
|
||||
fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \
|
||||
break; \
|
||||
case POST_INC: \
|
||||
fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \
|
||||
break; \
|
||||
case PLUS: \
|
||||
reg1 = 0; reg2 = 0; \
|
||||
ireg = 0; breg = 0; \
|
||||
offset = 0; \
|
||||
if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \
|
||||
{ \
|
||||
offset = XEXP (addr, 0); \
|
||||
addr = XEXP (addr, 1); \
|
||||
} \
|
||||
else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \
|
||||
{ \
|
||||
offset = XEXP (addr, 1); \
|
||||
addr = XEXP (addr, 0); \
|
||||
} \
|
||||
if (GET_CODE (addr) != PLUS) ; \
|
||||
else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 0); \
|
||||
addr = XEXP (addr, 1); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 1); \
|
||||
addr = XEXP (addr, 0); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 0)) == MULT) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 0); \
|
||||
addr = XEXP (addr, 1); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 1)) == MULT) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 1); \
|
||||
addr = XEXP (addr, 0); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 0)) == REG) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 0); \
|
||||
addr = XEXP (addr, 1); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 1)) == REG) \
|
||||
{ \
|
||||
reg1 = XEXP (addr, 1); \
|
||||
addr = XEXP (addr, 0); \
|
||||
} \
|
||||
if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \
|
||||
|| GET_CODE (addr) == SIGN_EXTEND) \
|
||||
{ if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \
|
||||
/* for OLD_INDEXING \
|
||||
else if (GET_CODE (addr) == PLUS) \
|
||||
{ \
|
||||
if (GET_CODE (XEXP (addr, 0)) == REG) \
|
||||
{ \
|
||||
reg2 = XEXP (addr, 0); \
|
||||
addr = XEXP (addr, 1); \
|
||||
} \
|
||||
else if (GET_CODE (XEXP (addr, 1)) == REG) \
|
||||
{ \
|
||||
reg2 = XEXP (addr, 1); \
|
||||
addr = XEXP (addr, 0); \
|
||||
} \
|
||||
} \
|
||||
*/ \
|
||||
if (offset != 0) { if (addr != 0) abort (); addr = offset; } \
|
||||
if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \
|
||||
|| GET_CODE (reg1) == MULT)) \
|
||||
|| (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \
|
||||
{ breg = reg2; ireg = reg1; } \
|
||||
else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \
|
||||
{ breg = reg1; ireg = reg2; } \
|
||||
if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \
|
||||
{ int scale = 1; \
|
||||
if (GET_CODE (ireg) == MULT) \
|
||||
{ scale = INTVAL (XEXP (ireg, 1)); \
|
||||
ireg = XEXP (ireg, 0); } \
|
||||
if (GET_CODE (ireg) == SIGN_EXTEND) \
|
||||
fprintf (FILE, "(.L%d,pc,%s.w", \
|
||||
CODE_LABEL_NUMBER (XEXP (addr, 0)), \
|
||||
reg_names[REGNO (XEXP (ireg, 0))]); \
|
||||
else \
|
||||
fprintf (FILE, "(.L%d,pc,%s.l", \
|
||||
CODE_LABEL_NUMBER (XEXP (addr, 0)), \
|
||||
reg_names[REGNO (ireg)]); \
|
||||
if (scale != 1) fprintf (FILE, "*%d", scale); \
|
||||
putc (')', FILE); \
|
||||
break; } \
|
||||
if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF \
|
||||
&& ! (flag_pic && breg == pic_offset_table_rtx)) \
|
||||
{ \
|
||||
fprintf (FILE, "(.L%d,pc,%s.l", \
|
||||
CODE_LABEL_NUMBER (XEXP (addr, 0)), \
|
||||
reg_names[REGNO (breg)]); \
|
||||
putc (')', FILE); \
|
||||
break; } \
|
||||
if (ireg != 0 || breg != 0) \
|
||||
{ int scale = 1; \
|
||||
if (breg == 0) \
|
||||
abort (); \
|
||||
putc ('(', FILE); \
|
||||
if (addr != 0) \
|
||||
{ \
|
||||
output_addr_const (FILE, addr); \
|
||||
putc (',', FILE); \
|
||||
} \
|
||||
fprintf (FILE, "%s", reg_names[REGNO (breg)]); \
|
||||
if (ireg != 0) \
|
||||
putc (',', FILE); \
|
||||
if (ireg != 0 && GET_CODE (ireg) == MULT) \
|
||||
{ scale = INTVAL (XEXP (ireg, 1)); \
|
||||
ireg = XEXP (ireg, 0); } \
|
||||
if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \
|
||||
fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \
|
||||
else if (ireg != 0) \
|
||||
fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \
|
||||
if (scale != 1) fprintf (FILE, "*%d", scale); \
|
||||
putc (')', FILE); \
|
||||
break; \
|
||||
} \
|
||||
else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \
|
||||
{ fprintf (FILE, "(.L%d,pc,%s.w)", \
|
||||
CODE_LABEL_NUMBER (XEXP (addr, 0)), \
|
||||
reg_names[REGNO (reg1)]); \
|
||||
break; } \
|
||||
default: \
|
||||
if (GET_CODE (addr) == CONST_INT \
|
||||
&& INTVAL (addr) < 0x8000 \
|
||||
&& INTVAL (addr) >= -0x8000) \
|
||||
fprintf (FILE, "%d.w", INTVAL (addr)); \
|
||||
else \
|
||||
output_addr_const (FILE, addr); \
|
||||
}}
|
||||
|
||||
|
||||
#endif /* ! use gas */
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* dpx2.ifile - for collectless G++ on Bull DPX/2
|
||||
*
|
||||
* Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.dbp.de>
|
||||
*
|
||||
* Install this file as $prefix/gcc-lib/dpx2/VERSION/gcc.ifile
|
||||
* and comment out the lines referring to COLLECT at the top
|
||||
* of Makefile before building GCC.
|
||||
*
|
||||
* This file has been tested with gcc-2.2.2 on a DPX/2 340
|
||||
* running BOS 2.00.45, if it doesn't work for you, stick
|
||||
* with collect.
|
||||
* --sjg
|
||||
*/
|
||||
/*
|
||||
* Ifile to link with memory configured at 0.
|
||||
* BLOCK to an offset that leaves room for many headers ( the value
|
||||
* here allows for a file header, an outheader, and up to 11 section
|
||||
* headers on most systems.
|
||||
* BIND to an address that excludes page 0 from being mapped. The value
|
||||
* used for BLOCK should be or'd into this value. Here I'm setting BLOCK
|
||||
* to 0x200 and BIND to ( 0x100000 | value_used_for(BLOCK) )
|
||||
* If you are using shared libraries, watch that you don't overlap the
|
||||
* address ranges assigned for shared libs.
|
||||
*
|
||||
* GROUP BIND to a location in the next segment. Here, the only value
|
||||
* that you should change (I think) is that within NEXT, which I've set
|
||||
* to my hardware segment size. You can always use a larger size, but not
|
||||
* a smaller one.
|
||||
*/
|
||||
SECTIONS
|
||||
{
|
||||
.text BIND(0x100200) BLOCK (0x200) :
|
||||
{
|
||||
/* plenty of room for headers */
|
||||
*(.init)
|
||||
*(.text)
|
||||
_vfork = _fork; /* I got tired of editing peoples sloppy code */
|
||||
*(.fini)
|
||||
}
|
||||
GROUP BIND( NEXT(0x100000) + (ADDR(.text) + (SIZEOF(.text)) % 0x1000)):
|
||||
{
|
||||
.data : {
|
||||
___CTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.ctor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
___DTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.dtor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
}
|
||||
.bss : { }
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/* Definitions for Bull dpx/2 200 and 300 with gas
|
||||
using dbx-in-coff encapsulation.
|
||||
Copyright (C) 1992, 1994 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. */
|
||||
|
||||
|
||||
#include "m68k/dpx2g.h"
|
||||
|
||||
/* Use STABS debugging information inside COFF. */
|
||||
#ifndef DBX_DEBUGGING_INFO
|
||||
#define DBX_DEBUGGING_INFO
|
||||
#endif
|
||||
|
||||
/* Let sbd debugging be the default. */
|
||||
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* dpx2g.h - Bull DPX/2 200 and 300 systems (m68k, SysVr3) with gas
|
||||
*/
|
||||
|
||||
#define USE_GAS
|
||||
#include "m68k/dpx2.h"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
|
||||
huge.o%s"
|
||||
|
||||
/* Gas understands dollars in labels. */
|
||||
#undef NO_DOLLAR_IN_LABEL
|
||||
/* GAS does not understand .ident so don't output anything for #ident. */
|
||||
#undef ASM_OUTPUT_IDENT
|
||||
|
||||
/* end of dpx2g.h */
|
@ -1,9 +0,0 @@
|
||||
/* Define target machine as an ISI 68000/68020 with no 68881. */
|
||||
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020)
|
||||
|
||||
#include "m68k/isi.h"
|
||||
|
||||
/* Don't try using XFmode. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
@ -1,91 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. ISI 68000/68020 version.
|
||||
Intended only for use with GAS, and not ISI's assembler, which is buggy
|
||||
Copyright (C) 1988, 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. */
|
||||
|
||||
#include "m68k/m68k.h"
|
||||
|
||||
/* See m68k.h. 7 means 68020 with 68881. */
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
|
||||
#endif
|
||||
|
||||
#if TARGET_DEFAULT & MASK_68881
|
||||
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
|
||||
This will control the use of inline 68881 insns in certain macros. */
|
||||
|
||||
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}"
|
||||
|
||||
/* If the 68881 is used, link must load libmc.a before libc.a. */
|
||||
|
||||
#define LIB_SPEC "%{!msoft-float:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \
|
||||
%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}"
|
||||
|
||||
#else
|
||||
/* Define __HAVE_68881__ in preprocessor if -m68881 is specified.
|
||||
This will control the use of inline 68881 insns in certain macros. */
|
||||
|
||||
#define CPP_SPEC "%{m68881:-D__HAVE_68881__}"
|
||||
|
||||
/* If the 68881 is used, link must load libmc.a instead of libc.a */
|
||||
|
||||
#define LIB_SPEC "%{m68881:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \
|
||||
%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}"
|
||||
#endif
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dunix -Dmc68000 -Dis68k -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k"
|
||||
|
||||
/* This is BSD, so it wants DBX format. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* Override parts of m68k.h to fit the ISI 68k machine. */
|
||||
|
||||
#undef FUNCTION_VALUE
|
||||
#undef LIBCALL_VALUE
|
||||
#undef FUNCTION_VALUE_REGNO_P
|
||||
#undef NEEDS_UNTYPED_CALL
|
||||
#undef ASM_FILE_START
|
||||
|
||||
/* Every structure or union's size must be a multiple of 2 bytes. */
|
||||
|
||||
#define STRUCTURE_SIZE_BOUNDARY 16
|
||||
|
||||
/* If TARGET_68881, return SF and DF values in f0 instead of d0. */
|
||||
|
||||
#define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE))
|
||||
|
||||
#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.
|
||||
D0 may be used, and F0 as well if -m68881 is specified. */
|
||||
|
||||
#define FUNCTION_VALUE_REGNO_P(N) \
|
||||
((N) == 0 || (TARGET_68881 && (N) == 16))
|
||||
|
||||
/* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
|
||||
more than one register. */
|
||||
|
||||
#define NEEDS_UNTYPED_CALL 1
|
||||
|
||||
/* Also output something to cause the correct _doprnt to be loaded. */
|
||||
#define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n%s\n", TARGET_68881 ? ".globl fltused" : "")
|
@ -1,43 +0,0 @@
|
||||
/* Definitions for Motorola 680x0 running LynxOS, using Lynx's old as and ld.
|
||||
Copyright (C) 1993, 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. */
|
||||
|
||||
#include <m68k/m68k.h>
|
||||
#include <m68k/coff.h>
|
||||
#include <lynx-ng.h>
|
||||
|
||||
/* See m68k.h. 7 means 68020 with 68881. */
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
|
||||
#endif
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dunix -Dmc68000 -DM68K -DLynx -DIBITS32 -Asystem=unix -Asystem=lynx -Acpu=m68k -Amachine=m68k"
|
||||
|
||||
/* Provide required defaults for linker switches. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-P1000 %{msystem-v:-V} %{mcoff:-k}"
|
||||
|
||||
/* Every structure or union's size must be a multiple of 2 bytes. */
|
||||
|
||||
#define STRUCTURE_SIZE_BOUNDARY 16
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user