Commit Graph

19 Commits

Author SHA1 Message Date
Jakub Jelinek 7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Sandra Loosemore 2d33dcfe9f nios2: Support for GOT-relative DW_EH_PE_datarel encoding.
On nios2-linux-gnu, there has been a long-standing bug in C++ exception
handling that sometimes resulted in link errors like

../nios2-linux-gnu/bin/ld: FDE encoding in /tmp/cccfpQ2l.o(.eh_frame) prevents .eh_frame_hdr table being created

when building some shared libraries or PIE executables.  The root of
the problem is that GCC was incorrectly emitting an absolute encoding
in EH tables for PIC.  This patch changes it to use either
DW_EH_PE_indirect (for global) or DW_EH_PE_datarel (for local), and
fixes libgcc so it can find the address of the GOT as the base address
for DW_EH_PE_datarel.

Complicating matters somewhat, GAS was missing support for
%gotoff(symbol) relocation syntax.  I have just pushed a fix for that,
but I've added a configure check to test for presence of the binutils
support and fall back to the current absolute encoding (which works
most of the time) if it is not available.  Once the fix makes it into
an official binutils release it might be appropriate to make this
error out instead.

Since this is a wrong-code bug and affects only nios2 target, I think
this is appropriate for Stage 4.  I regression-tested on both
nios2-linux-gnu and nios2-elf, with and without the binutils support
present, before committing this.

2020-01-31  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* configure.ac [nios2-*-*]: Check HAVE_AS_NIOS2_GOTOFF_RELOCATION.
	* config.in: Regenerated.
	* configure: Regenerated.
	* config/nios2/nios2.h (ASM_PREFERRED_EH_DATA_FORMAT): Fix handling
	for PIC when HAVE_AS_NIOS2_GOTOFF_RELOCATION.
	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New.

	gcc/testsuite/
	* g++.target/nios2/hello-pie.C: New.
	* g++.target/nios2/nios2.exp: New.

	libgcc/
	* config.host [nios2-*-linux*] (tmake_file, tm_file): Adjust.
	* config/nios2-elf-lib.h: New.
	* unwind-dw2-fde-dip.c (_Unwind_IteratePhdrCallback): Use existing
	code for finding GOT base for nios2.
2020-01-31 16:46:50 -08:00
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Joseph Myers 883312dc79 Use ucontext_t not struct ucontext in linux-unwind.h files.
Current glibc no longer gives the ucontext_t type the tag struct
ucontext, to conform with POSIX namespace rules.  This requires
various linux-unwind.h files in libgcc, that were previously using
struct ucontext, to be fixed to use ucontext_t instead.  This is
similar to the removal of the struct siginfo tag from siginfo_t some
years ago.

This patch changes those files to use ucontext_t instead.  As the
standard name that should be unconditionally safe, so this is not
restricted to architectures supported by glibc, or conditioned on the
glibc version.

Tested compilation together with current glibc with glibc's
build-many-glibcs.py.

	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
	config/pa/linux-unwind.h (pa32_fallback_frame_state),
	config/riscv/linux-unwind.h (riscv_fallback_frame_state),
	config/sh/linux-unwind.h (sh_fallback_frame_state),
	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
	ucontext_t instead of struct ucontext.

From-SVN: r249731
2017-06-28 10:21:16 +01:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Chung-Lin Tang 20ca17e480 linux-atomic.c (<asm/unistd.h>): Remove #include.
2015-07-22  Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include.
	(EFAULT,EBUSY,ENOSYS): Delete unused #defines.

From-SVN: r226063
2015-07-22 11:39:30 +00:00
Sandra Loosemore a03c6ae388 tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.
2015-07-14  Sandra Loosemore  <sandra@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize
	for __nios2_arch__ level.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>

From-SVN: r225794
2015-07-14 18:43:46 -04:00
Chung-Lin Tang a9ce4e4a70 nios2.c (nios2_asm_file_end): Implement TARGET_ASM_FILE_END hook for adding .note.GNU-stack section when needed.
2015-01-20  Chung-Lin Tang  <cltang@codesourcery.com>

	gcc/
	* config/nios2/nios2.c (nios2_asm_file_end): Implement
	TARGET_ASM_FILE_END hook for adding .note.GNU-stack section when
	needed.
	(TARGET_ASM_FILE_END): Define.

	libgcc/
	* config/nios2/linux-unwind.h (nios2_fallback_frame_state):
	Update rt_sigframe format and address for current Nios II
	Linux conventions.

From-SVN: r219898
2015-01-20 14:49:51 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Joseph Myers 53d68b9f05 Use -fbuilding-libgcc for more target macros used in libgcc.
gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Also define
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
	__LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
	__LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
	__LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
	__LIBGCC_STACK_GROWS_DOWNWARD__,
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__,
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
	__LIBGCC_DWARF_FRAME_REGISTERS__,
	__LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
	__LIBGCC_STACK_POINTER_REGNUM__ and
	__LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
	(builtin_define_with_value): Handle backslash-escaping in string
	macro values.

