From patchwork Sun May 25 19:41:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 352260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 1EAE714009E for ; Mon, 26 May 2014 05:42:33 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=E5hg08LF9YLYoZP02UKy8R47QJwA6gQ rJASZfFu7ZieKod779jhgoUuJcsqOG7CDKn4phCa6DbJTqq/xywkTT+4kG943x82 wS4FduEvO+9yGnWNRdLhKp7/NVUHKz7E1ewOe/uXhsX+ZV5kO5TG6AnHHHct9c/z K80s1Q+whp3w= 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:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=7zSw0CBU5pVyriRhfpYLWIv5oPs=; b=CucCy SwBM7wk9FuemjORIr0160GLu6NIeQxC350579aGLhw5W9DxrbWxIFR1XCxpwJUTg fV1iV9je9ZLuK4zySg3K0xjfTFjhDuJwjcV7K7RPhiH5YvvmEJqd6KRJklTfXrj+ Swqs8i1jJJ7cTusXttApOZ3ucaQAocLbG1rl5A= Received: (qmail 1659 invoked by alias); 25 May 2014 19:42:08 -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 1480 invoked by uid 89); 25 May 2014 19:42:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f177.google.com X-Received: by 10.140.88.112 with SMTP id s103mr5385294qgd.113.1401046924307; Sun, 25 May 2014 12:42:04 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH v3 2/9] aarch64: Share code in syscall-cancel.h Date: Sun, 25 May 2014 12:41:42 -0700 Message-Id: <1401046909-25821-3-git-send-email-rth@twiddle.net> In-Reply-To: <1401046909-25821-1-git-send-email-rth@twiddle.net> References: <1401046909-25821-1-git-send-email-rth@twiddle.net> From: Richard Henderson Fold nocancel and error handling paths. --- .../unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index 26d4c0e..41502de 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -27,24 +27,17 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .section ".text"; \ - .type __##syscall_name##_nocancel,%function; \ - .globl __##syscall_name##_nocancel; \ -__##syscall_name##_nocancel: \ - cfi_startproc; \ +ENTRY (__##syscall_name##_nocancel); \ +.Lpseudo_nocancel: \ DO_CALL (syscall_name, args); \ +.Lpseudo_finish: \ cmn x0, 4095; \ b.cs .Lsyscall_error; \ - PSEUDO_RET; \ - cfi_endproc; \ + .subsection 2; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ ENTRY (name); \ SINGLE_THREAD_P; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, 0); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; \ - PSEUDO_RET; \ -.Lpseudo_cancel: \ + beq .Lpseudo_nocancel; \ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ CENABLE; \ mov x16, x0; /* put mask in safe place. */ \ @@ -60,8 +53,15 @@ ENTRY (name); \ ldr x30, [sp], 16; \ cfi_adjust_cfa_offset (-16); \ cfi_restore (x30); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; + b .Lpseudo_finish; \ + cfi_endproc; \ + .size name, .-name; \ + .previous + +# undef PSEUDO_END +# define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER; \ + cfi_endproc # define DOCARGS_0 \ str x30, [sp, -16]!; \