From patchwork Fri Sep 20 19:02:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1165394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509375-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="QTE9/hc1"; dkim-atps=neutral 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 46Zjl35hSGz9s00 for ; Sat, 21 Sep 2019 05:02:21 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; q=dns; s=default; b=wce7XXU+NUMLmIv8dqNt smLowRDdJctyNTxabSeaz79i+KmtJaHKTzG387+pNkrBlmbb8IguWhwuqRC3ALCv ntCXjDp34WLx9tPwcAKmlJHeWepxiphPuvYsjQy/G4qT71uE2KXmjPzAo5I8FBeX 7+e8h2kTZOhiSeKcSE3HsYU= 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:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; s=default; bh=tWPomNrh4bS4p3cJnkHarJfQx6 A=; b=QTE9/hc1aGtOiNUi6v75oLNHqAKOR5jTvelXjdDVDG/MbxIsms5pNmTDKP kfTtH5mu7G7PXdP0Kel22ythq+sfWI4dUhp7Ryjq0lu0bze3vgjHpgnPUKT5gPyU uhm/jugtPRKwoVf4ZrktY2gTw5P00fuqNFS+G4JsNUTtegFwo= Received: (qmail 21684 invoked by alias); 20 Sep 2019 19:02:13 -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 21676 invoked by uid 89); 20 Sep 2019 19:02:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_COUK, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1141, HX-Spam-Relays-External:ESMTPA X-HELO: smtp2.wavenetuk.net Received: from smtp.wavenetuk.net (HELO smtp2.wavenetuk.net) (195.26.37.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2019 19:02:11 +0000 Received: from [192.168.1.212] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp2.wavenetuk.net (Postfix) with ESMTPA id B8F766003A6; Fri, 20 Sep 2019 20:02:08 +0100 (BST) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [Darwin, X86, testsuite, committed] Fix naked-1.c fail. Message-Id: Date: Fri, 20 Sep 2019 20:02:05 +0100 Cc: Uros Bizjak To: GCC Patches This fails at m32 because the scan-asm is looking for an absence of "ret”. Darwin is generating the correct code for the function but the picbase thunk has a 'ret' insn. Fixed by making the test use -mdynamic-no-pic for m32. tested on x86_64-darwin16, x86_64-pc-linux-gnu (m32/m64) applied to mainline thanks Iain gcc/testsuite/ChangeLog: 2019-09-20 Iain Sandoe * gcc.target/i386/naked-1.c: Alter options to use non- PIC codegen for m32 Darwin. diff --git a/gcc/testsuite/gcc.target/i386/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c index 07bb10edd8..f51773c46a 100644 --- a/gcc/testsuite/gcc.target/i386/naked-1.c +++ b/gcc/testsuite/gcc.target/i386/naked-1.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-O0 -fno-pic" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */ /* Verify that __attribute__((naked)) produces a naked function that does not use ret to return but traps at the end. */