Go to file
Max Filippov 590e26360c Implement call0 ABI for xtensa
call0 is an ABI that doesn't use register windows.

2015-03-03  Max Filippov  <jcmvbkbc@gmail.com>

gcc/
	* config/xtensa/constraints.md ("a" constraint): Include stack
	pointer in case of call0 ABI.
	("q" constraint): Make empty in case of call0 ABI.
	("D" constraint): Include stack pointer in case of call0 ABI.
	* config/xtensa/xtensa-protos.h (xtensa_set_return_address,
	xtensa_expand_epilogue, xtensa_regno_to_class): Add new function
	prototypes.
	* config/xtensa/xtensa.c (xtensa_callee_save_size): New
	variable.
	(xtensa_regno_to_class): Make it a local variable in the
	function xtensa_regno_to_class.
	(xtensa_function_epilogue, TARGET_ASM_FUNCTION_EPILOGUE): Remove
	macro, function prototype and implementation.
	(reg_nonleaf_alloc_order): Make it a local variable in the
	function order_regs_for_local_alloc.
	(xtensa_conditional_register_usage): New function.
	(TARGET_CONDITIONAL_REGISTER_USAGE): Define macro.
	(xtensa_valid_move): Allow direct moves to stack pointer
	register in call0 ABI.
	(xtensa_setup_frame_addresses): Only spill register windows in
	windowed ABI.
	(xtensa_emit_call): Emit call(x)8 or call(x)0 in windowed and
	call0 ABI respectively.
	(xtensa_function_arg_1): Only mark a7 register for copying in
	windowed ABI.
	(xtensa_call_save_reg): New function.
	(compute_frame_size): Add space for callee saved register
	storage to the frame size in call0 ABI.
	(xtensa_expand_prologue): Generate code to set up stack frame
	and save callee-saved registers in call0 ABI.
	(xtensa_expand_epilogue): New function.
	(xtensa_set_return_address): New function.
	(xtensa_return_addr): Calculate return address in call0 ABI.
	(xtensa_builtin_saveregs): Only mark a7 register for copying and
	emit copying code in windowed ABI.
	(order_regs_for_local_alloc): Add preferred register allocation
	order for non-leaf function in call0 ABI.
	(xtensa_static_chain): Add atatic chain passing for call0 ABI.
	(xtensa_asm_trampoline_template): Add trampoline generation for
	call0 ABI.
	(xtensa_trampoline_init): Add trampoline initialization for
	call0 ABI.
	(xtensa_conditional_register_usage, xtensa_regno_to_class): New
	functions.
	* config/xtensa/xtensa.h (TARGET_WINDOWED_ABI): New macro.
	(TARGET_CPU_CPP_BUILTINS): Add built-in define for call0 ABI.
	(CALL_USED_REGISTERS): Modify to encode both windowed and call0
	ABI call-used registers.
	(HARD_FRAME_POINTER_REGNUM): Add frame pointer for call0 ABI.
	(INCOMING_REGNO, OUTGOING_REGNO): Use argument unchanged in
	call0 ABI.
	(REG_CLASS_CONTENTS): Include all registers into the preferred
	reload registers set, adjust the set in the
	xtensa_conditional_register_usage.
	(xtensa_regno_to_class): Drop variable declaration.
	(REGNO_REG_CLASS): Redefine to use xtensa_regno_to_class
	function.
	(WINDOW_SIZE): Define as 8 or 0 for windowed and call0 ABI
	respectively.
	(FUNCTION_PROFILER): Add _mcount call for call0 ABI.
	(TRAMPOLINE_SIZE): Define trampoline size for call0 ABI.
	(RETURN_ADDR_IN_PREVIOUS_FRAME): Define to 0 in call0 ABI.
	(ASM_OUTPUT_POOL_PROLOGUE): Always generate literal pool
	location in call0 ABI.
	(EH_RETURN_STACKADJ_RTX): New definition, use a10 for passing
	stack adjustment size when handling exception.
	(CRT_CALL_STATIC_FUNCTION): Add definition for call0 ABI.
	* config/xtensa/xtensa.md (A9_REG, UNSPECV_BLOCKAGE): New
	definitions.
	("return" pattern): Generate ret.n/ret in call0 ABI.
	("epilogue" pattern): Expand epilogue.
	("nonlocal_goto" pattern): Use default in call0 ABI.
	("eh_return" pattern): Move implementation to eh_set_a0_windowed,
	emit eh_set_a0_* depending on ABI.
	("eh_set_a0_windowed" pattern): Former eh_return pattern.
	("eh_set_a0_call0", "blockage"): New patterns.

libgcc/
	* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill,
	__xtensa_nonlocal_goto): Don't compile for call0 ABI.
	(__xtensa_sync_caches): Only use entry and retw in windowed ABI,
	use ret in call0 ABI.
	* config/xtensa/t-windowed: New file.
	* libgcc/config/xtensa/t-xtensa (LIB2ADDEH): Move to t-windowed.
	* libgcc/configure: Regenerated.
	* libgcc/configure.ac: Check if xtensa target is configured for
	windowed ABI and thus needs to use custom unwind code.

