From 1518f58b6120289e69aeba9426eca9234cd9a200 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 23 Jun 2012 12:07:04 +0200 Subject: SH: Optimize assembler code in context of call to __fortify_fail. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit __fortify_fail has »__attribute__ ((__noreturn__))«. --- sysdeps/sh/____longjmp_chk.S | 14 +++++--------- sysdeps/unix/sysv/linux/sh/____longjmp_chk.S | 12 ++++-------- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/sh/____longjmp_chk.S b/sysdeps/sh/____longjmp_chk.S index 5d17f3ae7a..e8d5f687e1 100644 --- a/sysdeps/sh/____longjmp_chk.S +++ b/sysdeps/sh/____longjmp_chk.S @@ -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) \ diff --git a/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S index d034afcf24..bcf828bc03 100644 --- a/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S @@ -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) \ -- cgit 1.4.1