From patchwork Sun Dec 6 08:50:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 553095 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 528E01402A0 for ; Sun, 6 Dec 2015 19:50:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=xjOmq/0P; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type:mime-version; q=dns; s=default; b=xrvlf386JuHYEiWC3B75JQngynFWXs78YU2xHp9cTUKy992f1Z cIp6WV7ojpB1BGOoLu7d+doNKocaaHpQV5hvlzc1n7eFgKiHkNL/If5VXwqwyqIv x/qVPwVyAC7L+ONrFNJF3vV4qITsjTY0JenL/bNXYc5AxVCAdDG+Ex2aQ= 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 :to:cc:subject:date:message-id:content-type:mime-version; s= default; bh=YecMoLi96hBhPMz8VO8kj4L2G2E=; b=xjOmq/0PmrM2Vh/1KaKQ WeOPJQ9DbzznaDLEvhv2kKSvQdTdvnmQVbWI/MkPia4Pm4Yug0gZOgcKnnfr/JPS 5aSHGzapSp2x//BAbbTeFlBFRIYMmjc/g3dmw3S2lj6WwIyD7QiOLPcXnt2/GESg xapofVbYKsa68rixNyURiso= Received: (qmail 115119 invoked by alias); 6 Dec 2015 08:50:50 -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 115107 invoked by uid 89); 6 Dec 2015 08:50:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: DUB004-OMC4S7.hotmail.com Received: from dub004-omc4s7.hotmail.com (HELO DUB004-OMC4S7.hotmail.com) (157.55.2.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Sun, 06 Dec 2015 08:50:47 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com ([157.55.2.72]) by DUB004-OMC4S7.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 6 Dec 2015 00:50:43 -0800 Received: from HE1PR07MB0905.eurprd07.prod.outlook.com (10.162.26.12) by HE1PR07MB0905.eurprd07.prod.outlook.com (10.162.26.12) with Microsoft SMTP Server (TLS) id 15.1.331.20; Sun, 6 Dec 2015 08:50:42 +0000 Received: from HE1PR07MB0905.eurprd07.prod.outlook.com ([10.162.26.12]) by HE1PR07MB0905.eurprd07.prod.outlook.com ([10.162.26.12]) with mapi id 15.01.0331.023; Sun, 6 Dec 2015 08:50:42 +0000 From: Bernd Edlinger To: "gcc-patches@gcc.gnu.org" CC: Richard Biener Subject: [PATCH 1/2] Fix minor glitches with basic asm Date: Sun, 6 Dec 2015 08:50:42 +0000 Message-ID: authentication-results: suse.de; dkim=none (message not signed) header.d=none; suse.de; dmarc=none action=none header.from=hotmail.de; x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [Fd0gL/hi7Xqvss0WGCVX6jgNAaxV+M6s] x-microsoft-exchange-diagnostics: 1; HE1PR07MB0905; 23:ojOF6xDOmr9yqQOzUW9MgJzLoF/ktJ9itiL1ca/4XoOfxk0nomaHSa6rY9XyONQsfYXsYRsuadAAFtO7vmzz2MA2B4UKMsL4WOP6wV1Q1ujA0Z+byW2V3f0dGnrlrSOPN8X5p/A910FdxeN7hfLd+73A7/zpzSmqE/erVW131apO0xPD0eLYvfT1uL2PjASBraEXzBCDbYF9nD57Zw3PAQ==; 5:AL57s16yVUZiLLP1IPK/yNxbTQ+oqWlIp5Qw/UozzANggsgSqQOHSpb9R8fAfV10KTWeXVhpFuInIr2VJ6ODclc1UrsRwjAiIj9F1MPyW2sUAPe0e2oAYjx27EDd+KrMtd0rQ33uqBas2e/9sf6WIg==; 24:y8J7a0h9Jo8Xvx5UV/LRLioHn9iTL/LdxbU8YQOmjBSDeYPsDG6Yphbjb3bvYj6AScV3GylvqXlgEbF9yDFG9dxXDjL3kP4GtK04eg6Gdvw= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB0905; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:HE1PR07MB0905; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0905; x-forefront-prvs: 0782EC617F x-forefront-antispam-report: SFV:NSPM; SFS:(7070004)(98900002); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1PR07MB0905; H:HE1PR07MB0905.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: sct-15-1-318-9-msonline-outlook-efc2f.templateTenant X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2015 08:50:42.2117 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0905 Hi, while looking at the handling of basic asm statements I noticed two minor glitches, which I want to fix now. First there is a missing check in compare_gimple_asm in ipa-icf-gimple.c Here we check if two asm statements are exactly identical, there is a possibility that one is a basic asm and the other is an extended asm with zero operands. Even if both have the same string the string means something slightly different, if % or { } are around. example: asm("%"); // OK asm("%":); // error: invalid 'asm': invalid %-code Boot-strapped and reg-tested on x86_64-pc-linux-gnu, OK for trunk? Thanks Bernd. 2015-12-06 Bernd Edlinger * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Fix check for basic asm. Index: gcc/ipa-icf-gimple.c =================================================================== --- gcc/ipa-icf-gimple.c (revision 231320) +++ gcc/ipa-icf-gimple.c (working copy) @@ -981,6 +981,9 @@ func_checker::compare_gimple_asm (const gasm *g1, if (gimple_asm_volatile_p (g1) != gimple_asm_volatile_p (g2)) return false; + if (gimple_asm_input_p (g1) != gimple_asm_input_p (g2)) + return false; + if (gimple_asm_ninputs (g1) != gimple_asm_ninputs (g2)) return false;