gcc/libgcc/config
Matthew Fortune 82f84ecbb4 MIPS32R6 and MIPS64R6 support
gcc/

	* config.gcc: Add mipsisa64r6 and mipsisa32r6 cpu support.
	* config/mips/constraints.md (ZD): Add r6 restrictions.
	* config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add MIPS_ISA_LEVEL_SPEC.
	* config/mips/loongson.md
	(<u>div<mode>3, <u>mod<mode>3): Move to mips.md.
	* config/mips/mips-cpus.def (mips32r6, mips64r6): Define.
	* config/mips/mips-modes.def (CCF): New mode.
	* config/mips/mips-protos.h
	(mips_9bit_offset_address_p): New prototype.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/mips.c (MIPS_JR): Use JALR $, <reg> for R6.
	(mips_rtx_cost_data): Add pseudo-processors W32 and W64.
	(mips_9bit_offset_address_p): New function.
	(mips_rtx_costs): Account for R6 multiply and FMA instructions.
	(mips_emit_compare): Implement R6 FPU comparisons.
	(mips_expand_conditional_move): Implement R6 selects.
	(mips_expand_conditional_trap): Account for removed trap immediate.
	(mips_expand_block_move): Disable inline move when LWL/LWR are removed.
	(mips_print_float_branch_condition): Update for R6 FPU branches.
	(mips_print_operand): Handle CCF mode compares.
	(mips_interrupt_extra_call_saved_reg_p): Do not attempt to callee-save
	MD_REGS for R6.
	(mips_hard_regno_mode_ok_p): Support CCF mode.
	(mips_mode_ok_for_mov_fmt_p): Likewise.
	(mips_secondary_reload_class): CCFmode can be loaded directly.
	(mips_set_fast_mult_zero_zero_p): Account for R6 multiply instructions.
	(mips_option_override): Ensure R6 is used with fp64.  Set default
	mips_nan modes.  Check for mips_nan support.  Prevent DSP with R6.
	(mips_conditional_register_usage): Disable MD_REGS for R6. Disable
	FPSW for R6.
	(mips_mulsidi3_gen_fn): Support R6 multiply instructions.
	* config/mips/mips.h (ISA_MIPS32R6, ISA_MIPS64R6): Define.
	(TARGET_CPU_CPP_BUILTINS): Rework for mips32/mips64.
	(ISA_HAS_JR): New macro.
	(ISA_HAS_HILO): New macro.
	(ISA_HAS_R6MUL): Likewise.
	(ISA_HAS_R6DMUL): Likewise.
	(ISA_HAS_R6DIV): Likewise.
	(ISA_HAS_R6DDIV): Likewise.
	(ISA_HAS_CCF): Likewise.
	(ISA_HAS_SEL): Likewise.
	(ISA_HAS_COND_TRAPI): Likewise.
	(ISA_HAS_FP_MADDF_MSUBF): Likewise.
	(ISA_HAS_LWL_LWR): Likewise.
	(ISA_HAS_IEEE_754_LEGACY): Likewise.
	(ISA_HAS_IEEE_754_2008): Likewise.
	(ISA_HAS_PREFETCH_9BIT): Likewise.
	(MIPSR6_9BIT_OFFSET_P): New macro.
	(BASE_DRIVER_SELF_SPECS): Use MIPS_ISA_DRIVER_SELF_SPECS.
	(DRIVER_SELF_SPECS): Use MIPS_ISA_LEVEL_SPEC.
	(MULTILIB_ISA_DEFAULT): Handle mips32r6 and mips64r6.
	(MIPS_ISA_LEVEL_SPEC): Likewise.
	(MIPS_ISA_SYNCI_SPEC): Likewise.
	(ISA_HAS_64BIT_REGS): Likewise.
	(ISA_HAS_BRANCHLIKELY): Likewise.
	(ISA_HAS_MUL3): Likewise.
	(ISA_HAS_DMULT): Likewise.
	(ISA_HAS_DDIV): Likewise.
	(ISA_HAS_DIV): Likewise.
	(ISA_HAS_MULT): Likewise.
	(ISA_HAS_FP_CONDMOVE): Likewise.
	(ISA_HAS_8CC): Likewise.
	(ISA_HAS_FP4): Likewise.
	(ISA_HAS_PAIRED_SINGLE): Likewise.
	(ISA_HAS_MADD_MSUB): Likewise.
	(ISA_HAS_FP_RECIP_RSQRT): Likewise.
	* config/mips/mips.md (processor): Add w32 and w64.
	(FPCC): New mode iterator.
	(reg): Add CCF mode.
	(fpcmp): New mode attribute.
	(fcond): Add ordered, ltgt and ne codes.
	(fcond): Update code attribute.
	(sel): New code attribute.
	(selinv): Likewise.
	(ctrap<mode>4): Update condition.
	(*conditional_trap_reg<mode>): New define_insn.
	(*conditional_trap<mode>): Update condition.
	(mul<mode>3): Expand R6 multiply instructions.
	(<su>mulsi3_highpart): Likewise.
	(<su>muldi3_highpart): Likewise.
	(mul<mode>3_mul3_loongson): Rename...
	(mul<mode>3_mul3_hilo): To this.  Add R6 mul instruction.
	(<u>mulsidi3_32bit_r6): New expander.
	(<u>mulsidi3_32bit): Restrict to pre-r6 multiplies.
	(<u>mulsidi3_32bit_r4000): Likewise.
	(<u>mulsidi3_64bit): Likewise.
	(<su>mulsi3_highpart_internal): Likewise.
	(mulsidi3_64bit_r6dmul): New instruction.
	(<su>mulsi3_highpart_r6): Likewise.
	(<su>muldi3_highpart_r6): Likewise.
	(fma<mode>4): Likewise.
	(movccf): Likewise.
	(*sel<code><GPR:mode>_using_<GPR2:mode>): Likewise.
	(*sel<mode>): Likewise.
	(<u>div<mode>3): Moved from loongson.md.  Add R6 instructions.
	(<u>mod<mode>3): Likewise.
	(extvmisalign<mode>): Require ISA_HAS_LWL_LWR.
	(extzvmisalign<mode>): Likewise.
	(insvmisalign<mode>): Likewise.
	(mips_cache): Account for R6 displacement field sizes.
	(*branch_fp): Rename...
	(*branch_fp_<mode>): To this.  Add CCFmode support.
	(*branch_fp_inverted): Rename...
	(*branch_fp_inverted_<mode>): To this.  Add CCFmode support.
	(s<code>_<mode>): Rename...
	(s<code>_<SCALARF:mode>_using_<FPCC:mode>): To this.  Add FCCmode
	condition support.
	(s<code>_<mode> swapped): Rename...
	(s<code>_<SCALARF:mode>_using_<FPCC:mode> swapped): To this. Add
	CCFmode condition support.
	(mov<mode>cc GPR): Expand R6 selects.
	(mov<mode>cc FPR): Expand R6 selects.
	(*tls_get_tp_<mode>_split): Do not .set push for >= mips32r2.
	* config/mips/netbsd.h (TARGET_CPU_CPP_BUILTINS): Update similarly to
	mips.h.
	(ASM_SPEC): Add mips32r6, mips64r6.
	* config/mips/t-isa3264 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Update
	for mips32r6/mips64r6.
	* doc/invoke.texi: Document -mips32r6,-mips64r6.
	* doc/md.texi: Update comment for ZD constraint.

