gcc/libgcc/config
Matthew Fortune 050af1445b Implement MIPS o32 FPXX, FP64, FP64A ABI extensions.
2014-11-12  Matthew Fortune  <matthew.fortune@imgtec.com>

gcc/
	* common/config/mips/mips-common.c (mips_handle_option): Ensure
	that -mfp32, -mfp64 disable -mfpxx and -mfpxx disables -mfp64.
	* config.gcc (--with-fp-32): New option.
	(--with-odd-spreg-32): Likewise.
	* config.in (HAVE_AS_DOT_MODULE): New config define.
	* config/mips/mips-protos.h
	(mips_secondary_memory_needed): New prototype.
	(mips_hard_regno_caller_save_mode): Likewise.
	* config/mips/mips.c (mips_get_reg_raw_mode): New static prototype.
	(mips_get_arg_info): Assert that V2SFmode is only handled specially
	with TARGET_PAIRED_SINGLE_FLOAT.
	(mips_return_mode_in_fpr_p): Likewise.
	(mips16_call_stub_mode_suffix): Likewise.
	(mips_get_reg_raw_mode): New static function.
	(mips_return_fpr_pair): O32 return values span two registers.
	(mips16_build_call_stub): Likewise.
	(mips_function_value_regno_p): Support both FP return registers.
	(mips_output_64bit_xfer): Use mthc1 whenever TARGET_HAS_MXHC1.  Add
	specific cases for TARGET_FPXX to move via memory.
	(mips_dwarf_register_span): For TARGET_FPXX pretend that modes larger
	than UNITS_PER_FPREG 'span' one register.
	(mips_dwarf_frame_reg_mode): New static function.
	(mips_file_start): Switch to using .module instead of .gnu_attribute.
	No longer support FP ABI 4 (-mips32r2 -mfp64), replace with FP ABI 6.
	Add FP ABI 5 (-mfpxx) and FP ABI 7 (-mfp64 -mno-odd-spreg).
	(mips_save_reg, mips_restore_reg): Always represent DFmode frame
	slots with two CFI directives even for O32 FP64.
	(mips_for_each_saved_gpr_and_fpr): Account for fixed_regs when
	saving/restoring callee-saved registers.
	(mips_hard_regno_mode_ok_p): Implement O32 FP64A extension.
	(mips_secondary_memory_needed): New function.
	(mips_option_override): ABI check for TARGET_FLOATXX.  Disable
	odd-numbered single-precision registers	when using TARGET_FLOATXX.
	Implement -modd-spreg and defaults.
	(mips_conditional_register_usage): Redefine O32 FP64 to match O32 FP32
	callee-saved behaviour.
	(mips_hard_regno_caller_save_mode): Implement.
	(TARGET_GET_RAW_RESULT_MODE): Define target hook.
	(TARGET_GET_RAW_ARG_MODE): Define target hook.
	(TARGET_DWARF_FRAME_REG_MODE): Define target hook.
	* config/mips/mips.h (TARGET_FLOAT32): New macro.
	(TARGET_O32_FP64A_ABI): Likewise.
	(TARGET_CPU_CPP_BUILTINS): TARGET_FPXX is __mips_fpr==0. Add
	_MIPS_SPFPSET builtin define.
	(MIPS_FPXX_OPTION_SPEC): New macro.
	(OPTION_DEFAULT_SPECS): Pass through --with-fp-32=* to -mfp and
	--with-odd-spreg-32=* to -m[no-]odd-spreg.
	(ISA_HAS_ODD_SPREG): New macro.
	(ISA_HAS_MXHC1): True for anything other than -mfp32.
	(ASM_SPEC): Pass through mfpxx, mfp64, -mno-odd-spreg and -modd-spreg.
	(MIN_FPRS_PER_FMT): Redefine in terms of TARGET_ODD_SPREG.
	(HARD_REGNO_CALLER_SAVE_MODE): Define.  Implement O32 FPXX extension
	(HARD_REGNO_CALL_PART_CLOBBERED): Likewise.
	(SECONDARY_MEMORY_NEEDED): Likewise.
	(FUNCTION_ARG_REGNO_P): Update for O32 FPXX and FP64 extensions.
	* config/mips/mips.md (define_attr enabled): Implement O32 FPXX and
	FP64A ABI extensions.
	(move_doubleword_fpr<mode>): Use ISA_HAS_MXHC1 instead of
	TARGET_FLOAT64.
	* config/mips/mips.opt (mfpxx): New target option.
	(modd-spreg): Likewise.
	* config/mips/mti-elf.h (DRIVER_SELF_SPECS): Infer FP ABI from arch.
	* config/mips/mti-linux.h (DRIVER_SELF_SPECS): Likewise and remove
	fp64 sysroot.
	* config/mips/t-mti-elf: Remove fp64 multilib.
	* config/mips/t-mti-linux: Likewise.
	* configure.ac: Detect .module support.
	* configure: Regenerate.
	* doc/invoke.texi: Document -mfpxx, -modd-spreg, -mno-odd-spreg option.
	* doc/install.texi (--with-fp-32, --with-odd-spreg-32): Document new
	options.

