gcc/libgcc
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
..
config Implement MIPS o32 FPXX, FP64, FP64A ABI extensions. 2014-11-12 21:39:46 +00:00
soft-fp Update soft-fp from glibc. 2014-10-09 19:21:30 +01:00
ChangeLog Implement MIPS o32 FPXX, FP64, FP64A ABI extensions. 2014-11-12 21:39:46 +00:00
Makefile.in Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
config.host Add the nvptx port. 2014-11-10 16:12:42 +00:00
config.in
configure Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
configure.ac Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
crtstuff.c crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS override USE_PT_GNU_EH_FRAME. 2014-09-22 00:49:01 +00:00
dfp-bit.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
dfp-bit.h Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro. 2014-09-23 01:48:46 +01:00
divmod.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
empty.mk
emutls.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
enable-execute-stack-empty.c
enable-execute-stack-mprotect.c config.gcc (*-*-dragonfly*): New target. 2014-05-21 12:08:58 +01:00
find-symver.awk Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
fixed-bit.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
fixed-bit.h Remove LIBGCC2_HAS_?F_MODE target macros. 2014-09-12 13:05:18 +01:00
fixed-obj.mk
floatunsidf.c
floatunsisf.c
floatunsitf.c
floatunsixf.c
fp-bit.c Remove no-longer-needed fp-bit target macros. 2014-09-08 13:22:56 +01:00
fp-bit.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gbl-ctors.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gen-fixed.sh
generic-morestack-thread.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
generic-morestack.c Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
generic-morestack.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gstdint.h
gthr-posix.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gthr-single.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
gthr.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
libgcc-std.ver.in Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
libgcc2.c Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro. 2014-09-23 01:48:46 +01:00
libgcc2.h Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro. 2014-09-23 01:48:46 +01:00
libgcov-driver-system.c libgcov-driver.c (struct gcov_filename_aux): Rename ... 2014-07-27 07:22:47 +00:00
libgcov-driver.c Add overlap functionality to gcov-tool. 2014-10-08 21:51:41 +00:00
libgcov-interface.c Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ... 2014-09-17 20:13:17 +00:00
libgcov-merge.c Makefile.in: Fix dependence. 2014-10-07 04:02:31 +00:00
libgcov-profiler.c Makefile.in: Fix dependence. 2014-10-07 04:02:31 +00:00
libgcov-util.c Add overlap functionality to gcov-tool. 2014-10-08 21:51:41 +00:00
libgcov.h Makefile.in: Fix dependence. 2014-10-07 04:02:31 +00:00
memcmp.c
memcpy.c
memmove.c
memset.c
mkheader.sh Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
mkmap-flat.awk Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
mkmap-symver.awk Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
shared-object.mk Add the nvptx port. 2014-11-10 16:12:42 +00:00
siditi-object.mk
static-object.mk Add the nvptx port. 2014-11-10 16:12:42 +00:00
sync.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
udivmod.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
udivmodsi4.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-arm-common.inc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-c.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-compat.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-compat.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-dw2-fde-compat.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-dw2-fde-dip.c config.gcc (*-*-dragonfly*): New target. 2014-05-21 12:08:58 +01:00
unwind-dw2-fde.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-dw2-fde.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-dw2.c Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
unwind-dw2.h Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
unwind-generic.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-pe.h Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
unwind-seh.c re PR libgcc/61585 (Subscript-out-of-range in unwind-seh.c?) 2014-06-23 18:20:31 +02:00
unwind-sjlj.c Use -fbuilding-libgcc for more target macros used in libgcc. 2014-09-05 13:03:46 +01:00
unwind.inc Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vtv_end.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vtv_end_preinit.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vtv_start.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00
vtv_start_preinit.c Update copyright years in libgcc/ 2014-01-02 22:25:22 +00:00