From-SVN: r221158
2015-03-03 17:44:01 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
boehm-gc Include target-utils.exp in boehm-gc testing 2014-12-18 09:42:22 +00:00
config Revert: 2015-02-25 20:59:31 +01:00
contrib gcc_update (files_and_dependencies): Add rules for liboffloadmic and liboffloadmic/plugin. 2015-02-05 13:55:25 +00:00
fixincludes Change stdlib.h base, not inttypes.h 2015-02-17 09:45:48 -05:00
gcc Implement call0 ABI for xtensa 2015-03-03 17:44:01 +00:00
gnattools Makefile.in (TOOLS_FLAGS_TO_PASS_CROSS): Robustify. 2014-02-23 16:30:11 +00:00
gotools re PR go/64738 (go, gofmt and cgo binaries linked statically) 2015-01-23 23:11:59 +00:00
include floatformat.h: Wrap in extern "C" 2015-02-19 12:18:45 +00:00
intl Fix unportable shell quoting. 2010-09-27 20:19:41 +00:00
libada Update copyright years. 2015-01-05 13:33:28 +01:00
libatomic Avoid misaligned atomic operations 2015-01-21 09:17:03 -08:00
libbacktrace Move wrong ChangeLog entry from the toplevel ChangeLog to 2015-01-26 14:51:12 +00:00
libcc1 Always pass explicit location to fatal_error. 2015-01-30 16:15:00 +00:00
libcilkrts configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. 2015-01-26 22:54:31 +00:00
libcpp be.po, [...]: Update. 2015-02-25 16:08:20 +00:00
libdecnumber Update copyright years. 2015-01-05 13:33:28 +01:00
libffi ffitarget.h (ffi_arg): Use unsigned long long for ILP32. 2015-02-10 14:46:47 -08:00
libgcc Implement call0 ABI for xtensa 2015-03-03 17:44:01 +00:00
libgfortran re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000") 2015-02-11 04:29:06 +00:00
libgo mksysinfo.sh: Remove _zone_net_addr_t handling. 2015-02-06 16:18:14 +00:00
libgomp Use DO_PRAGMA in libgomp.oacc-c-c++-common/reduction-1.c 2015-02-25 15:38:38 +00:00
libiberty strerror.c: Do not declare sys_nerr or sys_errlist if already macros 2015-01-19 15:28:56 +00:00
libitm Make test2/test1 static in libitm.c/stackundo.c 2015-01-15 10:03:20 -08:00
libjava cygwin.h (LIBGCJ_SONAME): Set libgcj version to -16. 2015-01-29 00:34:03 +00:00
libobjc Fix failures on AIX (PR libobjc/63765) 2015-02-05 09:41:44 +00:00
liboffloadmic Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
libquadmath configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. 2015-01-26 14:57:41 +00:00
libsanitizer * configure.tgt: Enable build on powerpc*le-*-linux. 2015-02-27 07:46:30 -06:00
libssp ssp.c (__guard_setup): For Windows... 2015-02-09 18:44:08 -07:00
libstdc++-v3 re PR libstdc++/65279 (std::scoped_allocator_adaptor is not assignable) 2015-03-02 17:50:55 +00:00
libvtv libvtv: autoreconf. 2015-02-09 12:41:22 +01:00
lto-plugin Revert the PR lto/64837 fix 2015-02-06 05:55:42 -08:00
maintainer-scripts Complete previous change. 2015-02-25 16:47:05 +01:00
zlib Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
.dir-locals.el * .dir-locals.el: Add. 2013-10-16 18:25:31 +00:00
.gitignore Local Vim config with GNU formatting. 2014-12-09 13:45:47 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog MAINTAINERS: Remove Paul Brook as a Fortran and ARM maintainer. 2015-03-03 09:41:55 -07:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Remove Paul Brook as a Fortran and ARM maintainer. 2015-03-03 09:41:55 -07:00
Makefile.def configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
Makefile.in configure.ac (host_tools): Add gotools. 2015-01-09 21:23:09 +00:00
Makefile.tpl Bug #63539 2015-01-03 14:50:48 -08:00
README * README: Document use of ranges of years in copyright notices. 2012-07-16 15:01:34 +01:00
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in * config-ml.in: Robustify ac_configure_args parsing. 2014-06-13 16:32:29 +02:00
config.guess config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
config.rpath Remove freebsd1 from libtool.m4 macros and config.rpath. 2011-02-13 11:45:53 +00:00
config.sub config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
configure Revert: 2015-02-25 20:59:31 +01:00
configure.ac Revert: 2015-02-25 20:59:31 +01:00
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
ltgcc.m4
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788) 2014-02-04 09:31:38 +00:00
ltoptions.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
ltsugar.m4
ltversion.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
lt~obsolete.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.