From patchwork Sun May 11 00:55:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Mi X-Patchwork-Id: 347744 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 EE5BD140079 for ; Sun, 11 May 2014 10:56:10 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=jj3EwlQexrulMPs7iC ShIMSyLq2YCfPpVJAtGv4VK0v+b3qjeLaEKJMdI1aw8zVRa4h1xpnDbr7MMh5DvW qzjfQsM0ZA6lKRwR6f02NblygvjxAy4EvVlfKzmHQdbD8TQCZM77NPuJJua2Mvp4 Hv/4VznHUzyzweYKDGTpvhOfU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=7h9QYKIgC4iGOTEYcN3Fx5H2 7u4=; b=G9oaNJFTba+Avk6iYrTxgc00ryuVZuFcS02+gHlCqsKmh6QEaCa2ry4a vJ+cHT91Z7CnCqszoqb87PdUe9zQ/8n6MoRJj0+oSrPG+8L5ggIfBRe68ysXkRXv XjoEEY3p6V6IO7EMJWD4nqWaFhDClGor+Hi5fPlAFMvCXH0aZkg= Received: (qmail 8635 invoked by alias); 11 May 2014 00:56:03 -0000 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 Received: (qmail 8616 invoked by uid 89); 11 May 2014 00:56:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f51.google.com Received: from mail-oa0-f51.google.com (HELO mail-oa0-f51.google.com) (209.85.219.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 11 May 2014 00:56:01 +0000 Received: by mail-oa0-f51.google.com with SMTP id n16so6651060oag.24 for ; Sat, 10 May 2014 17:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YDuIv9WWF0dqCo+DCH4vzJfzL9UYhGmT0yL+noGPLuA=; b=aYsgFGHQ1YjW4exAH7GMKUlWs9VrTXO9bo2fHASHrDDhKF7LD58TM96rLRcfYH3OOu n4Vla4GBoweq0qn7Teai1O5SZtOdC8EhISLowZrzCLC0d10MvXH9pbR+DeoYDLvTxeEc 1ej/ZQoN4bGN/8468bHXqKNvk072lCyhui1nfF6+tR0TydzycmsCCkTyhdhDQ69XY0QZ R7SHe2kEtF4N4uO8PFryjyjteDe/balT7LzOy0feYHK4OHVbAQAiGZoY3yORsS6hdVr4 xJ/EZy6Av9oNJUKhAqE6pEh/l08IaFCjEiFC0odpFFKTpdPV7sUQXmSld7iQP6AlIfiX iHGQ== X-Gm-Message-State: ALoCoQnao/ULcsi9XKQLj6LAaj3EBK40w4UC73fUURHKt+CPYo+ErkKmS3toAxtZsASKpXHlEBV3 MIME-Version: 1.0 X-Received: by 10.182.165.3 with SMTP id yu3mr24094449obb.14.1399769759425; Sat, 10 May 2014 17:55:59 -0700 (PDT) Received: by 10.76.152.199 with HTTP; Sat, 10 May 2014 17:55:59 -0700 (PDT) In-Reply-To: References: <20140510101615.78EB7103@mailhost.lps.ens.fr> Date: Sat, 10 May 2014 17:55:59 -0700 Message-ID: Subject: Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call From: Wei Mi To: Rainer Orth Cc: Dominique Dhumieres , GCC Patches , iains@gcc.gnu.org, Uros Bizjak Here is a patch for the test. It contains two changes: 1. For emutls, there will be an explicit call generated at expand pass, and no stack adjustment is needed. So add /* { dg-require-effective-target tls_native } */ in the test. 2. Replace cfi_def_cfa_offset with insn sequence check. Is it ok? Thanks, Wei. "sub\[^\r\n\]*8\[^\r\n\]*sp.*call\[^\r\n\]*__tls_get_addr.*sub\[^\r\n\]*8\[^\r\n\]*sp.*call\[^\r\n\]*__tls_get_addr" } } */ On Sat, May 10, 2014 at 6:47 AM, Rainer Orth wrote: > dominiq@lps.ens.fr (Dominique Dhumieres) writes: > >>> This is the updated patch of pr58066-3.patch. ... >> >> On x86_64-apple-darwin13 I get >> >> FAIL: gcc.target/i386/pr58066.c scan-assembler-times .cfi_def_cfa_offset 16 2 > > Same on i386-pc-solaris2.* with Sun as (which doesn't support cfi > directives). > > Rainer > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University Index: testsuite/gcc.target/i386/pr58066.c =================================================================== --- testsuite/gcc.target/i386/pr58066.c (revision 210301) +++ testsuite/gcc.target/i386/pr58066.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-fPIC -O2" } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-options "-fPIC -fomit-frame-pointer -O2" } */ /* Check whether the stack frame starting addresses of tls expanded calls in foo and goo are 16bytes aligned. */ @@ -15,4 +16,4 @@ void* goo() return &ccc2; } -/* { dg-final { scan-assembler-times ".cfi_def_cfa_offset 16" 2 } } */ +/* { dg-final { scan-assembler