aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/sparc/sol2-unwind.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Update copyright years.Jakub Jelinek1-1/+1
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-10-06libgcc: Decrease size of _Unwind_FrameState and even more size of cleared ↵Jakub Jelinek1-6/+6
area in uw_frame_state_for The following patch implements something that has Florian found as low hanging fruit in our unwinder and has been discussed in the https://gcc.gnu.org/wiki/cauldron2022#cauldron2022talks.inprocess_unwinding_bof talk. _Unwind_FrameState type seems to be (unlike the pre-GCC 3 frame_state which has been part of ABI) private to unwind-dw2.c + unwind.inc it includes, it is always defined on the stack of some entrypoints, initialized by static uw_frame_state_for and the address of it is also passed to other static functions or the static inlines handling machine dependent unwinding, but it isn't fortunately passed to any callbacks or public functions, so I think we can safely change it any time we want. Florian mentioned that the structure is large even on x86_64, 384 bytes there, starts with 328 bytes long element with frame_state_reg_info type which then starts with an array with __LIBGCC_DWARF_FRAME_REGISTERS__ + 1 elements, each of them is 16 bytes long, on x86_64 __LIBGCC_DWARF_FRAME_REGISTERS__ is just 17 but even that is big, on say riscv __LIBGCC_DWARF_FRAME_REGISTERS__ is I think 128, on powerpc 111, on sh 153 etc. And, we memset to zero the whole fs variable with the _Unwind_FrameState type at the start of the unwinding. The reason why each element is 16 byte (on 64-bit arches) is that it contains some pointer or pointer sized integer and then an enum (with just 7 different enumerators) + padding. The following patch decreases it by moving the enum into a separate array and using just one byte for each register in that second array. We could compress it even more, say 4 bits per register, but I don't want to uglify the code for it too much and make the accesses slower. Furthermore, the clearing of the object can clear only thos how array and members after it, because REG_UNSAVED enumerator (0) doesn't actually need any pointer or pointer sized integer, it is just the other kinds that need to have there something. By doing this, on x86_64 the above numbers change to _Unwind_FrameState type being now 264 bytes long, frame_state_reg_info 208 bytes and we don't clear the first 144 bytes of the object, so the memset is 120 bytes, so ~ 31% of the old clearing size. On riscv 64-bit assuming it has same structure layout rules for the few types used there that would be ~ 2160 bytes of _Unwind_FrameState type before and ~ 1264 bytes after, with the memset previously ~ 2160 bytes and after ~ 232 bytes after. We've also talked about possibly adding a number of initially initialized regs and initializing the rest lazily, but at least for x86_64 with 18 elements in the array that doesn't seem to be worth it anymore, especially because return address column is 16 there and that is usually the first thing to be touched. It might theory help with lots of registers if they are usually untouched, but would uglify and complicate any stores to how by having to check there for the not initialized yet cases and lazy initialization, and similarly for all reads of how to do there if below last initialized one, use how, otherwise imply REG_UNSAVED. The disadvantage of the patch is that touching reg[x].loc and how[x] now means 2 cachelines rather than one as before, and I admit beyond bootstrap/regtest I haven't benchmarked it in any way. 2022-10-06 Jakub Jelinek <jakub@redhat.com> * unwind-dw2.h (REG_UNSAVED, REG_SAVED_OFFSET, REG_SAVED_REG, REG_SAVED_EXP, REG_SAVED_VAL_OFFSET, REG_SAVED_VAL_EXP, REG_UNDEFINED): New anonymous enum, moved from inside of struct frame_state_reg_info. (struct frame_state_reg_info): Remove reg[].how element and the anonymous enum there. Add how element. * unwind-dw2.c: Include stddef.h. (uw_frame_state_for): Don't clear first offsetof (_Unwind_FrameState, regs.how[0]) bytes of *fs. (execute_cfa_program, __frame_state_for, uw_update_context_1, uw_update_context): Use fs->regs.how[X] instead of fs->regs.reg[X].how or fs.regs.how[X] instead of fs.regs.reg[X].how. * config/sh/linux-unwind.h (sh_fallback_frame_state): Likewise. * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise. * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise. * config/pa/hpux-unwind.h (UPDATE_FS_FOR_SAR, UPDATE_FS_FOR_GR, UPDATE_FS_FOR_FR, UPDATE_FS_FOR_PC, pa_fallback_frame_state): Likewise. * config/alpha/vms-unwind.h (alpha_vms_fallback_frame_state): Likewise. * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Likewise. * config/arc/linux-unwind.h (arc_fallback_frame_state, arc_frob_update_context): Likewise. * config/riscv/linux-unwind.h (riscv_fallback_frame_state): Likewise. * config/nios2/linux-unwind.h (NIOS2_REG): Likewise. * config/nds32/linux-unwind.h (NDS32_PUT_FS_REG): Likewise. * config/s390/tpf-unwind.h (s390_fallback_frame_state): Likewise. * config/s390/linux-unwind.h (s390_fallback_frame_state): Likewise. * config/sparc/sol2-unwind.h (sparc64_frob_update_context, MD_FALLBACK_FRAME_STATE_FOR): Likewise. * config/sparc/linux-unwind.h (sparc64_fallback_frame_state, sparc64_frob_update_context, sparc_fallback_frame_state): Likewise. * config/i386/sol2-unwind.h (x86_64_fallback_frame_state, x86_fallback_frame_state): Likewise. * config/i386/w32-unwind.h (i386_w32_fallback_frame_state): Likewise. * config/i386/linux-unwind.h (x86_64_fallback_frame_state, x86_fallback_frame_state): Likewise. * config/i386/freebsd-unwind.h (x86_64_freebsd_fallback_frame_state): Likewise. * config/i386/dragonfly-unwind.h (x86_64_dragonfly_fallback_frame_state): Likewise. * config/i386/gnu-unwind.h (x86_gnu_fallback_frame_state): Likewise. * config/csky/linux-unwind.h (csky_fallback_frame_state): Likewise. * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state): Likewise. * config/aarch64/freebsd-unwind.h (aarch64_freebsd_fallback_frame_state): Likewise. * config/aarch64/aarch64-unwind.h (aarch64_frob_update_context): Likewise. * config/or1k/linux-unwind.h (or1k_fallback_frame_state): Likewise. * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise. * config/loongarch/linux-unwind.h (loongarch_fallback_frame_state): Likewise. * config/m68k/linux-unwind.h (m68k_fallback_frame_state): Likewise. * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise. * config/rs6000/darwin-fallback.c (set_offset): Likewise. * config/rs6000/aix-unwind.h (MD_FROB_UPDATE_CONTEXT): Likewise. * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Likewise. * config/rs6000/freebsd-unwind.h (frob_update_context): Likewise.
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-05-28Remove pre-Solaris 11/SPARC unwinding supportRainer Orth1-90/+2
* config/sparc/sol2-unwind.h [__arch64__] (sparc64_is_sighandler): Remove Solaris 9 and 10 support. (sparc_is_sighandler): Likewise. From-SVN: r271715
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-09-05Use -fbuilding-libgcc for more target macros used in libgcc.Joseph Myers1-1/+1
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-04-22Remove obsolete Solaris 9 supportRainer Orth1-105/+57
libstdc++-v3: * configure.host: Remove solaris2.9 handling. Change os_include_dir to os/solaris/solaris2.10. * acinclude.m4 (ac_has_gthreads): Remove solaris2.9* handling. * crossconfig.m4: Remove *-solaris2.9 handling, simplify. * configure: Regenerate. * config/abi/post/solaris2.9: Remove. * config/os/solaris/solaris2.9: Rename to ... * config/os/solaris/solaris2.10: ... this. * config/os/solaris/solaris2.10/os_defines.h (CLOCK_MONOTONIC): Remove. * doc/xml/manual/configure.xml (--enable-libstdcxx-threads): Remove Solaris 9 reference. * doc/html/manual/configure.html: Regenerate. * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc: Remove *-*-solaris2.9 xfail. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc: Likewise. * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.9 xfail. libjava: * configure.ac (THREADLIBS, THREADSPEC): Remove *-*-solaris2.9 handling. * configure: Regenerate. libgfortran: * config/fpu-387.h [__sun__ && __svr4__]: Remove SSE execution check. libgcc: * config/i386/crtfastmath.c (set_fast_math): Remove SSE execution check. * config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove Solaris 9 single-threaded support. * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove Solaris 9 single-threaded support. Add call_user_handler code sequences. (sparc_is_sighandler): Likewise. libcpp: * lex.c: Remove Solaris 9 reference. gcc/testsuite: * gcc.c-torture/compile/pr28865.c: Remove dg-xfail-if. * gcc.dg/c99-stdint-6.c: Remove dg-options for *-*-solaris2.9. * gcc.dg/lto/20090210_0.c: Remove dg-extra-ld-options for *-*-solaris2.9. * gcc.dg/torture/pr47917.c: Remove dg-options for *-*-solaris2.9. * gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.9 handling from dg-options. * gcc.target/i386/pr22152.c: Remove i?86-*-solaris2.9 handling from dg-additional-options. * gcc.target/i386/vect8-ret.c: Remove i?86-*-solaris2.9 handling from dg-options. * gcc.dg/vect/tree-vect.h (check_vect): Remove Solaris 9 SSE2 execution check. * gcc.target/i386/sse-os-support.h [__sun__ && __svr4__] (sigill_hdlr): Remove. (sse_os_support) [__sun__ && __svr4__]: Remove SSE execution check. * gfortran.dg/erf_3.F90: Remove sparc*-*-solaris2.9* handling. * gfortran.dg/fmt_en.f90: Remove i?86-*-solaris2.9* handling. * gfortran.dg/round_4.f90: Remove *-*-solaris2.9* handling. * lib/target-supports.exp (add_options_for_tls): Remove *-*-solaris2.9* handling. gcc: * config.gcc (enable_obsolete): Remove *-*-solaris2.9*. (*-*-solaris2.[0-9] | *-*-solaris2.[0-9].*): Mark unsupported. (*-*-solaris2*): Simplify. (i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*): Likewise. (i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*): Remove *-*-solaris2.9* handling. * configure.ac (gcc_cv_as_hidden): Remove test for Solaris 9/x86 as bug. (gcc_cv_ld_hidden): Remove *-*-solaris2.9* handling. (ld_tls_support): Remove i?86-*-solaris2.9, sparc*-*-solaris2.9 handling, simplify. (gcc_cv_as_gstabs_flag): Remove workaround for Solaris 9/x86 as bug. * configure: Regenerate. * config/i386/sol2-9.h: Remove. * doc/install.texi (Specific, i?86-*-solaris2.9): Remove. (Specific, *-*-solaris2*): Mention Solaris 9 support removal. Remove Solaris 9 references. fixincludes: * inclhack.def (math_exception): Bypass on *-*-solaris2.1[0-9]*. (solaris_int_types): Remove. (solaris_longjmp_noreturn): Remove. (solaris_mutex_init_2): Remove. (solaris_once_init_2): Remove. (solaris_sys_va_list): Remove. * fixincl.x: Regenerate. * tests/base/iso/setjmp_iso.h: Remove. * tests/base/pthread.h [SOLARIS_MUTEX_INIT_2_CHECK]: Remove. [SOLARIS_ONCE_INIT_1_CHECK]: Remove wrapping done by solaris_once_init_2. [SOLARIS_ONCE_INIT_2_CHECK]: Remove. * tests/base/sys/int_types.h: Remove. * tests/base/sys/va_list.h: Remove. contrib: * config-list.mk (LIST): Remove sparc-sun-solaris2.9, i686-solaris2.9. From-SVN: r209621
2014-01-02Update copyright years in libgcc/Richard Sandiford1-1/+1
From-SVN: r206295
2013-05-28sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for ↵Eric Botcazou1-1/+6
SIGFPE raised for IEEE-754 exceptions. * config/sparc/sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for SIGFPE raised for IEEE-754 exceptions. * config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise. From-SVN: r199381
2013-05-22sol2-unwind.h (sparc64_frob_update_context): Do it for signal frames as well.Eric Botcazou1-15/+9
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Do it for signal frames as well. (MD_FALLBACK_FRAME_STATE_FOR): Do minor cleanups throughout and add the STACK_BIAS to the CFA offset. From-SVN: r199191
2013-02-04Update copyright in libgcc.Richard Sandiford1-1/+1
From-SVN: r195731
2012-03-14Remove obsolete Solaris 8 supportRainer Orth1-93/+19
libstdc++-v3: * config/os/solaris/solaris2.8: Rename to ... * config/os/solaris/solaris2.9: ... this. * config/abi/post/solaris2.8: Rename to ... * config/abi/post/solaris2.9: ... this. * configure.host (os_include_dir): Remove solaris2.8. Reflect renaming. (abi_baseline_pair): Remove *-*-solaris2.8. Reflect renaming. * configure.ac (GLIBCXX_CHECK_MATH_PROTO): Remove (GLIBCXX_CHECK_STDLIB_PROTO): Remove. * acinclude.m4 (GLIBCXX_CHECK_MATH_PROTO): Remove (GLIBCXX_CHECK_STDLIB_PROTO): Remove. (GLIBCXX_CHECK_GTHREADS): Remove Solaris 8 handling. * crossconfig.m4 (GLIBCXX_CROSSCONFIG): Remove *-solaris2.8 handling. * configure: Regenerate. * config.h.in: Regenerate. * config/os/solaris/solaris2.9/os_defines.h (__CORRECT_ISO_CPP_MATH_H_PROTO): Define. (__CORRECT_ISO_CPP_STDLIB_H_PROTO): Define. * include/c_global/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1 to __CORRECT_ISO_CPP_MATH_H_PROTO. [!__CORRECT_ISO_CPP_MATH_H_PROTO2]: Remove. * include/tr1/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1 to __CORRECT_ISO_CPP_MATH_H_PROTO. * doc/xml/manual/configure.xml (Configure, --enable-libstdcxx-threads): Remove Solaris 8 reference. * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc: Don't xfail on *-*-solaris2.8. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc: Likewise. * testsuite/ext/enc_filebuf/char/13598.cc: Don't xfail on *-*-solaris2.8. libjava: * configure.ac (THREADLIBS): Remove *-*-solaris2.8 handling. * configure: Regenerate. libgcc: * config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove Solaris 8 handling. * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove Solaris 8 handling. (sparc_is_sighandler): Likewise. libcpp: * lex.c: Remove Solaris 8 reference. gcc/testsuite: * g++.dg/warn/miss-format-1.C: Remove *-*-solaris2.8 handling. * gcc.dg/c99-stdint-6.c: Likewise. * gcc.dg/lto/20090210_0.c: Likewise. * gcc.dg/pr28796-2.c: Don't skip on sparc*-sun-solaris2.8. * gcc.dg/pragma-init-fini.c: Don't skip on i?86-*-solaris2.8. * gcc.dg/pragma-init-fini-2.c: Likewise. * gcc.dg/torture/pr47917.c: Remove *-*-solaris2.8 handling. * gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.8 handling. * gcc.target/i386/pr22152.c: Likewise. * gcc.target/i386/vect8-ret.c: Likewise. * lib/target-supports.exp (add_options_for_tls): Remove Solaris 8 handling. gcc: * config.gcc (enable_obsolete): Remove *-*-solaris2.8*. (*-*-solaris2.[0-8], *-*-solaris2.[0-8].*): Mark unsupported. (i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Remove Solaris 8 support. * configure.ac (gcc_cv_ld_hidden): Remove *-*-solaris2.8*. (ld_tls_support): Remove Solaris 8 references. (lwp_dir, lwp_spec): Remove support for alternate thread library. * acinclude.m4 (gcc_cv_initfini_array): Remove *-*-solaris2.* tests. * configure: Regenerate. * config.in: Regenerate. * config/sol2.h (LINK_SPEC): Remove LIB_THREAD_LDFLAGS_SPEC. * config/i386/sol2.h: Remove Solaris 8 references. * doc/install.texi (Specific, i?86-*-solaris2.[89]): Rename to ... (i?86-*-solaris2.9): ... this. Remove Solaris 8 references. (Specific, *-*-solaris2*): Document Solaris 8 removal. Remove Solaris 8 references. fixincludes: * inclhack.def (math_exception): Remove duplicate. (solaris_cond_init): Remove. (solaris_sys_va_list): Remove Solaris 8 support. * fixincl.x: Regenerate. * tests/base/pthread.h [SOLARIS_COND_INIT_CHECK]: Remove. From-SVN: r185392
2012-02-15re PR target/51921 (EH unwinding support is broken)Eric Botcazou1-4/+20
PR target/51921 PR target/52205 * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Add support for Solaris 11 and slightly reformat. (sparc_is_sighandler): Likewise. From-SVN: r184255
2012-01-09sol2-unwind.h (sparc64_is_sighandler): Check that the purported ↵Eric Botcazou1-6/+4
sigacthandler address isn't null before dereferencing it. * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the purported sigacthandler address isn't null before dereferencing it. (sparc_is_sighandler): Likewise. From-SVN: r183020
2012-01-09re PR ada/41929 (64-bit null_pointer_deref1 gnat.dg test consumes all ↵Eric Botcazou1-41/+88
available memory) PR ada/41929 * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove SAVPC and add CFA. Revert back to old code for Solaris 8+ multi-threaded. (sparc_is_sighandler): Likewise. (MD_FALLBACK_FRAME_STATE_FOR): Adjust call to IS_SIGHANDLER. From-SVN: r183005
2011-12-11* config/sparc/sol2-unwind.h: Use #ifdef directive consistently.Eric Botcazou1-1/+1
From-SVN: r182204
2011-06-10invoke.texi (SPARC options): Add -mflat.Eric Botcazou1-1/+10
gcc/ * doc/invoke.texi (SPARC options): Add -mflat. * config/sparc/sparc.opt: Likewise. * config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter. (sparc_flat_expand_prologue): Declare. (sparc_flat_expand_epilogue): Likewise. * config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float. (CPP_ENDIAN_SPEC): Replace with... (CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float. (CPP_SPEC): Adjust to above change. (EXTRA_SPECS): Likewise. (SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling. (INCOMING_REGNO): Likewise. (OUTGOING_REGNO): Likewise. (LOCAL_REGNO): Likewise. (SETUP_FRAME_ADDRESSES): Likewise. (FIXED_REGISTERS): Set 0 for %fp. (CALL_USED_REGISTERS): Likewise. (INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf. (EXIT_IGNORE_STACK): Define to 1 unconditionally. (RETURN_ADDR_REGNUM): Define. (RETURN_ADDR_RTX): Use it. (INCOMING_RETURN_ADDR_REGNUM): Define. (INCOMING_RETURN_ADDR_RTX): Use it. (DWARF_FRAME_RETURN_COLUMN): Likewise. (EH_RETURN_REGNUM): Define. (EH_RETURN_STACKADJ_RTX): Use it. (EH_RETURN_HANDLER_RTX): Delete. (EPILOGUE_USES): Use them and add TARGET_FLAT handling. * config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs): Delete. (struct machine_function): Add frame_size, apparent_frame_size, frame_base_reg, frame_base_offset, n_global_fp_regs and save_local_in_regs_p fields. (sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg, sparc_frame_base_offset, sparc_n_global_fp_regs, sparc_save_local_in_regs_p): New macros. (sparc_option_override): Error out if -fcall-saved-REG is specified for Out registers. (eligible_for_restore_insn): Fix formatting. (eligible_for_return_delay): Likewise. Add TARGET_FLAT handling. (eligible_for_sibcall_delay): Likewise. (RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter. (sparc_legitimate_address_p): Adjust to above change. (save_global_or_fp_reg_p): New predicate. (return_addr_reg_needed_p): Likewise. (save_local_or_in_reg_p): Likewise. (sparc_compute_frame_size): Use them. Add TARGET_FLAT handling. (SORR_SAVE, SORR_RESTORE): Delete. (sorr_pred_t): New typedef. (sorr_act_t): New enum. (save_or_restore_regs): Rename to... (emit_save_or_restore_regs): ...this. Change type of LOW and HIGH parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P, ACTION_TRUE and ACTION_FALSE parameters. Implement more general mechanism. Add CFI information for double-word saves in 32-bit mode. (emit_adjust_base_to_offset): New function extracted from... (emit_save_or_restore_regs): ...this. Rename the rest to... (emit_save_or_restore_regs_global_fp_regs): ...this. (emit_save_or_restore_regs_local_in_regs): New function. (gen_create_flat_frame_[123]): New functions. (sparc_expand_prologue): Use SIZE local variable. Adjust. (sparc_flat_expand_prologue): New function. (sparc_asm_function_prologue): Add TARGET_FLAT handling. (sparc_expand_epilogue): Use SIZE local variable. Adjust. (sparc_flat_expand_epilogue): New function. (sparc_can_use_return_insn_p): Add TARGET_FLAT handling. (output_return): Likewise. (output_sibcall): Likewise. (sparc_output_mi_thunk): Likewise. (sparc_frame_pointer_required): Likewise. (sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf function optimization. * config/sparc/sparc.md (flat): New attribute. (prologue): Add TARGET_FLAT handling. (save_register_window): Disable if TARGET_FLAT. (create_flat_frame_[123]): New patterns. (epilogue): Add TARGET_FLAT handling. (sibcall_epilogue): Likewise. (eh_return): New expander. (eh_return_internal): New insn and splitter. (return_internal): Add TARGET_FLAT handling. (untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM. (save_stack_nonlocal): Use RETURN_ADDR_REGNUM. (nonlocal_goto): Add TARGET_FLAT handling. * config/sparc/t-elf: Add -mflat multilib. * config/sparc/t-leon: Likewise. libgcc/ * config/sparc/linux-unwind.h (STACK_BIAS): Define. (sparc64_fallback_frame_state): Use it. (sparc64_frob_update_context): Further adjust context. * config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise. * config/sparc/sol2-ci.S: Add TARGET_FLAT handling. * config/sparc/sol2-cn.S: Likewise. Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr> From-SVN: r174897
2011-06-03linux.h (MD_UNWIND_SUPPORT): Remove.Rainer Orth1-0/+419
gcc: * config/alpha/linux.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/osf5.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/vms.h (MD_UNWIND_SUPPORT): Remove. * config/bfin/linux.h (MD_UNWIND_SUPPORT): Remove. * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Remove. * config/i386/linux.h (MD_UNWIND_SUPPORT): Remove. * config/i386/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/i386/sol2.h (MD_UNWIND_SUPPORT): Remove. * config/i386/mingw32.h (MD_UNWIND_SUPPORT): Remove. * config/ia64/linux.h (MD_UNWIND_SUPPORT): Remove. * config/ia64/vms.h (MD_UNWIND_SUPPORT): Remove. * config/m68k/linux.h (MD_UNWIND_SUPPORT): Remove. * config/mips/linux.h (MD_UNWIND_SUPPORT): Remove. * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): Remove. * config/pa/pa32-linux.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/linux.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/s390/linux.h (MD_UNWIND_SUPPORT): Remove. * config/s390/tpf.h (MD_UNWIND_SUPPORT): Remove. * config/sh/linux.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/linux.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Remove. * config/xtensa/linux.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/linux-unwind.h: Move to ../libgcc/config/alpha. * config/alpha/osf5-unwind.h: Move to ../libgcc/config/alpha. * config/alpha/vms-unwind.h: Move to ../libgcc/config/alpha. * config/bfin/linux-unwind.h: Move to ../libgcc/config/bfin. * config/i386/linux-unwind.h: Move to ../libgcc/config/i386. * config/i386/sol2-unwind.h: Move to ../libgcc/config/i386. * config/i386/w32-unwind.h: Move to ../libgcc/config/i386. * config/ia64/linux-unwind.h: Move to ../libgcc/config/ia64. * config/ia64/vms-unwind.h: Move to ../libgcc/config/ia64. * config/m68k/linux-unwind.h: Move to ../libgcc/config/m68k. * config/mips/linux-unwind.h: Move to ../libgcc/config/mips. * config/pa/hpux-unwind.h: Move to ../libgcc/config/pa. * config/pa/linux-unwind.h: Move to ../libgcc/config/pa. * config/rs6000/darwin-unwind.h: Move to ../libgcc/config/rs6000. * config/rs6000/linux-unwind.h: Move to ../libgcc/config/rs6000. * config/s390/linux-unwind.h: Move to ../libgcc/config/s390. * config/s390/tpf-unwind.h: Move to ../libgcc/config/s390. * config/sh/linux-unwind.h: Move to ../libgcc/config/sh. * config/sparc/linux-unwind.h: Move to ../libgcc/config/sparc. * config/sparc/sol2-unwind.h: Move to ../libgcc/config/sparc. * config/xtensa/linux-unwind.h: Move to ../libgcc/config/xtensa. * config/darwin9.h (DARWIN_LIBSYSTEM_HAS_UNWIND): Remove. * system.h (MD_UNWIND_SUPPORT): Poison. * doc/tm.texi.in (Exception Handling, MD_UNWIND_SUPPORT): Remove. * doc/tm.texi: Regenerate. * unwind-dw2.c: Include md-unwind-support.h instead of MD_UNWIND_SUPPORT. * config/ia64/unwind-ia64.c: Likewise. * config/xtensa/unwind-dw2-xtensa.c: Likewise. libgcc: * config/alpha/linux-unwind.h: Move from ../gcc/config/alpha. * config/alpha/osf5-unwind.h: Move from ../gcc/config/alpha. * config/alpha/vms-unwind.h: Move from ../gcc/config/alpha. * config/bfin/linux-unwind.h: Move from ../gcc/config/bfin. * config/i386/linux-unwind.h: Move from ../gcc/config/i386. * config/i386/sol2-unwind.h: Move from ../gcc/config/i386. * config/i386/w32-unwind.h: Move from ../gcc/config/i386. Wrap in !__MINGW64__. * config/ia64/linux-unwind.h: Move from ../gcc/config/ia64. * config/ia64/vms-unwind.h: Move from ../gcc/config/ia64. * config/m68k/linux-unwind.h: Move from ../gcc/config/m68k. * config/mips/linux-unwind.h: Move from ../gcc/config/mips. * config/pa/hpux-unwind.h: Move from ../gcc/config/pa. * config/pa/linux-unwind.h: Move from ../gcc/config/pa. * config/rs6000/darwin-unwind.h: Move from ../gcc/config/rs6000. Wrap in !__LP64__. * config/rs6000/linux-unwind.h: Move from ../gcc/config/rs6000. * config/s390/linux-unwind.h: Move from ../gcc/config/s390. * config/s390/tpf-unwind.h: Move from ../gcc/config/s390. * config/sh/linux-unwind.h: Move from ../gcc/config/sh. * config/sparc/linux-unwind.h: Move from ../gcc/config/sparc. * config/sparc/sol2-unwind.h: Move from ../gcc/config/sparc. * config/xtensa/linux-unwind.h: Move from ../gcc/config/xtensa. * config/no-unwind.h: New file. * config.host (md_unwind_header): Document. Define. (alpha*-*-linux*, alpha*-dec-osf5.1*, alpha64-dec-*vms*, alpha*-dec-*vms*, bfin*-uclinux*, bfin*-linux-uclibc*, hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*, hppa[12]*-*-hpux11*): Set md_unwind_header. (i[34567]86-*-linux*): Handle i[34567]86-*-kopensolaris*-gnu. Set md_unwind_header. (x86_64-*-linux*, i[34567]86-*-solaris2*): Set md_unwind_header. (i[34567]86-*-cygwin*): Split from i[34567]86-*-mingw*. (i[34567]86-*-mingw*, ia64*-*-linux*, ia64-hp-*vms*, m68k-*-uclinux*, m68k-*-linux*, mips64*-*-linux*, mips*-*-linux*, powerpc-*-darwin*, powerpc-*-linux*, s390-*-linux*, s390x-*-linux*, s390x-ibm-tpf*, sh*-*-linux*, sparc-*-linux*, sparc*-*-solaris2*, sparc64-*-linux*, xtensa*-*-linux*): Set md_unwind_header. * configure.ac: Link md-unwind-support.h to $md_unwind_header. * configure: Regenerate. From-SVN: r174613