gcc/libgcc/config/i386
Daniel Santos d6d4d7701a i386.opt: Add option -mcall-ms2sysv-xlogues.
gcc/ChangeLog:

	* config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
	* config/i386/i386.h
	(x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
	(NUM_X86_64_MS_CLOBBERED_REGS): New macro.
	(struct machine_function): Add new members call_ms2sysv,
	call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
	(struct machine_frame_state): New fields sp_realigned and
	sp_realigned_offset.
	* config/i386/i386.c
	(enum xlogue_stub): New enum.
	(enum xlogue_stub_sets): New enum.
	(class xlogue_layout): New class.
	(struct ix86_frame): New fields stack_realign_allocate_offset,
	stack_realign_offset and outlined_save_offset.  Modify comments to
	detail stack layout when using out-of-line stubs.
	(ix86_target_string): Add -mcall-ms2sysv-xlogues option.
	(ix86_option_override_internal): Add sorry() for TARGET_SEH and
	-mcall-ms2sysv-xlogues.
	(stub_managed_regs): New static variable.
	(ix86_save_reg): Add new parameter ignore_outlined to optionally omit
	registers managed by out-of-line stub.
	(disable_call_ms2sysv_xlogues): New function.
	(ix86_compute_frame_layout): Modify re-alignment calculations, disable
	m->call_ms2sysv when appropriate and compute frame layout for
	out-of-line stubs.
	(sp_valid_at, fp_valid_at): New inline functions.
	(choose_basereg): New function.
	(choose_baseaddr): Add align parameter, use choose_basereg and modify
	all callers.
	(ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
	Use align parameter of choose_baseaddr to generated aligned SSE movs
	when possible.
	(pro_epilogue_adjust_stack): Modify to track
	machine_frame_state::sp_realigned.
	(ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
	(ix86_nsaved_sseregs): Likewise.
	(ix86_emit_save_regs): Likewise.
	(ix86_emit_save_regs_using_mov): Likewise.
	(ix86_emit_save_sse_regs_using_mov): Likewise.
	(get_scratch_register_on_entry): Likewise.
	(gen_frame_set): New function.
	(gen_frame_load): Likewise.
	(gen_frame_store): Likewise.
	(emit_outlined_ms2sysv_save): Likewise.
	(emit_outlined_ms2sysv_restore): Likewise.
	(ix86_expand_prologue): Modify stack re-alignment code and call
	emit_outlined_ms2sysv_save when appropriate.
	(ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
	parameter rtx_insn *insn, which allows the function to be used to only
	generate the notes.
	(ix86_expand_epilogue): Modify validity checks of frame and stack
	pointers, and call emit_outlined_ms2sysv_restore when appropriate.
	(ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
	* config/i386/predicates.md
	(save_multiple): New predicate.
	(restore_multiple): Likewise.
	* config/i386/sse.md
	(save_multiple<mode>): New pattern.
	(save_multiple_realign<mode>): Likewise.
	(restore_multiple<mode>): Likewise.
	(restore_multiple_and_return<mode>): Likewise.
	(restore_multiple_leave_return<mode>): Likewise.
	* Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp

gcc/testsuite/ChangeLog:

	* gcc.target/x86_64/abi/ms-sysv/do-test.S: New file.
	* gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise.
	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise.
	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp: Likewise.

libgcc/ChangeLog:

	* config.host: Add i386/t-msabi to i386/t-linux file list.
	* config/i386/i386-asm.h: New file.
	* config/i386/resms64.S: New file.
	* config/i386/resms64f.S: New file.
	* config/i386/resms64fx.S: New file.
	* config/i386/resms64x.S: New file.
	* config/i386/savms64.S: New file.
	* config/i386/savms64f.S: New file.
	* config/i386/t-msabi: New file.

From-SVN: r248029
2017-05-14 12:22:08 +02:00
..
32 Update copyright years. 2017-01-01 13:07:43 +01:00
64
cpuinfo.c builtin_target.c (check_features): Check all supported __builtin_cpu_supports options. 2017-01-12 18:30:03 +01:00
cpuinfo.h Enable AVX-512 VPOPCNTD/VPOPCNTQ instructions. 2017-01-10 12:55:41 +00:00
crtfastmath.c Update copyright years. 2017-01-01 13:07:43 +01:00
crti.S Update copyright years. 2017-01-01 13:07:43 +01:00
crtn.S Update copyright years. 2017-01-01 13:07:43 +01:00
crtprec.c Update copyright years. 2017-01-01 13:07:43 +01:00
cygming-crtbegin.c * config/i386/cygming-crtbegin.c (LIBGCJ_SONAME): No longer #define. 2017-01-21 08:52:32 +00:00
cygming-crtend.c Update copyright years. 2017-01-01 13:07:43 +01:00
cygwin.S Update copyright years. 2017-01-01 13:07:43 +01:00
darwin-lib.h Update copyright years. 2017-01-01 13:07:43 +01:00
dragonfly-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00
elf-lib.h Update copyright years. 2017-01-01 13:07:43 +01:00
enable-execute-stack-mingw32.c Update copyright years. 2017-01-01 13:07:43 +01:00
freebsd-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00
gthr-win32.c Update copyright years. 2017-01-01 13:07:43 +01:00
gthr-win32.h gthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro clash... 2017-03-02 11:03:23 +00:00
i386-asm.h i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
libgcc-bsd.ver Update copyright years. 2017-01-01 13:07:43 +01:00
libgcc-cygming.ver Update copyright years. 2017-01-01 13:07:43 +01:00
libgcc-darwin.10.4.ver Update copyright years. 2017-01-01 13:07:43 +01:00
libgcc-darwin.10.5.ver Update copyright years. 2017-01-01 13:07:43 +01:00
libgcc-glibc.ver Update copyright years. 2017-01-01 13:07:43 +01:00
libgcc-sol2.ver Update copyright years. 2017-01-01 13:07:43 +01:00
linux-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00
morestack.S Update copyright years. 2017-01-01 13:07:43 +01:00
resms64.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
resms64f.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
resms64fx.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
resms64x.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
savms64.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
savms64f.S i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
sfp-exceptions.c Update copyright years. 2017-01-01 13:07:43 +01:00
sfp-machine.h
sol2-c1.S Update copyright years. 2017-01-01 13:07:43 +01:00
sol2-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00
t-chkstk
t-cpuinfo
t-cpuinfo-static
t-crtpc
t-crtstuff
t-cygming
t-cygwin
t-darwin
t-dlldir
t-dlldir-x
t-dragonfly
t-dw2-eh
t-freebsd
t-gthr-win32
t-linux
t-mingw32
t-mingw-pthread
t-msabi i386.opt: Add option -mcall-ms2sysv-xlogues. 2017-05-14 12:22:08 +02:00
t-nto
t-seh-eh
t-sjlj-eh
t-slibgcc-cygming
t-softfp
t-sol2
t-stack-i386
value-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00
w32-unwind.h Update copyright years. 2017-01-01 13:07:43 +01:00