From patchwork Tue Feb 14 19:52:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 141179 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 20EA0B6FB7 for ; Wed, 15 Feb 2012 06:53:03 +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=1329853984; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC: Subject:References:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=/7tc63rQUXVeI9lRFsy7R3ukgtM=; b=Q5kfPMeFx1X6WIf QO+fv/omnz5aWW/Ogj3m9HHRNOSJuEKkFTjii1P8BS+nDhTdakN08TYW/SjHQgVQ So/2UkaeNs7DEacT12bJ/6cqath/uzLb6y20psLl0+v9fBOWNCMSpjqvmBTRxNeW 8Mxux5kE7VmBU97FsAWgtGl93hFg= 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:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=oHcdTtposRuTAscAKXa4gW2Qv2e3MMoMpmHxnCF8P4KdulUMXh8JUkZ+go5TIS L4844FsCHBnN4Jk8njKWJwunmQ3C1VLusNGI8MnsQzK3ePPd7XMA16wm3wioup8s 3U8sUyd6Gt7pbtx9zZj5T7LGvTtQU2wmwuqyAjPVn45Ac=; Received: (qmail 26490 invoked by alias); 14 Feb 2012 19:53:00 -0000 Received: (qmail 26479 invoked by uid 22791); 14 Feb 2012 19:52:59 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_OV, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 19:52:44 +0000 Received: by qcso7 with SMTP id o7so223607qcs.20 for ; Tue, 14 Feb 2012 11:52:43 -0800 (PST) Received: by 10.229.135.149 with SMTP id n21mr13175724qct.85.1329249163558; Tue, 14 Feb 2012 11:52:43 -0800 (PST) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id g3sm5389749qap.2.2012.02.14.11.52.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Feb 2012 11:52:42 -0800 (PST) Message-ID: <4F3ABB89.2090402@redhat.com> Date: Tue, 14 Feb 2012 11:52:41 -0800 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Uros Bizjak CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH, libitm]: GTM_longjmp: Jump indirect from memory address References: <4F399548.5080105@redhat.com> <4F39A79A.3050704@redhat.com> <4F3AA2DF.9070000@redhat.com> In-Reply-To: X-IsSubscribed: yes 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 On 02/14/2012 10:26 AM, Uros Bizjak wrote: > #ifdef __x86_64__ > + cfi_def_cfa(%rsi, 0) > movq (%rsi), %rcx > movq 8(%rsi), %rbx > movq 16(%rsi), %rbp > @@ -119,20 +120,21 @@ > movq 32(%rsi), %r13 > movq 40(%rsi), %r14 > movq 48(%rsi), %r15 > + cfi_offset(%rip, 56) > movl %edi, %eax > - cfi_offset(%rip, 56) > - cfi_def_cfa(%rcx, 0) > movq %rcx, %rsp > + cfi_register(%rsp, %rcx) > jmp *56(%rsi) No, your changes are incorrect. All three markers needed to be together in order to provide a consistent and coherent unwind. What you committed was much worse than simply not describing anything at all. Fixed as below. Committed. r~ diff --git a/libitm/config/x86/sjlj.S b/libitm/config/x86/sjlj.S index 554ec98..8844228 100644 --- a/libitm/config/x86/sjlj.S +++ b/libitm/config/x86/sjlj.S @@ -112,7 +112,6 @@ SYM(_ITM_beginTransaction): SYM(GTM_longjmp): cfi_startproc #ifdef __x86_64__ - cfi_def_cfa(%rsi, 0) movq (%rsi), %rcx movq 8(%rsi), %rbx movq 16(%rsi), %rbp @@ -120,21 +119,22 @@ SYM(GTM_longjmp): movq 32(%rsi), %r13 movq 40(%rsi), %r14 movq 48(%rsi), %r15 - cfi_offset(%rip, 56) movl %edi, %eax - movq %rcx, %rsp + cfi_def_cfa(%rsi, 0) + cfi_offset(%rip, 56) cfi_register(%rsp, %rcx) + movq %rcx, %rsp jmp *56(%rsi) #else - cfi_def_cfa(%edx, 0) movl (%edx), %ecx movl 4(%edx), %ebx movl 8(%edx), %esi movl 12(%edx), %edi movl 16(%edx), %ebp + cfi_def_cfa(%edx, 0) cfi_offset(%eip, 20) - movl %ecx, %esp cfi_register(%esp, %ecx) + movl %ecx, %esp jmp *20(%edx) #endif cfi_endproc