From patchwork Tue Nov 28 13:50:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongyu Wang X-Patchwork-Id: 1869299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=g42hFBAs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SfkPp2fm8z1yST for ; Wed, 29 Nov 2023 00:51:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C2B43875DC6 for ; Tue, 28 Nov 2023 13:51:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by sourceware.org (Postfix) with ESMTPS id A4ABD3858038 for ; Tue, 28 Nov 2023 13:50:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A4ABD3858038 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A4ABD3858038 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=134.134.136.20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701179455; cv=none; b=CnA5yZCA/oVnfok39xEl0qnE8cNeDAbWPRhslSxOIB0yhFLgtIaaK5nmTgA94PZcoz9IgfSUArXePcdqP1Rxz8oMZpEVm3Pf01g9jyph93vl/19Ael5A9bRO4RvSWV8cTJgfS0Cf214k61/NSlJNd0ogA9nX54uuWCaIlLJcbdo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701179455; c=relaxed/simple; bh=wjPJatQIx7jaXD1HX4Wm1ojOuS5s5h3AYAo6Jvhcax0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=BMf6AhYW5J3PPE4AROycIMcZ0ZRdIZnua/GWKH5uqYUvy4yd5WWmVWv/VjwNzmzMDUWcR6/JZyXMyhaQf3VnGv4MgzN3qttXpUg7QH8RaYVksdldMn3hJg7CbFUo+WuwLCrGTjiJIXbJIBxPHJkvSh/8E5lGYQyOfa2fwcz9vk0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701179453; x=1732715453; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wjPJatQIx7jaXD1HX4Wm1ojOuS5s5h3AYAo6Jvhcax0=; b=g42hFBAsxpr6cEyEe4XAxxTxxvgZdYRCZAj9OK1MS8XCjN6rWRE2becR LS5sJBLPpjqoAzG2g51M6ofADSPgfD5+VHuOiYs46vBFMmTFZsan4DDB4 3gzpETBEjh3VlgBDvV7qgRSkVyey9d9O9YqpaUs0ETaMzJZESF5jJNwDy tWFx0O9N9wLG1oMSzdWdkBzeMjSwQpk/0TdkuAPXFsYZirOIR6URQ367C 3kQe8g05f7IIl7Omf6aQK8R9Fu1BGorL3Cm/r9Fy1rJIxn203ow/5V8V5 FaYSo1tHJt1NM7FAhVuUEqNjoqwX+YZ96TNTMOdmX2GcFZ0ufCDn6EgUA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="383311446" X-IronPort-AV: E=Sophos;i="6.04,233,1695711600"; d="scan'208";a="383311446" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 05:50:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="834648607" X-IronPort-AV: E=Sophos;i="6.04,233,1695711600"; d="scan'208";a="834648607" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga008.fm.intel.com with ESMTP; 28 Nov 2023 05:50:48 -0800 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 04E22100567F; Tue, 28 Nov 2023 21:50:48 +0800 (CST) From: Hongyu Wang To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com Subject: [PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729] Date: Tue, 28 Nov 2023 21:50:47 +0800 Message-Id: <20231128135047.3554760-1-hongyu.wang@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi, On linux x86-64, -fomit-frame-pointer was by default enabled so the push2pop2 tests cfi scans are based on it. On other target with -fno-omit-frame-pointer the cfi scan will be wrong as the frame pointer is pushed at first. Add -fomit-frame-pointer to these tests that related to cfi scan. OK for master? gcc/testsuite/ChangeLog: PR target/112729 * gcc.target/i386/apx-interrupt-1.c: Add -fomit-frame-pointer. * gcc.target/i386/apx-push2pop2-1.c: Likewise. * gcc.target/i386/apx-push2pop2_force_drap-1.c: Likewise. --- gcc/testsuite/gcc.target/i386/apx-interrupt-1.c | 2 +- gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c | 2 +- gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c index ffcb8fce71c..6844e574d00 100644 --- a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c +++ b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args" } */ +/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args -fomit-frame-pointer" } */ /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */ extern void foo (void *) __attribute__ ((interrupt)); diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c index d78c96d36a3..5f43b42e33f 100644 --- a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c +++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -mapx-features=push2pop2" } */ +/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer" } */ /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */ extern int bar (int); diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c index 3cac7b10769..4e2259f0c99 100644 --- a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c +++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -mapx-features=push2pop2 -mforce-drap" } */ +/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer -mforce-drap" } */ /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */ #include "apx-push2pop2-1.c"