gcc/libgcc/config
Ulrich Weigand b54214fe22 rs6000.h (RS6000_SAVE_AREA): Handle ABI_ELFv2.
gcc/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000.h (RS6000_SAVE_AREA): Handle ABI_ELFv2.
	(RS6000_SAVE_TOC): Remove.
	(RS6000_TOC_SAVE_SLOT): New macro.
	* config/rs6000/rs6000.c (rs6000_parm_offset): New function.
	(rs6000_parm_start): Use it.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_emit_prologue): Use RS6000_TOC_SAVE_SLOT.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_call_aix): Likewise.
	(rs6000_output_function_prologue): Do not save/restore r11
	around calling _mcount for ABI_ELFv2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000-protos.h (rs6000_reg_parm_stack_space):
	Add prototype.
	* config/rs6000/rs6000.h (RS6000_REG_SAVE): Remove.
	(REG_PARM_STACK_SPACE): Call rs6000_reg_parm_stack_space.
	* config/rs6000/rs6000.c (rs6000_parm_needs_stack): New function.
	(rs6000_function_parms_need_stack): Likewise.
	(rs6000_reg_parm_stack_space): Likewise.
	(rs6000_function_arg): Do not replace BLKmode by Pmode when
	returning a register argument.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (FP_ARG_MAX_RETURN): New macro.
	(ALTIVEC_ARG_MAX_RETURN): Likewise.
	(FUNCTION_VALUE_REGNO_P): Use them.
	* config/rs6000/rs6000.c (TARGET_RETURN_IN_MSB): Define.
	(rs6000_return_in_msb): New function.
	(rs6000_return_in_memory): Handle ELFv2 homogeneous aggregates.
	Handle aggregates of up to 16 bytes for ELFv2.
	(rs6000_function_value): Handle ELFv2 homogeneous aggregates.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (AGGR_ARG_NUM_REG): Define.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): New function.
	(rs6000_discover_homogeneous_aggregate): Likewise.
	(rs6000_function_arg_boundary): Handle homogeneous aggregates.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_psave_function_arg): Handle BLKmode arguments.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (AGGR_ARG_NUM_REG): Define.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): New function.
	(rs6000_discover_homogeneous_aggregate): Likewise.
	(rs6000_function_arg_boundary): Handle homogeneous aggregates.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_psave_function_arg): Handle BLKmode arguments.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/rs6000/rs6000.c (machine_function): New member
	r2_setup_needed.
	(rs6000_emit_prologue): Set r2_setup_needed if necessary.
	(rs6000_output_mi_thunk): Set r2_setup_needed.
	(rs6000_output_function_prologue): Output global entry point
	prologue and local entry point marker if needed for ABI_ELFv2.
	Output -mprofile-kernel code here.
	(output_function_profiler): Do not output -mprofile-kernel
	code here; moved to rs6000_output_function_prologue.
	(rs6000_file_start): Output ".abiversion 2" for ABI_ELFv2.

	(rs6000_emit_move): Do not handle dot symbols for ABI_ELFv2.
	(rs6000_output_function_entry): Likewise.
	(rs6000_assemble_integer): Likewise.
	(rs6000_elf_encode_section_info): Likewise.
	(rs6000_elf_declare_function_name): Do not create dot symbols
	or .opd section for ABI_ELFv2.

	(rs6000_trampoline_size): Update for ABI_ELFv2 trampolines.
	(rs6000_trampoline_init): Likewise.
	(rs6000_elf_file_end): Call file_end_indicate_exec_stack
	for ABI_ELFv2.

	(rs6000_call_aix): Handle ELFv2 indirect calls.  Do not check
	for function descriptors in ABI_ELFv2.

	* config/rs6000/rs6000.md ("*call_indirect_aix<mode>"): Support
	on ABI_AIX only, not ABI_ELFv2.
	("*call_value_indirect_aix<mode>"): Likewise.
	("*call_indirect_elfv2<mode>"): New pattern.
	("*call_value_indirect_elfv2<mode>"): Likewise.

	* config/rs6000/predicates.md ("symbol_ref_operand"): Do not
	check for function descriptors in ABI_ELFv2.
	("current_file_function_operand"): Likewise.

	* config/rs6000/ppc-asm.h [__powerpc64__ && _CALL_ELF == 2]:
	(toc): Undefine.
	(FUNC_NAME): Define ELFv2 variant.
	(JUMP_TARGET): Likewise.
	(FUNC_START): Likewise.
	(HIDDEN_FUNC): Likewise.
	(FUNC_END): Likeiwse.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config.gcc [powerpc*-*-* | rs6000-*-*]: Support --with-abi=elfv1
	and --with-abi=elfv2.
	* config/rs6000/option-defaults.h (OPTION_DEFAULT_SPECS): Add "abi".
	* config/rs6000/rs6000.opt (mabi=elfv1): New option.
	(mabi=elfv2): Likewise.
	* config/rs6000/rs6000-opts.h (enum rs6000_abi): Add ABI_ELFv2.
	* config/rs6000/linux64.h (DEFAULT_ABI): Do not hard-code to AIX_ABI
	if !RS6000_BI_ARCH.
	(ELFv2_ABI_CHECK): New macro.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Use it to decide whether to set
	rs6000_current_abi to ABI_AIX or ABI_ELFv2.
	(GLIBC_DYNAMIC_LINKER64): Support ELFv2 ld.so version.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Predefine
	_CALL_ELF and __STRUCT_PARM_ALIGN__ if appropriate.

	* config/rs6000/rs6000.c (rs6000_debug_reg_global): Handle ABI_ELFv2.
	(debug_stack_info): Likewise.
	(rs6000_file_start): Treat ABI_ELFv2 the same as ABI_AIX.
	(rs6000_legitimize_tls_address): Likewise.
	(rs6000_conditional_register_usage): Likewise.
	(rs6000_emit_move): Likewise.
	(init_cumulative_args): Likewise.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_output_function_entry): Likewise.
	(rs6000_assemble_integer): Likewise.
	(rs6000_savres_strategy): Likewise.
	(rs6000_stack_info): Likewise.
	(rs6000_function_ok_for_sibcall): Likewise.
	(rs6000_emit_load_toc_table): Likewise.
	(rs6000_savres_routine_name): Likewise.
	(ptr_regno_for_savres): Likewise.
	(rs6000_emit_prologue): Likewise.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(output_profile_hook): Likewise.
	(output_function_profiler): Likewise.
	(rs6000_trampoline_size): Likewise.
	(rs6000_trampoline_init): Likewise.
	(rs6000_elf_output_toc_section_asm_op): Likewise.
	(rs6000_elf_encode_section_info): Likewise.
	(rs6000_elf_reloc_rw_mask): Likewise.
	(rs6000_elf_declare_function_name): Likewise.
	(rs6000_function_arg_boundary): Treat ABI_ELFv2 the same as ABI_AIX,
	except that rs6000_compat_align_parm is always assumed false.
	(rs6000_gimplify_va_arg): Likewise.
	(rs6000_call_aix): Update comment.
	(rs6000_sibcall_aix): Likewise.
	* config/rs6000/rs6000.md ("tls_gd_aix<TLSmode:tls_abi_suffix>"):
	Treat ABI_ELFv2 the same as ABI_AIX.
	("*tls_gd_call_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("tls_ld_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("*tls_ld_call_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("load_toc_aix_si"): Likewise.
	("load_toc_aix_di"): Likewise.
	("call"): Likewise.
	("call_value"): Likewise.
	("*call_local_aix<mode>"): Likewise.
	("*call_value_local_aix<mode>"): Likewise.
	("*call_nonlocal_aix<mode>"): Likewise.
	("*call_value_nonlocal_aix<mode>"): Likewise.
	("*call_indirect_aix<mode>"): Likewise.
	("*call_value_indirect_aix<mode>"): Likewise.
	("sibcall"): Likewise.
	("sibcall_value"): Likewise.
	("*sibcall_aix<mode>"): Likewise.
	("*sibcall_value_aix<mode>"): Likewise.
	* config/rs6000/predicates.md ("symbol_ref_operand"): Likewise.
	("current_file_function_operand"): Likewise.

gcc/testsuite/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* gcc.target/powerpc/ppc64-abi-1.c (stack_frame_t): Remove
	compiler and linker field if _CALL_ELF == 2.
	* gcc.target/powerpc/ppc64-abi-2.c (stack_frame_t): Likewise.
	* gcc.target/powerpc/ppc64-abi-dfp-1.c (stack_frame_t): Likewise.
	* gcc.dg/stack-usage-1.c (SIZE): Update value for _CALL_ELF == 2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* gcc.target/powerpc/ppc64-abi-dfp-1.c (FUNC_START): New macro.
	(WRAPPER): Use it.
	* gcc.target/powerpc/no-r11-1.c: Skip on powerpc_elfv2.
	* gcc.target/powerpc/no-r11-2.c: Skip on powerpc_elfv2.
	* gcc.target/powerpc/no-r11-3.c: Skip on powerpc_elfv2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* lib/target-supports.exp (check_effective_target_powerpc_elfv2):
	New function.
	* gcc.target/powerpc/pr57949-1.c: Disable for powerpc_elfv2.
	* gcc.target/powerpc/pr57949-2.c: Likewise.

libgcc/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/linux-unwind.h (TOC_SAVE_SLOT): Define.
	(frob_update_context): Use it.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/tramp.S [__powerpc64__ && _CALL_ELF == 2]:
	(trampoline_initial): Provide ELFv2 variant.
	(__trampoline_setup): Likewise.

	* config/rs6000/linux-unwind.h (frob_update_context): Do not
	check for AIX indirect function call sequence if _CALL_ELF == 2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/linux-unwind.h (get_regs): Do not support
	old kernel versions if _CALL_ELF == 2.
	(frob_update_context): Do not support PLT stub variants only
	generated by old linkers if _CALL_ELF == 2.

libitm/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
	(FUNC): Define ELFv2 variant.
	(END): Likewise.
	(HIDDEN): Likewise.
	(CALL): Likewise.
	(BASE): Likewise.
	(LR_SAVE): Likewise.

libstdc++/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* scripts/extract_symvers.in: Ignore <localentry: > fields
	in readelf --symbols output.


Co-Authored-By: Alan Modra <amodra@gmail.com>
Co-Authored-By: Michael Gschwind <mkg@us.ibm.com>

From-SVN: r204808
2013-11-14 18:50:48 +00:00
..
aarch64 Fix licenses on several libgcc files. 2013-08-01 21:09:10 +00:00
alpha Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
arc In accordance with http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00131.html : 2013-10-02 12:18:24 +01:00
arm config.host (arm-wrs-vxworks): Replace arm/t-vxworks with arm/t-elf in tmake_file. 2013-11-11 11:46:17 +00:00
avr re PR target/57516 ([avr] Incorrect fixed-point rounding result in the overflow case) 2013-07-19 11:10:08 +00:00
bfin Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
c6x re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
cr16 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
cris For CRIS ports, switch to soft-fp. Improve arit.c and longlong.h. 2013-10-16 01:43:14 +00:00
epiphany Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
fr30 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
frv Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
h8300 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
i386 cygming-crtbegin.c (__gcc_register_frame): Increment load-count on use of LIBGCC_SONAME DLL. 2013-11-10 12:47:18 +01:00
ia64 Fix licenses on several libgcc files. 2013-08-01 21:09:10 +00:00
iq2000 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
libbid Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
lm32 re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
m32c Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
m32r Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
m68k Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
mcore Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
mep Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
microblaze Setup stack protection at entry. 2013-03-04 15:23:05 +00:00
mips mips16.S (CE_STARTFN, CE_ENDFN): New macros. 2013-08-16 22:23:29 +00:00
mmix Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
moxie re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
msp430 MAINTAINERS: Add Nick Clifton and DJ Delorie as msp430 maintainers. 2013-09-12 13:52:41 -04:00
nds32 Add new nds32 port, including machine description, libgcc, and documentation. 2013-10-31 17:08:16 +00:00
pa Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
pdp11 Append to HOST_LIBGCC2_CFLAGS in libgcc 2011-11-07 17:14:32 +00:00
picochip Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
rl78 * config/rl78/vregs.h: Add G10 register definitions. 2013-09-16 17:58:05 -04:00
rs6000 rs6000.h (RS6000_SAVE_AREA): Handle ABI_ELFv2. 2013-11-14 18:50:48 +00:00
rx Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
s390 linux-unwind.h: Use the proper dwarf to hard reg mapping for FPRs when... 2013-07-23 07:20:52 +00:00
score re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
sh re PR target/6526 ([SH4] sdivsi3_i4 can clobber xd0/xd2) 2013-06-09 21:32:37 +00:00
sparc sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for SIGFPE raised for IEEE-754 exceptions. 2013-05-28 13:52:50 +00:00
spu Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
stormy16 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
tilegx re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
tilepro re PR other/53317 (Conversion from __int128 to __float128) 2013-06-21 20:08:01 +01:00
v850 Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
vax Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
vms Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
xtensa Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
darwin-64.c Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
darwin-crt3.c Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
darwin-crt-tm.c re PR libitm/55693 (libitm.c++/eh-1.C execution test fails on darwin from r193271) 2013-02-11 23:30:10 +00:00
gmon-sol2.c gmon-sol2.c: Reindent. 2011-06-01 14:46:24 +00:00
gthr-lynx.h Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
gthr-rtems.h Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
gthr-vxworks.h Update copyright in libgcc. 2013-02-04 19:06:20 +00:00
libgcc-glibc.ver Update copyright in libgcc. 2013-02-04 19:06:20 +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-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 in libgcc. 2013-02-04 19:06:20 +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 in libgcc. 2013-02-04 19:06:20 +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 in libgcc. 2013-02-04 19:06:20 +00:00
t-slibgcc-nolc-override Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-slibgcc-sld t-slibgcc-darwin: Move to ... 2011-06-01 14:39:17 +00:00
t-slibgcc-vms Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
t-softfp Update copyright in libgcc. 2013-02-04 19:06:20 +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 in libgcc. 2013-02-04 19:06:20 +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 in libgcc. 2013-02-04 19:06:20 +00:00
vxlib-tls.c 2013-03-20 Robert Mason <rbmj@verizon.net> 2013-03-20 22:01:25 +00:00
vxlib.c Update copyright in libgcc. 2013-02-04 19:06:20 +00:00