gcc/gcc/config/frv/t-frv

114 lines
4.1 KiB
Plaintext
Raw Normal View History

ABOUT-GCC-NLS, [...]: Add copyright and license notices. * ABOUT-GCC-NLS, ChangeLog, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.dataflow, ChangeLog.lib, ChangeLog.ptr, ChangeLog.tree-ssa, ChangeLog.tuples, FSFChangeLog, FSFChangeLog.10, FSFChangeLog.11, LANGUAGES, ONEWS, acinclude.m4, config/alpha/gnu.h, config/alpha/libgcc-alpha-ldbl.ver, config/alpha/t-osf4, config/alpha/t-vms, config/alpha/va_list.h, config/alpha/x-vms, config/arc/t-arc, config/arm/README-interworking, config/arm/arm-c.c, config/arm/gentune.sh, config/arm/libgcc-bpabi.ver, config/arm/t-arm, config/arm/t-arm-elf, config/arm/t-arm-softfp, config/arm/t-bpabi, config/arm/t-linux, config/arm/t-linux-eabi, config/arm/t-netbsd, config/arm/t-pe, config/arm/t-strongarm-elf, config/arm/t-symbian, config/arm/t-vxworks, config/arm/t-wince-pe, config/avr/t-avr, config/bfin/elf.h, config/bfin/libgcc-bfin.ver, config/bfin/linux.h, config/bfin/t-bfin, config/bfin/t-bfin-elf, config/bfin/t-bfin-linux, config/bfin/t-bfin-uclinux, config/bfin/uclinux.h, config/cris/mulsi3.asm, config/cris/t-cris, config/cris/t-elfmulti, config/crx/t-crx, config/darwin-ppc-ldouble-patch.def, config/darwin-sections.def, config/divmod.c, config/fr30/t-fr30, config/frv/libgcc-frv.ver, config/frv/t-frv, config/frv/t-linux, config/h8300/genmova.sh, config/h8300/t-h8300, config/i386/athlon.md, config/i386/darwin-libgcc.10.4.ver, config/i386/darwin-libgcc.10.5.ver, config/i386/libgcc-glibc.ver, config/i386/mach.h, config/i386/netbsd.h, config/i386/t-crtpc, config/i386/t-cygming, config/i386/t-cygwin, config/i386/t-i386, config/i386/t-linux64, config/i386/t-nwld, config/i386/t-rtems-i386, config/i386/t-sol2-10, config/i386/x-mingw32, config/ia64/div.md, config/ia64/elf.h, config/ia64/ia64.opt, config/ia64/libgcc-glibc.ver, config/ia64/libgcc-ia64.ver, config/ia64/linux.h, config/ia64/sysv4.h, config/ia64/t-hpux, config/ia64/t-ia64, config/iq2000/abi, config/iq2000/lib2extra-funcs.c, config/iq2000/t-iq2000, config/libgcc-glibc.ver, config/m32r/libgcc-glibc.ver, config/m32r/t-linux, config/m32r/t-m32r, config/m68hc11/t-m68hc11, config/m68k/t-floatlib, config/m68k/t-linux, config/m68k/t-mlibs, config/m68k/t-uclinux, config/mcore/t-mcore, config/mcore/t-mcore-pe, config/mips/20kc.md, config/mips/4130.md, config/mips/5400.md, config/mips/5500.md, config/mips/crti.asm, config/mips/crtn.asm, config/mips/irix-crti.asm, config/mips/irix-crtn.asm, config/mips/libgcc-mips16.ver, config/mips/mips-dsp.md, config/mips/mips-dspr2.md, config/mips/mips-fixed.md, config/mips/sb1.md, config/mips/sr71k.md, config/mips/t-elf, config/mips/t-gofast, config/mips/t-iris6, config/mips/t-isa3264, config/mips/t-libgcc-mips16, config/mips/t-linux64, config/mips/t-mips, config/mips/t-r3900, config/mips/t-rtems, config/mips/t-sb1, config/mips/t-sde, config/mips/t-sdemtk, config/mips/t-slibgcc-irix, config/mips/t-sr71k, config/mips/t-st, config/mips/t-vr, config/mips/t-vxworks, config/mmix/t-mmix, config/mn10300/t-linux, config/mn10300/t-mn10300, config/pa/pa32-regs.h, config/pa/t-hpux-shlib, config/pa/t-linux, config/pa/t-linux64, config/pa/t-pa64, config/pdp11/t-pdp11, config/picochip/libgccExtras/clzsi2.asm, config/picochip/t-picochip, config/rs6000/darwin-ldouble-format, config/rs6000/darwin-libgcc.10.4.ver, config/rs6000/darwin-libgcc.10.5.ver, config/rs6000/libgcc-ppc-glibc.ver, config/rs6000/ppc-asm.h, config/rs6000/t-aix43, config/rs6000/t-aix52, config/rs6000/t-darwin, config/rs6000/t-fprules, config/rs6000/t-fprules-fpbit, config/rs6000/t-linux64, config/rs6000/t-lynx, config/rs6000/t-netbsd, config/rs6000/t-ppccomm, config/rs6000/t-ppcendian, config/rs6000/t-ppcgas, config/rs6000/t-rs6000, config/rs6000/t-rtems, config/rs6000/t-spe, config/rs6000/t-vxworks, config/s390/libgcc-glibc.ver, config/score/t-score-elf, config/sh/divcost-analysis, config/sh/libgcc-glibc.ver, config/sh/t-netbsd, config/sh/t-sh, config/sh/t-sh64, config/sh/t-superh, config/sh/t-symbian, config/sparc/libgcc-sparc-glibc.ver, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sol2-gld-bi.h, config/sparc/t-elf, config/sparc/t-linux64, config/sparc/t-sol2, config/stormy16/stormy-abi, config/stormy16/t-stormy16, config/t-darwin, config/t-libunwind, config/t-libunwind-elf, config/t-linux, config/t-lynx, config/t-slibgcc-elf-ver, config/t-slibgcc-sld, config/t-sol2, config/t-vxworks, config/udivmod.c, config/udivmodsi4.c, config/v850/t-v850, config/v850/t-v850e, config/xtensa/t-xtensa, diagnostic.def, gdbinit.in, glimits.h, gstab.h, gsyms.h, java/ChangeLog, java/ChangeLog.ptr, java/ChangeLog.tree-ssa, libgcc-std.ver, limitx.h, version.c, xcoff.h: Add copyright and license notices. * config/h8300/genmova.sh: Include copyright and license notices in generated output. * config/h8300/mova.md: Regenerate. * doc/install.texi2html: Include word "Copyright" in copyright notice and use name "Free Software Foundation, Inc.". * ChangeLog, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008: Correct dates. ada: * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and license notices. cp: * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995, ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS, cfns.gperf: Add copyright and license notices. * cfns.h: Regenerate. * ChangeLog, ChangeLog-2004: Correct dates. fortran: * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add copyright and license notices. * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008: Correct dates. java: * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and license notices. objc: * ChangeLog: Add copyright and license notices. objcp: * ChangeLog: Add copyright and license notices. po: * ChangeLog, EXCLUDES: Add copyright and license notices. testsuite: * ChangeLog, ChangeLog-1993-2007, ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, README, README.QMTEST, README.compat, README.gcc, g++.dg/README, g++.dg/compat/break/README, g++.dg/gomp/gomp.exp, g++.old-deja/g++.brendan/README, g++.old-deja/g++.oliva/ChangeLog, g++.old-deja/g++.robertl/README, gcc.c-torture/ChangeLog.0, gcc.c-torture/execute/builtins/builtins.exp, gcc.dg/README, gcc.dg/gomp/gomp.exp, gcc.target/frv/frv.exp, gcc.target/i386/math-torture/math-torture.exp, gcc.target/mips/inter/mips16-inter.exp, gcc.target/mips/mips-nonpic/README, gcc.target/x86_64/abi/README.gcc, gcc.target/xstormy16/xstormy16.exp, gcc.test-framework/README, gfortran.dg/g77/README, gfortran.dg/gomp/gomp.exp, gfortran.fortran-torture/ChangeLog.g95: Add copyright and license notices. * ChangeLog-1993-2007, ChangeLog: Correct dates. From-SVN: r146533
2009-04-21 21:03:23 +02:00
# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
# GCC 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 3, or (at your option)
# any later version.
#
# GCC 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 GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
2002-08-05 13:41:05 +02:00
# Name of assembly file containing libgcc1 functions.
# This entry must be present, but it can be empty if the target does
# not need any assembler functions to support its code generation.
#
# Alternatively if assembler functions *are* needed then define the
# entries below:
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = frv/lib1funcs.asm
LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov
LIB2FUNCS_EXTRA = cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c
# 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
# If any special flags are necessary when building libgcc2 put them here.
TARGET_LIBGCC2_CFLAGS =
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#include "config/frv/frv-abi.h"' >> fp-bit.c
2002-08-05 13:41:05 +02:00
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#include "config/frv/frv-abi.h"' > dp-bit.c
2002-08-05 13:41:05 +02:00
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
cmovh.c: $(srcdir)/config/frv/cmovh.c
$(LN_S) $(srcdir)/config/frv/cmovh.c .
cmovw.c: $(srcdir)/config/frv/cmovw.c
$(LN_S) $(srcdir)/config/frv/cmovw.c .
cmovd.c: $(srcdir)/config/frv/cmovd.c
$(LN_S) $(srcdir)/config/frv/cmovd.c .
modi.c: $(srcdir)/config/frv/modi.c
$(LN_S) $(srcdir)/config/frv/modi.c .
umodi.c: $(srcdir)/config/frv/umodi.c
$(LN_S) $(srcdir)/config/frv/umodi.c .
uitof.c: $(srcdir)/config/frv/uitof.c
$(LN_S) $(srcdir)/config/frv/uitof.c .
uitod.c: $(srcdir)/config/frv/uitod.c
$(LN_S) $(srcdir)/config/frv/uitod.c .
ulltof.c: $(srcdir)/config/frv/ulltof.c
$(LN_S) $(srcdir)/config/frv/ulltof.c .
ulltod.c: $(srcdir)/config/frv/ulltod.c
$(LN_S) $(srcdir)/config/frv/ulltod.c .
# Build frvbegin.o and frvend.o
EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o
# Compile two additional files that are linked with every program
# linked using GCC on systems using COFF or ELF, for the sake of C++
# constructors.
FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS)
$(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \
$(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
-c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext)
$(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \
$(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
-c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext)
# Enable the following if multilibs are needed.
# See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a
# description of the options and their values.
#
#MULTILIB_OPTIONS = mcpu=fr500/mcpu=tomcat/mcpu=simple/mcpu=frv msoft-float mdword/mno-dword
#MULTILIB_DIRNAMES = fr500 tomcat simple frv nof dw no-dw
#MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mno-double=mcpu?fr500 mcpu?frv=mdouble
#MULTILIB_EXCEPTIONS = *mcpu=simple/*msoft-float* *mcpu=frv/*msoft-float*
#MULTILIB_EXTRA_OPTS = mlibrary-pic
* config/frv/frv-protos.h (FRV_CPU_FR550, FRV_CPU_FR450) (FRV_CPU_FR405): New processor enums. (frv_issue_rate, frv_acc_group): Declare. * config/frv/frv.h (CPP_SPEC, CPP_FRV_SPEC, CPP_FR500_SPEC): Delete. (CPP_FR400_SPEC, CPP_SIMPLE_SPEC): Delete. (MASK_DEFAULT_FR550, MASK_DEFAULT_FR450): New macros. (SUBTARGET_EXTRA_SPECS, EXTRA_SPECS, CPP_CPU_DEFAULT_SPEC): Delete. (TARGET_CPU_CPP_BUILTINS): Define the macros that were previously handled by CPP_SPEC. (MASK_LONG_CALLS, TARGET_LONG_CALLS): New macros. (MASK_ALIGN_LABELS, TARGET_ALIGN_LABELS): New macros. (ACC_MASK): New macro. (TARGET_MEDIA_REV2): Include FRV_CPU_{FR405,FR450,FR550}. (TARGET_MEDIA_FR450): New macro. (TARGET_FR500_FR550_BUILTINS, TARGET_FR405_BUILTINS): New macros. (TARGET_SWITCHES): Add -m{no-,}align-labels and -m{no-,}long-calls. (LABEL_ALIGN_AFTER_BARRIER): Define. (ACC_LAST, ACCG_LAST): Add four new accumulator registers. (IACC_FIRST, IACC_LAST): New pair of SPRs. (ACCG_FIRST, AP_FIRST, SPR_FIRST, SPR_LAST): Adjust accordingly. (FIXED_REGISTERS, CALL_USED_REGISTERS, REG_ALLOC_ORDER) (REGISTER_NAMES): Add entries for new registers. (REG_CLASS_CONTENTS): Update for new register ranges. (EXTRA_CONSTRAINT_FOR_S): Redefine in terms of call_operand. (ISSUE_RATE, CLEAR_VLIW_START, SET_VLIW_START): Delete. (PACKING_FLAG_USED_P): Delete. (FRV_BUILTIN_MQLCLRHS, FRV_BUILTIN_MQLMTHS, FRV_BUILTIN_MQSLLHI) (FRV_BUILTIN_MQSRAHI, FRV_BUILTIN_SMUL, FRV_BUILTIN_UMUL) (FRV_BUILTIN_PREFETCH0, FRV_BUILTIN_PREFETCH, FRV_BUILTIN_SMASS) (FRV_BUILTIN_SMSSS, FRV_BUILTIN_SMU, FRV_BUILTIN_SCUTSS) (FRV_BUILTIN_ADDSS, FRV_BUILTIN_SUBSS, FRV_BUILTIN_SLASS) (FRV_BUILTIN_IACCread{l,ll}, FRV_BUILTIN_IACCset{ll,l}) (FRV_BUILTIN_SCAN): New members of frv_builtin_enum. (FRV_BUILTIN_FIRST_NONMEDIA): New macro. (CPU_UNITS_QUERY): Define to 1. * config/frv/frv.c: Include gt-frv.h (NUM_NOP_PATTERNS, NTH_UNIT, UNIT_NUMBER, PACKING_FLAG_P): New macros. (SET_PACKING_FLAG, CLEAR_PACKING_FLAG, FOR_EACH_REGNO): New macros. (frv_insn_group): New enumeration. (frv_unit_names, frv_unit_groups, frv_unit_codes): New variables. (frv_type_to_unit, frv_nops, frv_num_nops): New variables. (REGSTATE_DEAD, REGSTATE_LIVE, REGSTATE_UNUSED, REGSTATE_MASK) (REGSTATE_CONDJUMP): Delete. Shuffle other numbers to cover the gap left by REGSTATE_LIVE. (regstate_t): New typedef. (TARGET_MACHINE_DEPENDENT_REORG): Define. (frv_default_flags_for_cpu): Handle FRV_CPU_{FR550,FR450,FR405}. (frv_override_options): Check for -mcpu={fr550,fr450,fr405}. Initialize frv_unit_codes[] and frv_type_to_unit[]. (frv_conditional_register_usage): Remove redundant fixing of accumulator registers. (frv_insn_packing_flag): Update specification. (frv_function_prologue): Don't set frv_insn_packing_flag here. Zero out frv_nops[]. (frv_expand_epilogue): Remove comments about the no-longer-present SIBCALL_P argument. (frv_asm_output_mi_thunk): Check frv_issue_rate() rather than PACKING_FLAG_USED_P() when deciding whether to pack instructions. (frv_asm_output_opcode, frv_final_prescan_insn): Simplify in light of the new meaning of frv_insn_packing_flag. Emit an mnop.p if packing is disabled and if INSN can only issue to M1. (call_operand): Check TARGET_LONG_CALLS. (acc_operand, even_acc_operand, quad_acc_operand) (accg_operand): Simplify. Don't accept pseudo registers. (output_move_single): Handle SPR<-zero moves. (frv_issue_rate): Make non-static. Handle FRV_CPU_{FR550,FR450,FR405}. (frv_registers_update, frv_registers_used_p): Delete. (frv_registers_set_p): Delete. (frv_acc_group_1, frv_acc_group, frv_insn_unit): New functions. (frv_issues_to_branch_unit_p): New function. (frv_packet): New structure. (frv_cond_flags, frv_regstate_conflict_p): New functions. (frv_registers_conflict_p_1, frv_registers_conflict_p): New functions. (frv_registers_update_1, frv_registers_update): New functions. (frv_start_packet, frv_start_packet_block, frv_finish_packet) (frv_pack_insn_p, frv_add_insn_to_packet, frv_insert_nop_in_packet) (frv_for_each_packet, frv_sort_insn_group_1, frv_compare_insns) (frv_sort_insn_group, frv_reorder_packet): New functions. (frv_pack_insns): Use frv_reorder_packet. (frv_packet_address): New variable. (frv_fill_unused_units, frv_align_label, frv_reorg_packet) (frv_register_nop, frv_reorg): New functions. (bdesc_1arg): Add __SCUTSS. (bdesc_2arg): Add __MQLCLRHS, __MQLMTHS, __SMUL, __UMUL, __ADDSS, __SUBSS, __SLASS and __SCAN. (bdesc_2argimm): Add __MQSLLHI and __MQSRAHI. (bdesc_int_void2arg, bdesc_prefetches): New arrays. (frv_init_builtins): Register the above builtins. (frv_int_to_acc): Use ACC_MASK to check for valid accumulator registers. Turn the referenced accumulators into global registers. (frv_read_iacc_argument): New function. (frv_expand_int_void2arg, frv_expand_prefetches): New functions. (frv_split_iacc_move): New function. (frv_expand_builtin): Handle the new builtins. * config/frv/frv.md: Replace old schedulers with new order-independent ones. Add schedulers for the FR405, FR450 and FR550. Describe new packing algorithm. (cpu): Add fr550, fr450 and fr405. (type): Add macc, scan, cut, fnop, fscmp, fdcmp, mnop, mqlimh and mqshift. Replace fmas with fsmadd and fmad with fdmadd. Delete m7. (*muladd[sd]f4, *mulsub[sd]f4): Fix types. (*cmp[sd]f_cc_fp): Use new f[sd]cmp types. (fnop, mnop): New patterns. (UNSPEC_MQLCLRHS, UNSPEC_MQLMTHS, UNSPEC_MQSLLHI, UNSPEC_MQSRAHI): New constants. (mexpdhw, *cond_exec_mexpdhw): Fix destination operands. (mclracca8): Use ACC_MASK to determine the upper set of accumulator registers. (mqlclrhs, mqlmths, mqsllhi, mqsrahi): New patterns. (UNSPEC_SMUL, UNSPEC_UMUL, UNSPEC_SMU, UNSPEC_ADDSS, UNSPEC_SUBSS) (UNSPEC_SLASS, UNSPEC_SCAN, UNSPEC_INTSS, UNSPEC_SCUTSS) (UNSPEC_PREFETCH0, UNSPEC_PREFETCH, UNSPEC_IACCreadll) (UNSPEC_IACCreadl, UNSPEC_IACCsetll, UNSPEC_IACCsetl, UNSPEC_SMASS) (UNSPEC_SMSSS, UNSPEC_IMUL, IACC0_REG): New constants. (smul, umul, smass, smsss, smu, addss, subss, slass, scan, scutss) (frv_prefetch0, frv_prefetch): New patterns. * config/frv/t-frv (MULTILIB_OPTIONS): Remove -mcpu=frv and -mcpu=simple. Add -mcpu=fr550. (MULTILIB_DIRNAMES): Update accordingly. (MULTILIB_MATCHES): Use the fr400 multilibs for -mcpu=fr405 and -mcpu=fr450. * doc/invoke.texi: Document the new -mcpu={fr550,fr450,fr405}, -mlong-calls and -malign-labels options for FR-V. Co-Authored-By: Catherine Moore <clm@redhat.com> From-SVN: r87222
2004-09-09 08:33:58 +02:00
MULTILIB_OPTIONS = mcpu=fr400/mcpu=fr550 mno-pack mlibrary-pic/mfdpic
MULTILIB_DIRNAMES = fr400 fr550 unpacked pic fdpic
MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 \
mlibrary-pic=multilib-library-pic \
mcpu?fr400=mcpu?fr405 mcpu?fr400=mcpu?fr450
2002-08-05 13:41:05 +02:00
MULTILIB_EXCEPTIONS = mcpu=frv/mno-pack* mcpu=simple/mno-pack*
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h