From patchwork Sat May 17 19:05:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1000 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 636583601C1 for ; Sat, 17 May 2014 12:05:16 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14307373) id 1B0305759D14; Sat, 17 May 2014 12:05:15 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id D560E5750195 for ; Sat, 17 May 2014 12:05:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; q=dns; s=default; b=cg7FJV3kBsUL4Iv3z/js0i33Yex0l TcUbs9CrGYhEahzn3OscBHUyDM2dGdxfXZa6lNo5zlcg/zuEk3E7jwA+UuP0GSbw 5pV+icPTaeznZZpqlbOWo4ztlSR26kpO8gecNEKbYJoQSYXXXVAJYpR1ZCbWVpUS Eeg+/PCd0MX43Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; s=default; bh=WB221jqZDLizCLV9Ri01qyYxzPg=; b=ZG9 L8Vg07QKxkSgoHi2CJySfkRk386uFI08zrZUSWeIVuZnVzY+i+5G9Lgmv97qf2/e qaShsTVJsG0XQlE+TvJdAMClSq3MJrSV5BLHUJKFvyrUpEcui4DevF8pHucT3Rvh dMZE/+E+if8OQjqoymzeTV1aTeSlV9O+Hr/9t24w= Received: (qmail 9637 invoked by alias); 17 May 2014 19:05:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9626 invoked by uid 89); 17 May 2014 19:05:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL, BAYES_50, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f172.google.com X-Received: by 10.50.114.194 with SMTP id ji2mr5921791igb.21.1400353510603; Sat, 17 May 2014 12:05:10 -0700 (PDT) Message-ID: <5377B2E1.5050300@twiddle.net> Date: Sat, 17 May 2014 12:05:05 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: GNU C Library Subject: [COMMITTED] alpha: Create __syscall_nocancel entry points X-DH-Original-To: glibc@patchwork.siddhesh.in Moves the alpha port more in line with x86_64, as fallout from the recent not-cancel.h change. The rearrangement preserves the branch prediction, from expected-not-taken forward branch to expected-taken backward branch. r~ * sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h (PSEUDO): Create the __##syscall_name##_nocancel entry point. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S (__sigsuspend_nocancel): Remove; let the sysdep-cancel.h code create it. diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 610b583..69809bc 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -28,24 +28,32 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ - .globl name; \ + .globl __##syscall_name##_nocancel; \ + .type __##syscall_name##_nocancel, @function; \ + .usepv __##syscall_name##_nocancel, std; \ .align 4; \ - .type name, @function; \ - .usepv name, std; \ cfi_startproc; \ -__LABEL(name) \ +__LABEL(__##syscall_name##_nocancel) \ ldgp gp, 0(pv); \ PSEUDO_PROF; \ - PSEUDO_PREPARE_ARGS \ - SINGLE_THREAD_P(t0); \ - bne t0, $pseudo_cancel; \ +__LABEL($pseudo_nocancel) \ + PSEUDO_PREPARE_ARGS; \ lda v0, SYS_ify(syscall_name); \ call_pal PAL_callsys; \ bne a3, SYSCALL_ERROR_LABEL; \ __LABEL($pseudo_ret) \ .subsection 2; \ + .size __##syscall_name##_nocancel, .-__##syscall_name##_nocancel; \ + .globl name; \ + .type name, @function; \ + .usepv name, std; \ + .align 4; \ cfi_startproc; \ -__LABEL($pseudo_cancel) \ +__LABEL(name) \ + ldgp gp, 0(pv); \ + PSEUDO_PROF; \ + SINGLE_THREAD_P(t0); \ + beq t0, $pseudo_nocancel; \ subq sp, 64, sp; \ cfi_def_cfa_offset(64); \ stq ra, 0(sp); \ diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index aa5e6c6..8a6816e 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -19,19 +19,6 @@ /* sigsuspend is a special syscall since it needs to dereference the sigset. This will have to change when we have more than 64 signals. */ -#ifndef NO_CANCELLATION -#include - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); - -PSEUDO(__sigsuspend_nocancel, sigsuspend, 1) - ret -/* Use END, not PSEUDO_END, so that we don't issue two $syscall_error - symbols; we'll jump into __sigsuspend for the error case. */ -END(__sigsuspend_nocancel) -#endif /* NO_CANCELLATION */ - #include #undef PSEUDO_PREPARE_ARGS