diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 11 | ||||
-rw-r--r-- | libgcc/config/i386/crtfastmath.c | 22 | ||||
-rw-r--r-- | libgcc/config/i386/sol2-unwind.h | 22 | ||||
-rw-r--r-- | libgcc/config/sparc/sol2-unwind.h | 162 |
4 files changed, 70 insertions, 147 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index edac501b01c..d128b08a8ad 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * 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. + 2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * config.host: Append t-floattodi to tmake_file depending on diff --git a/libgcc/config/i386/crtfastmath.c b/libgcc/config/i386/crtfastmath.c index ad359d418fd..24a08843286 100644 --- a/libgcc/config/i386/crtfastmath.c +++ b/libgcc/config/i386/crtfastmath.c @@ -70,28 +70,6 @@ set_fast_math (void) { unsigned int mxcsr; -#if defined __sun__ && defined __svr4__ - /* Solaris 2 before Solaris 9 4/04 cannot execute SSE instructions even - if the CPU supports them. Programs receive SIGILL instead, so check - for that at runtime. */ - struct sigaction act, oact; - - act.sa_handler = sigill_hdlr; - sigemptyset (&act.sa_mask); - /* Need to set SA_SIGINFO so a ucontext_t * is passed to the handler. */ - act.sa_flags = SA_SIGINFO; - sigaction (SIGILL, &act, &oact); - - /* We need a single SSE instruction here so the handler can safely skip - over it. */ - __asm__ volatile ("movaps %xmm0,%xmm0"); - - sigaction (SIGILL, &oact, NULL); - - if (sigill_caught) - return; -#endif /* __sun__ && __svr4__ */ - if (edx & bit_FXSAVE) { /* Check if DAZ is available. */ diff --git a/libgcc/config/i386/sol2-unwind.h b/libgcc/config/i386/sol2-unwind.h index e5de56370d8..1a1770cc822 100644 --- a/libgcc/config/i386/sol2-unwind.h +++ b/libgcc/config/i386/sol2-unwind.h @@ -144,26 +144,8 @@ x86_fallback_frame_state (struct _Unwind_Context *context, mcontext_t *mctx; long new_cfa; - if (/* Solaris 9 - single-threaded - ---------------------------- - <sigacthandler+16>: mov 0x244(%ebx),%ecx - <sigacthandler+22>: mov 0x8(%ebp),%eax - <sigacthandler+25>: mov (%ecx,%eax,4),%ecx - <sigacthandler+28>: pushl 0x10(%ebp) - <sigacthandler+31>: pushl 0xc(%ebp) - <sigacthandler+34>: push %eax - <sigacthandler+35>: call *%ecx - <sigacthandler+37>: add $0xc,%esp <--- PC - <sigacthandler+40>: pushl 0x10(%ebp) */ - (*(unsigned long *)(pc - 21) == 0x2448b8b - && *(unsigned long *)(pc - 17) == 0x458b0000 - && *(unsigned long *)(pc - 13) == 0x810c8b08 - && *(unsigned long *)(pc - 9) == 0xff1075ff - && *(unsigned long *)(pc - 5) == 0xff500c75 - && *(unsigned long *)(pc - 1) == 0xcc483d1) - - || /* Solaris 9 - multi-threaded, Solaris 10 - --------------------------------------- + if (/* Solaris 10 + ----------- <__sighndlr+0>: push %ebp <__sighndlr+1>: mov %esp,%ebp <__sighndlr+3>: pushl 0x10(%ebp) diff --git a/libgcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h index 37807f9a994..f0ececa3c96 100644 --- a/libgcc/config/sparc/sol2-unwind.h +++ b/libgcc/config/sparc/sol2-unwind.h @@ -36,44 +36,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see static int sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { - if (/* Solaris 9 - single-threaded - ---------------------------- - The pattern changes slightly in different versions of the - operating system, so we skip the comparison against pc[-6] for - Solaris 9. - - <sigacthandler+24>: sra %i0, 0, %l1 - - Solaris 9 5/02: - <sigacthandler+28>: ldx [ %o2 + 0xf68 ], %g5 - Solaris 9 9/05: - <sigacthandler+28>: ldx [ %o2 + 0xe50 ], %g5 - - <sigacthandler+32>: sllx %l1, 3, %g4 - <sigacthandler+36>: mov %l1, %o0 - <sigacthandler+40>: ldx [ %g4 + %g5 ], %l0 - <sigacthandler+44>: call %l0 - <sigacthandler+48>: mov %i2, %o2 - <sigacthandler+52>: cmp %l1, 8 <--- PC */ - ( pc[-7] == 0xa33e2000 - /* skip pc[-6] */ - && pc[-5] == 0x892c7003 - && pc[-4] == 0x90100011 - && pc[-3] == 0xe0590005 - && pc[-2] == 0x9fc40000 - && pc[-1] == 0x9410001a - && pc[ 0] == 0x80a46008)) - { - /* We need to move up one frame: - - <signal handler> <-- context->cfa - sigacthandler - <kernel> - */ - *nframes = 1; - return 1; - } - if (/* Solaris 8+ - multi-threaded ---------------------------- <__sighndlr>: save %sp, -176, %sp @@ -101,19 +63,35 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) = *(unsigned int *)(*(unsigned long *)(cfa + 15*8) - 4); if (cuh_pattern == 0x92100019) - /* This matches the call_user_handler pattern for Solaris 11. - This is the same setup as for Solaris 9, see below. */ + /* This matches the call_user_handler pattern in Solaris 11 + libc.so.1: + + <call_user_handler+864>: mov %i1, %o1 + <call_user_handler+868>: call __sighndlr + + This is the same setup as for Solaris 10, see below. */ *nframes = 3; else if (cuh_pattern == 0xd25fa7ef) { - /* This matches the call_user_handler pattern for Solaris 10. + /* This matches the call_user_handler pattern in Solaris 10 + libc.so.1: + + <call_user_handler+988>: ldx [ %fp + 0x7ef ], %o1 + <call_user_handler+992>: call __sighndlr + There are 2 cases so we look for the return address of the caller's caller frame in order to do more pattern matching. */ unsigned long sah_address = *(unsigned long *)(cfa + 176 + 15*8); if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019) - /* This is the same setup as for Solaris 9, see below. */ + /* We need to move up three frames: + + <signal handler> <-- context->cfa + __sighndlr + call_user_handler + sigacthandler + <kernel> */ *nframes = 3; else /* The sigacthandler frame isn't present in the chain. @@ -121,22 +99,19 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) <signal handler> <-- context->cfa __sighndlr - call_user_handler frame - <kernel> - */ + call_user_handler + <kernel> */ *nframes = 2; } - else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x94100013) - /* This matches the call_user_handler pattern for Solaris 9. - We need to move up three frames: + else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b) + /* This matches the call_user_handler pattern in Solaris 9 + libthread.so.1: - <signal handler> <-- context->cfa - __sighndlr - call_user_handler - sigacthandler - <kernel> - */ + <call_user_handler+600>: mov %i2, %o2 + <call_user_handler+604>: call __sighndlr + + This is the same setup as for Solaris 10, see above. */ *nframes = 3; return 1; @@ -178,42 +153,6 @@ sparc64_frob_update_context (struct _Unwind_Context *context, static int sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { - if (/* Solaris 9 - single-threaded - ---------------------------- - The pattern changes slightly in different versions of the operating - system, so we skip the comparison against pc[-6]. - - <sigacthandler+16>: add %o1, %o7, %o3 - <sigacthandler+20>: mov %i1, %o1 - - <sigacthandler+24>: ld [ %o3 + <offset> ], %o2 - - <sigacthandler+28>: sll %i0, 2, %o0 - <sigacthandler+32>: ld [ %o0 + %o2 ], %l0 - <sigacthandler+36>: mov %i0, %o0 - <sigacthandler+40>: call %l0 - <sigacthandler+44>: mov %i2, %o2 - <sigacthandler+48>: cmp %i0, 8 <--- PC */ - pc[-8] == 0x9602400f - && pc[-7] == 0x92100019 - /* skip pc[-6] */ - && pc[-5] == 0x912e2002 - && pc[-4] == 0xe002000a - && pc[-3] == 0x90100018 - && pc[-2] == 0x9fc40000 - && pc[-1] == 0x9410001a - && pc[ 0] == 0x80a62008) - { - /* We need to move up one frame: - - <signal handler> <-- context->cfa - sigacthandler - <kernel> - */ - *nframes = 1; - return 1; - } - if(/* Solaris 8+ - multi-threaded ---------------------------- <__sighndlr>: save %sp, -96, %sp @@ -241,19 +180,35 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) = *(unsigned int *)(*(unsigned int *)(cfa + 15*4) - 4); if (cuh_pattern == 0x92100019) - /* This matches the call_user_handler pattern for Solaris 11. - This is the same setup as for Solaris 9, see below. */ + /* This matches the call_user_handler pattern in Solaris 11 + libc.so.1: + + <call_user_handler+876>: mov %i1, %o1 + <call_user_handler+880>: call __sighndlr + + This is the same setup as for Solaris 10, see below. */ *nframes = 3; else if (cuh_pattern == 0xd407a04c) { - /* This matches the call_user_handler pattern for Solaris 10. + /* This matches the call_user_handler pattern in Solaris 10 + libc.so.1: + + <call_user_handler+948>: ld [ %fp + 0x4c ], %o2 + <call_user_handler+952>: call __sighndlr + There are 2 cases so we look for the return address of the caller's caller frame in order to do more pattern matching. */ unsigned int sah_address = *(unsigned int *)(cfa + 96 + 15*4); if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019) - /* This is the same setup as for Solaris 9, see below. */ + /* We need to move up three frames: + + <signal handler> <-- context->cfa + __sighndlr + call_user_handler + sigacthandler + <kernel> */ *nframes = 3; else /* The sigacthandler frame isn't present in the chain. @@ -261,22 +216,19 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) <signal handler> <-- context->cfa __sighndlr - call_user_handler frame - <kernel> - */ + call_user_handler + <kernel> */ *nframes = 2; } else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b) - /* This matches the call_user_handler pattern for Solaris 9. - We need to move up three frames: + /* This matches the call_user_handler pattern in Solaris 9 + libthread.so.1: - <signal handler> <-- context->cfa - __sighndlr - call_user_handler - sigacthandler - <kernel> - */ + <call_user_handler+560>: mov %i2, %o2 + <call_user_handler+564>: call __sighndlr + + This is the same setup as for Solaris 10, see above. */ *nframes = 3; return 1; |