gcc/testsuite/
	* gcc.target/mips/args-1.c: Handle __mips_fpr == 0.
	* gcc.target/mips/call-clobbered-1.c: New.
	* gcc.target/mips/call-clobbered-2.c: New.
	* gcc.target/mips/call-clobbered-3.c: New.
	* gcc.target/mips/call-clobbered-4.c: New.
	* gcc.target/mips/call-clobbered-5.c: New.
	* gcc.target/mips/call-saved-4.c: New.
	* gcc.target/mips/call-saved-5.c: New.
	* gcc.target/mips/call-saved-6.c: New.
	* gcc.target/mips/mips.exp: Support -mfpxx, -ffixed-f*,
	and -m[no-]odd-spreg.  Use _MIPS_SPFPSET to determine default
	odd-spreg option.  Account for -modd-spreg in minimum arch code.
	* gcc.target/mips/movdf-1.c: New.
	* gcc.target/mips/movdf-2.c: New.
	* gcc.target/mips/movdf-3.c: New.
	* gcc.target/mips/oddspreg-1.c: New.
	* gcc.target/mips/oddspreg-2.c: New.
	* gcc.target/mips/oddspreg-3.c: New.
	* gcc.target/mips/oddspreg-4.c: New.
	* gcc.target/mips/oddspreg-5.c: New.
	* gcc.target/mips/oddspreg-6.c: New.

libgcc/
	* config/mips/mips16.S: Set .module when supported.  Update O32
	FP64 calling convention and use for FPXX when possible.  Add FPXX
	calling convention fallback case.

From-SVN: r217446
2014-11-12 21:39:46 +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 bpabi.c (__gnu_uldivmod_helper): Remove. 2014-06-18 15:44:45 +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 Fix i386 FP_TRAPPING_EXCEPTIONS. 2014-09-18 13:00:21 +01: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 Implement MIPS o32 FPXX, FP64, FP64A ABI extensions. 2014-11-12 21:39:46 +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-unwind.h (pa32_read_access_ok): New function. 2014-10-26 14:46:14 +00:00
pdp11
rl78 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
rs6000 Optimize powerpc*-*-linux* e500 hardfp/soft-fp use. 2014-10-29 12:59:16 +00: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 Update copyright years in libgcc/ 2014-01-02 22:25:22 +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
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
no-sfp-machine.h
no-unwind.h
t-crtfm
t-crtstuff-pic
t-darwin
t-dfprules
t-eh-dw2-dip
t-fdpbit
t-fixedpoint-gnu-prefix
t-fpbit
t-freebsd-thread
t-gnu-prefix
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
t-libunwind
t-libunwind-elf Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-linux
t-openbsd-thread
t-rtems
t-slibgcc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-slibgcc-darwin
t-slibgcc-elf-ver
t-slibgcc-gld
t-slibgcc-gld-nover
t-slibgcc-hpux
t-slibgcc-libgcc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-slibgcc-nolc-override
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
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
t-softfp-sfdf
t-softfp-tf
t-sol2 Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
t-stack
t-tls
t-vxworks
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