libgcc/

	* config.host: Support mipsisa32r6 and mipsisa64r6.
	* config/mips/mips16.S: Do not build for R6.

gcc/testsuite/

	* gcc.dg/torture/mips-hilo-2.c: Unconditionally pass for R6 onwards.
	* gcc.dg/torture/pr19683-1.c: Likewise.
	* gcc.target/mips/branch-cost-2.c: Require MOVN.
	* gcc.target/mips/movcc-1.c: Likewise.
	* gcc.target/mips/movcc-2.c: Likewise.
	* gcc.target/mips/movcc-3.c: Likewise.
	* gcc.target/mips/call-saved-4.c: Require LDC.
	* gcc.target/mips/dmult-1.c: Require R5 or earlier.
	* gcc.target/mips/fpcmp-1.c: Likewise.
	* gcc.target/mips/fpcmp-2.c: Likewise.
	* gcc.target/mips/neg-abs-2.c: Likewise.
	* gcc.target/mips/timode-1.c: Likewise.
	* gcc.target/mips/unaligned-1.c: Likewise.
	* gcc.target/mips/madd-3.c: Require MADD.
	* gcc.target/mips/madd-9.c: Likewise.
	* gcc.target/mips/maddu-3.c: Likewise.
	* gcc.target/mips/msub-3.c: Likewise.
	* gcc.target/mips/msubu-3.c: Likewise.
	* gcc.target/mips/mult-1.c: Require INS and not DMUL.
	* gcc.target/mips/mips-ps-type-2.c: Require MADD.PS.
	* gcc.target/mips/mips.exp (mips_option_groups): Add ins, dmul, ldc,
	movn, madd, maddps.
	(mips-dg-options): INS available from R2.  LDC available from MIPS II,
	DMUL is present in octeon.  Describe all features removed from R6.

