]> sourceware.org Git - glibc.git/commitdiff
SH: Optimize assembler code in context of call to __fortify_fail.
authorThomas Schwinge <thomas@codesourcery.com>
Sat, 23 Jun 2012 10:07:04 +0000 (12:07 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Sat, 23 Jun 2012 10:07:04 +0000 (12:07 +0200)
__fortify_fail has »__attribute__ ((__noreturn__))«.

ChangeLog
sysdeps/sh/____longjmp_chk.S
sysdeps/unix/sysv/linux/sh/____longjmp_chk.S

index 0653538cc1fe14d260cb06535b226a0d6c379280..649b656da136434ffa43120423dc7d35c416e73c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
 
+       * sysdeps/sh/____longjmp_chk.S (CALL_FAIL): Don't plan for the call to
+       __fortify_fail returning.
+       * sysdeps/unix/sysv/linux/sh/____longjmp_chk.S (CALL_FAIL): Likewise.
+
        * sysdeps/unix/sysv/linux/sh/____longjmp_chk.S: New file, based on
        sysdeps/sh/____longjmp_chk.S.
        * sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym: New file, based
index 5d17f3ae7a9d6d54c7ed1e3995c4b84d889f5ab0..e8d5f687e10549eafabf78d021ee45dc752d471a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,31 +33,27 @@ longjmp_msg:
        add     r0, r12;                                \
        bsrf    r1;                                     \
         add    r12, r4;                                \
+       /* Unreachable.  */                             \
 .Lfail0:                                               \
-       bra     0f;                                     \
-        nop;                                           \
        .align  2;                                      \
 .Lgot:                                                 \
        .long   _GLOBAL_OFFSET_TABLE_;                  \
 .Lstr:                                                 \
        .long   longjmp_msg@GOTOFF;                     \
 .Lfail:                                                        \
-       .long   __GI___fortify_fail@PLT-(.Lfail0-.);    \
-0:
+       .long   __GI___fortify_fail@PLT-(.Lfail0-.);
 #else
 # define CALL_FAIL \
        mov.l   .Lfail, r1;                             \
        mov.l   .Lstr, r4;                              \
        jsr     @r1;                                    \
         nop;                                           \
-       bra     0f;                                     \
-        nop;                                           \
+       /* Unreachable.  */                             \
        .align  2;                                      \
 .Lstr:                                                 \
        .long   longjmp_msg;                            \
 .Lfail:                                                        \
-       .long   __fortify_fail;                         \
-0:
+       .long   __fortify_fail;
 #endif
 
 #define CHECK_SP(reg) \
index d034afcf24f444d872c23ddb93667ac3354d0917..bcf828bc032465e191fa28115bf8b4c31f9a3b44 100644 (file)
@@ -38,30 +38,26 @@ longjmp_msg:
        bsrf    r1;                                     \
         add    r12, r4;                                \
 .Lfail0:                                               \
-       bra     0f;                                     \
-        nop;                                           \
+       /* Unreachable.  */                             \
        .align  2;                                      \
 .Lgot:                                                 \
        .long   _GLOBAL_OFFSET_TABLE_;                  \
 .Lstr:                                                 \
        .long   longjmp_msg@GOTOFF;                     \
 .Lfail:                                                        \
-       .long   __GI___fortify_fail@PLT-(.Lfail0-.);    \
-0:
+       .long   __GI___fortify_fail@PLT-(.Lfail0-.);
 #else
 # define CALL_FAIL \
        mov.l   .Lfail, r1;                             \
        mov.l   .Lstr, r4;                              \
        jsr     @r1;                                    \
         nop;                                           \
-       bra     0f;                                     \
-        nop;                                           \
+       /* Unreachable.  */                             \
        .align  2;                                      \
 .Lstr:                                                 \
        .long   longjmp_msg;                            \
 .Lfail:                                                        \
-       .long   __fortify_fail;                         \
-0:
+       .long   __fortify_fail;
 #endif
 
 #define CHECK_SP(reg) \
This page took 0.119851 seconds and 5 git commands to generate.