libgcc:
	* Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc.
	* config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all
	uses to __LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to
	__LIBGCC_DWARF_FRAME_REGISTERS__.  Remove conditional definition.
	* config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change
	use to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__.
	* config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use
	to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__
	* config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to
	__LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	(STACK_POINTER_REGNUM): Change all uses to
	__LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change
	use to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS):
	Remove conditional definition.
	* crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_TEXT_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	(EH_TABLES_CAN_BE_READ_ONLY): Change all uses to
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__.
	(CTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_CTORS_SECTION_ASM_OP__.
	(DTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_DTORS_SECTION_ASM_OP__.
	(JCR_SECTION_NAME): Change all uses to
	__LIBGCC_JCR_SECTION_NAME__.
	(INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	* generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	* libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	* libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional
	definitions.  Change all uses to
	__LIBGCC_VTABLE_USES_DESCRIPTORS__.
	* unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional
	definition.  Change use to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__.
	(JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__.

From-SVN: r214954
2014-09-05 13:03:46 +01:00
Chung-Lin Tang 95ce7613d5 nios2.md (unspec): Add UNSPEC_PIC_GOTOFF_SYM enum.
2014-02-20  Chung-Lin Tang  <cltang@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.md (unspec): Add UNSPEC_PIC_GOTOFF_SYM enum.
	* config/nios2/nios2.c (nios2_function_profiler):
	Add -fPIC (flag_pic == 2) support.
	(nios2_handle_custom_fpu_cfg): Fix warning parameter.
	(nios2_large_offset_p): New function.
	(nios2_unspec_reloc_p): Move up position, update to use
	nios2_large_offset_p.
	(nios2_unspec_address): Remove function.
	(nios2_unspec_offset): New function.
	(nios2_large_got_address): New function.
	(nios2_got_address): Add large offset support.
	(nios2_legitimize_tls_address): Update usage of removed and new
	functions.
	(nios2_symbol_binds_local_p): New function.
	(nios2_load_pic_address): Add -fPIC (flag_pic == 2) support.
	(nios2_legitimize_address): Update to use nios2_large_offset_p.
	(nios2_emit_move_sequence): Avoid legitimizing (const (unspec ...)).
	(nios2_print_operand): Merge H/L processing, add hiadj/lo
	processing for (const (unspec ...)).
	(nios2_unspec_reloc_name): Add UNSPEC_PIC_GOTOFF_SYM case.

	gcc/testsuite/
	* gcc.target/nios2/biggot-1.c: New.
	* gcc.target/nios2/biggot-2.c: New.

	libgcc/
	* config/nios2/t-nios2 (CRTSTUFF_T_CFLAGS): Add -mno-gpopt.
	* config/nios2/crti.S: Remove .file directive.
	* config/nios2/crtn.S: Likewise.

From-SVN: r207965
2014-02-20 16:35:10 +00:00
Joseph Myers 9acf28f153 float128-mul-underflow.c, [...]: New tests.
gcc/testsuite:
	* gcc.dg/torture/float128-mul-underflow.c,
	gcc.dg/torture/float128-truncdf-underflow.c,
	gcc.dg/torture/float128-truncsf-underflow.c: New tests.

libgcc:
	* soft-fp/adddf3.c: Update from glibc.
	* soft-fp/addsf3.c: Likewise.
	* soft-fp/addtf3.c: Likewise.
	* soft-fp/divdf3.c: Likewise.
	* soft-fp/divsf3.c: Likewise.
	* soft-fp/divtf3.c: Likewise.
	* soft-fp/double.h: Likewise.
	* soft-fp/eqdf2.c: Likewise.
	* soft-fp/eqsf2.c: Likewise.
	* soft-fp/eqtf2.c: Likewise.
	* soft-fp/extenddftf2.c: Likewise.
	* soft-fp/extended.h: Likewise.
	* soft-fp/extendsfdf2.c: Likewise.
	* soft-fp/extendsftf2.c: Likewise.
	* soft-fp/extendxftf2.c: Likewise.
	* soft-fp/fixdfdi.c: Likewise.
	* soft-fp/fixdfsi.c: Likewise.
	* soft-fp/fixdfti.c: Likewise.
	* soft-fp/fixsfdi.c: Likewise.
	* soft-fp/fixsfsi.c: Likewise.
	* soft-fp/fixsfti.c: Likewise.
	* soft-fp/fixtfdi.c: Likewise.
	* soft-fp/fixtfsi.c: Likewise.
	* soft-fp/fixtfti.c: Likewise.
	* soft-fp/fixunsdfdi.c: Likewise.
	* soft-fp/fixunsdfsi.c: Likewise.
	* soft-fp/fixunsdfti.c: Likewise.
	* soft-fp/fixunssfdi.c: Likewise.
	* soft-fp/fixunssfsi.c: Likewise.
	* soft-fp/fixunssfti.c: Likewise.
	* soft-fp/fixunstfdi.c: Likewise.
	* soft-fp/fixunstfsi.c: Likewise.
	* soft-fp/fixunstfti.c: Likewise.
	* soft-fp/floatdidf.c: Likewise.
	* soft-fp/floatdisf.c: Likewise.
	* soft-fp/floatditf.c: Likewise.
	* soft-fp/floatsidf.c: Likewise.
	* soft-fp/floatsisf.c: Likewise.
	* soft-fp/floatsitf.c: Likewise.
	* soft-fp/floattidf.c: Likewise.
	* soft-fp/floattisf.c: Likewise.
	* soft-fp/floattitf.c: Likewise.
	* soft-fp/floatundidf.c: Likewise.
	* soft-fp/floatundisf.c: Likewise.
	* soft-fp/floatunditf.c: Likewise.
	* soft-fp/floatunsidf.c: Likewise.
	* soft-fp/floatunsisf.c: Likewise.
	* soft-fp/floatunsitf.c: Likewise.
	* soft-fp/floatuntidf.c: Likewise.
	* soft-fp/floatuntisf.c: Likewise.
	* soft-fp/floatuntitf.c: Likewise.
	* soft-fp/gedf2.c: Likewise.
	* soft-fp/gesf2.c: Likewise.
	* soft-fp/getf2.c: Likewise.
	* soft-fp/ledf2.c: Likewise.
	* soft-fp/lesf2.c: Likewise.
	* soft-fp/letf2.c: Likewise.
	* soft-fp/muldf3.c: Likewise.
	* soft-fp/mulsf3.c: Likewise.
	* soft-fp/multf3.c: Likewise.
	* soft-fp/negdf2.c: Likewise.
	* soft-fp/negsf2.c: Likewise.
	* soft-fp/negtf2.c: Likewise.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/quad.h: Likewise.
	* soft-fp/single.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
	* soft-fp/subdf3.c: Likewise.
	* soft-fp/subsf3.c: Likewise.
	* soft-fp/subtf3.c: Likewise.
	* soft-fp/truncdfsf2.c: Likewise.
	* soft-fp/trunctfdf2.c: Likewise.
	* soft-fp/trunctfsf2.c: Likewise.
	* soft-fp/trunctfxf2.c: Likewise.
	* soft-fp/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.
	* config/aarch64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): New
	macro.
	* config/arm/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/c6x/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/cris/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/i386/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/ia64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/lm32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/mips/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/moxie/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/nds32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/nios2/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/rs6000/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/score/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilegx/sfp-machine32.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilegx/sfp-machine64.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilepro/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.

From-SVN: r207742
2014-02-12 23:24:49 +00:00
Sandra Loosemore 02b677311e nios2.md (load_got_register): Initialize GOT pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_.
2014-02-02  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.md (load_got_register): Initialize GOT
	pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_.
	* config/nios2/nios2.c (nios2_function_profiler): Likewise.

	libgcc/
	* config/nios2/crti.S (_init): Initialize GOT pointer from
	_gp_got instead of _GLOBAL_OFFSET_TABLE_.

From-SVN: r207409
2014-02-02 17:12:17 -05:00
Richard Sandiford ac1dca3cab Update copyright years in libgcc/
From-SVN: r206295
2014-01-02 22:25:22 +00:00
Chung-Lin Tang e430824f28 Commit of nios2 port to trunk:
contrib/
2013-12-31  Chung-Lin Tang  <cltang@codesourcery.com>

	* config-list.mk: Add nios2-elf, nios2-linux-gnu. Corrected
	ordering of some configs.

gcc/
2013-12-31  Chung-Lin Tang  <cltang@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>
	    Based on patches from Altera Corporation

	* config.gcc (nios2-*-*): Add nios2 config targets.
	* configure.ac (TLS_SECTION_ASM_FLAG): Add nios2 case.
	("$cpu_type"): Add nios2 as new cpu type.
	* configure: Regenerate.
	* config/nios2/nios2.c: New file.
	* config/nios2/nios2.h: New file.
	* config/nios2/nios2-opts.h: New file.
	* config/nios2/nios2-protos.h: New file.
	* config/nios2/elf.h: New file.
	* config/nios2/elf.opt: New file.
	* config/nios2/linux.h: New file.
	* config/nios2/nios2.opt: New file.
	* config/nios2/nios2.md: New file.
	* config/nios2/predicates.md: New file.
	* config/nios2/constraints.md: New file.
	* config/nios2/t-nios2: New file.
	* common/config/nios2/nios2-common.c: New file.
	* doc/invoke.texi (Nios II options): Document Nios II specific
	options.
	* doc/md.texi (Nios II family): Document Nios II specific
	constraints.
	* doc/extend.texi (Function Specific Option Pragmas): Document
	Nios II supported target pragma functionality.

gcc/testsuite/
2013-12-31  Sandra Loosemore  <sandra@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Based on patches from Altera Corporation

	* gcc.dg/stack-usage-1.c (SIZE): Define case for __nios2__.
	* gcc.dg/20040813-1.c: Skip for nios2-*-*.
	* gcc.dg/20020312-2.c: Add __nios2__ case.
	* g++.dg/other/PR23205.C: Skip for nios2-*-*.
	* g++.dg/other/pr23205-2.C: Skip for nios2-*-*.
	* g++.dg/cpp0x/constexpr-rom.C: Skip for nios2-*-*.
	* g++.dg/cpp0x/alias-decl-debug-0.C: Skip for nios2-*-*.
	* g++.old-deja/g++.jason/thunk3.C: Skip for nios2-*-*.
	* lib/target-supports.exp (check_profiling_available): Check for
	nios2-*-elf.
	* gcc.c-torture/execute/pr47237.x:: Skip for nios2-*-*.
	* gcc.c-torture/execute/20101011-1.c: Skip for nios2-*-*.
	* gcc.c-torture/execute/builtins/lib/chk.c (memset): Place
	char-based memset loop before inline check, to prevent
	problems when called to initialize .bss. Update comments.
	* gcc.target/nios2/nios2.exp: New DejaGNU file.
	* gcc.target/nios2/nios2-custom-1.c: New test.
	* gcc.target/nios2/nios2-trap-insn.c: New test.
	* gcc.target/nios2/nios2-builtin-custom.c: New test.
	* gcc.target/nios2/nios2-builtin-io.c: New test.
	* gcc.target/nios2/nios2-stack-check-1.c: New test.
	* gcc.target/nios2/nios2-stack-check-2.c: New test.
	* gcc.target/nios2/nios2-rdctl.c: New test.
	* gcc.target/nios2/nios2-wrctl.c: New test.
	* gcc.target/nios2/nios2-wrctl-zero.c: New test.
	* gcc.target/nios2/nios2-wrctl-not-zero.c: New test.
	* gcc.target/nios2/nios2-rdwrctl-1.c: New test.
	* gcc.target/nios2/nios2-reg-constraints.c: New test.
	* gcc.target/nios2/nios2-ashlsi3-one_shift.c: New test.
	* gcc.target/nios2/nios2-mul-options-1.c: New test.
	* gcc.target/nios2/nios2-mul-options-2.c: New test.
	* gcc.target/nios2/nios2-mul-options-3.c: New test.
	* gcc.target/nios2/nios2-mul-options-4.c: New test.
	* gcc.target/nios2/nios2-nor.c: New test.
	* gcc.target/nios2/nios2-stxio.c: New test.
	* gcc.target/nios2/custom-fp-1.c: New test.
	* gcc.target/nios2/custom-fp-2.c: New test.
	* gcc.target/nios2/custom-fp-3.c: New test.
	* gcc.target/nios2/custom-fp-4.c: New test.
	* gcc.target/nios2/custom-fp-5.c: New test.
	* gcc.target/nios2/custom-fp-6.c: New test.
	* gcc.target/nios2/custom-fp-7.c: New test.
	* gcc.target/nios2/custom-fp-8.c: New test.
	* gcc.target/nios2/custom-fp-cmp-1.c: New test.
	* gcc.target/nios2/custom-fp-conversion.c: New test.
	* gcc.target/nios2/custom-fp-double.c: New test.
	* gcc.target/nios2/custom-fp-float.c: New test.
	* gcc.target/nios2/nios2-int-types.c: New test.
	* gcc.target/nios2/nios2-cache-1.c: New test.
	* gcc.target/nios2/nios2-cache-2.c: New test.

libgcc/
2013-12-31  Sandra Loosemore  <sandra@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Based on patches from Altera Corporation

	* config.host (nios2-*-*,nios2-*-linux*): Add nios2 host cases.
	* config/nios2/lib2-nios2.h: New file.
	* config/nios2/lib2-divmod-hi.c: New file.
	* config/nios2/linux-unwind.h: New file.
	* config/nios2/lib2-divmod.c: New file.
	* config/nios2/linux-atomic.c: New file.
	* config/nios2/t-nios2: New file.
	* config/nios2/crti.asm: New file.
	* config/nios2/t-linux: New file.
	* config/nios2/lib2-divtable.c: New file.
	* config/nios2/lib2-mul.c: New file.
	* config/nios2/tramp.c: New file.
	* config/nios2/crtn.asm: New file.

From-SVN: r206256
2013-12-31 07:05:35 +00:00