From patchwork Mon Feb 13 22:54:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 141009 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]) by ozlabs.org (Postfix) with SMTP id AC3451007D1 for ; Tue, 14 Feb 2012 09:54:56 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329778496; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=oiTsynF ZnEoahTu6BYdyZYvWuK0=; b=Fslt+SNL6dpVlPomIelwGdawjaancg/xh+NdIga 0YcS8giISBPpPp/8WqO7+w/kJHxzg9PSQJpt7YR50NJzTc3Kif0WUH/aJozl8fxi fA9GSV55aG3jmG6oqqUvuEHQp6UplMAcovsMpKKBJO4Lthv2Qb/qJ9rZPJO4M/sq 6lcY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=K3csdDM554AtpleGJAtXK+jpzAiySg9mSpCB//QMHrY3LN8o8907jfsTDbhpbb lJy0vYM620TvLqjxFlQjDHxgDtj1RBKypCx/q4H8O0OuLYKCyvPU/1U7ni4ljo9p /u9awmdHBTF54L8EKG5mreLybm9BeNu7sksg1Nso47+UQ=; Received: (qmail 15777 invoked by alias); 13 Feb 2012 22:54:45 -0000 Received: (qmail 15762 invoked by uid 22791); 13 Feb 2012 22:54:44 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_OV, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 22:54:06 +0000 Received: by ggeq1 with SMTP id q1so2801185gge.20 for ; Mon, 13 Feb 2012 14:54:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.116.73 with SMTP id f49mr5326257yhh.97.1329173645729; Mon, 13 Feb 2012 14:54:05 -0800 (PST) Received: by 10.146.241.19 with HTTP; Mon, 13 Feb 2012 14:54:05 -0800 (PST) Date: Mon, 13 Feb 2012 23:54:05 +0100 Message-ID: Subject: [PATCH, libitm]: GTM_longjmp: Jump indirect from memory address From: Uros Bizjak To: gcc-patches@gcc.gnu.org Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello! We can jump indirect from memory address, sparing a couple of cycles. 2012-02-14 Uros Bizjak * config/x86/target.h (GTM_longjmp): Jump indirect from memory address. Tested on x86_64-pc-linux-gnu {,-m32}. OK for mainline? Uros. Index: config/x86/sjlj.S =================================================================== --- config/x86/sjlj.S (revision 184177) +++ config/x86/sjlj.S (working copy) @@ -119,23 +119,19 @@ SYM(GTM_longjmp): movq 32(%rsi), %r13 movq 40(%rsi), %r14 movq 48(%rsi), %r15 - movq 56(%rsi), %rdx movl %edi, %eax cfi_def_cfa(%rcx, 0) - cfi_register(%rip, %rdx) movq %rcx, %rsp - jmp *%rdx + jmp *56(%rsi) #else movl (%edx), %ecx movl 4(%edx), %ebx movl 8(%edx), %esi movl 12(%edx), %edi movl 16(%edx), %ebp - movl 20(%edx), %edx cfi_def_cfa(%ecx, 0) - cfi_register(%eip, %edx) movl %ecx, %esp - jmp *%edx + jmp *20(%edx) #endif cfi_endproc