Co-Authored-By: Steve Ellcey <sellcey@imgtec.com>

From-SVN: r218973
2014-12-19 20:17:36 +00:00
..
aarch64 Add crtfastmath for AArch64. 2014-09-09 15:53:01 +00:00
alpha Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
arc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
arm lib1funcs.S (FUNC_START): Add conditional section redefine for macro L_arm_muldivsf3 and L_arm_muldivdf3. 2014-11-27 13:38:51 +00:00
avr lib1funcs.S (__do_global_dtors): Fix wrong code introduced with 2014-10-21 trunk r216525. 2014-10-22 10:40:30 +00:00
bfin Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
c6x Update soft-fp from glibc. 2014-10-09 19:21:30 +01:00
cr16 Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
cris float128-mul-underflow.c, [...]: New tests. 2014-02-12 23:24:49 +00:00
epiphany Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
fr30 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
frv Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
h8300 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
i386 Support avx512f in __builtin_cpu_supports. 2014-11-27 16:51:10 +03:00
ia64 re PR target/63312 (FAIL: gcc.dg/torture/float128-exact-underflow.c -O0 execution test) 2014-09-22 12:08:03 +01:00
iq2000 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
libbid Remove LIBGCC2_HAS_?F_MODE target macros. 2014-09-12 13:05:18 +01:00
lm32 float128-mul-underflow.c, [...]: New tests. 2014-02-12 23:24:49 +00:00
m32c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
m32r Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
m68k Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
mcore Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
mep Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
microblaze Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
mips MIPS32R6 and MIPS64R6 support 2014-12-19 20:17:36 +00:00
mmix Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
moxie float128-mul-underflow.c, [...]: New tests. 2014-02-12 23:24:49 +00:00
msp430 t-msp430 (HOST_LIBGCC2_CFLAGS): Add -mhwmult=none. 2014-05-22 15:15:36 +00:00
nds32 float128-mul-underflow.c, [...]: New tests. 2014-02-12 23:24:49 +00:00
nios2 Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
nvptx Add the nvptx port. 2014-11-10 16:12:42 +00:00
pa linux-atomic.c (ABORT_INSTRUCTION): Use __builtin_trap() instead. 2014-11-24 23:39:47 +00:00
pdp11 Append to HOST_LIBGCC2_CFLAGS in libgcc 2011-11-07 17:14:32 +00:00
rl78 divmodhi.S: Add support for the G10 architecture. 2014-11-13 08:34:41 +00:00
rs6000 (libgcc_s) Optional filename-based shared library versioning on AIX. 2014-12-09 15:48:48 -05:00
rx Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
s390 s390.c (s390_emit_tpf_eh_return): Pass original return address as second parameter to __tpf_eh_return routine. 2014-07-30 16:26:15 +00:00
score float128-mul-underflow.c, [...]: New tests. 2014-02-12 23:24:49 +00:00
sh crt.h: New. 2014-12-17 02:01:10 +00:00
sparc Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
spu Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
stormy16 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
tilegx TILE-Gx big endian support. 2014-02-24 15:08:00 +00:00
tilepro Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
v850 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vax Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vms Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
xtensa Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
darwin-64.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
darwin-crt3.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
darwin-crt-tm.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gmon-sol2.c gmon-sol2.c: Reindent. 2011-06-01 14:46:24 +00:00
gthr-lynx.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gthr-rtems.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gthr-vxworks.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
hardfp.c configure.ac (libgcc_cv_mips_hard_float): New. 2014-02-07 07:46:34 +00:00
libgcc-glibc.ver Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
libgcc-libsystem.ver Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
no-sfp-machine.h soft-fp: Move to ../libgcc. 2011-08-05 15:13:48 +00:00
no-unwind.h linux.h (MD_UNWIND_SUPPORT): Remove. 2011-06-03 18:30:39 +00:00
t-crtfm Remove obsolete Tru64 UNIX V5.1B support 2012-03-12 15:35:56 +00:00
t-crtstuff-pic Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
t-darwin * config/t-darwin (crt3.0): Remove work-around for fixed PR26840. 2012-07-14 13:50:59 +00:00
t-dfprules dfp-bit.c, dfp-bit.h: Move to ../libgcc. 2011-07-11 14:40:56 +00:00
t-eh-dw2-dip Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
t-fdpbit Makefile.in (FPBIT_FUNCS, [...]): Remove. 2011-08-05 14:53:09 +00:00
t-fixedpoint-gnu-prefix Makefile.in (LIBGCC_VER_FIXEDPOINT_GNU_PREFIX): New. 2011-08-01 12:02:45 +00:00
t-fpbit Makefile.in (FPBIT_FUNCS, [...]): Remove. 2011-08-05 14:53:09 +00:00
t-freebsd-thread Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
t-gnu-prefix Makefile.in (LIBGCC_VER_FIXEDPOINT_GNU_PREFIX): New. 2011-08-01 12:02:45 +00:00
t-hardfp Optimize powerpc*-*-linux* e500 hardfp/soft-fp use. 2014-10-29 12:59:16 +00:00
t-hardfp-sfdf configure.ac (libgcc_cv_mips_hard_float): New. 2014-02-07 07:46:34 +00:00
t-libgcc-pic Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
t-libunwind Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
t-libunwind-elf Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-linux Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-openbsd-thread Append to HOST_LIBGCC2_CFLAGS in libgcc 2011-11-07 17:14:32 +00:00
t-rtems Consistently use t-rtems in libgcc 2011-11-07 17:12:33 +00:00
t-slibgcc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-slibgcc-darwin Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-slibgcc-elf-ver Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-slibgcc-gld t-slibgcc-darwin: Move to ... 2011-06-01 14:39:17 +00:00
t-slibgcc-gld-nover Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-slibgcc-hpux re PR other/55274 (gcc build hangs on HP-UX 11.11) 2013-04-06 18:22:09 +00:00
t-slibgcc-libgcc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-slibgcc-nolc-override Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-slibgcc-sld Don't build libgcc-unwind.map with --disable-shared (PR libgcc/61097) 2014-05-08 12:11:14 +00:00
t-slibgcc-vms Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-softfp Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
t-softfp-compat Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
t-softfp-excl soft-fp: Move to ../libgcc. 2011-08-05 15:13:48 +00:00
t-softfp-sfdf soft-fp: Move to ../libgcc. 2011-08-05 15:13:48 +00:00
t-softfp-tf soft-fp: Move to ../libgcc. 2011-08-05 15:13:48 +00:00
t-sol2 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-stack t-stack (LIB2ADD_ST): Set instead of LIB2ADD. 2010-10-01 19:31:49 +00:00
t-tls tls.m4 (GCC_CHECK_CC_TLS): New. 2007-07-06 07:00:46 -07:00
t-vxworks Append to HOST_LIBGCC2_CFLAGS in libgcc 2011-11-07 17:14:32 +00:00
unwind-dw2-fde-darwin.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vxlib-tls.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vxlib.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00