From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103111 invoked by alias); 8 Feb 2016 06:45:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 103091 invoked by uid 89); 8 Feb 2016 06:45:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hey, endings, naked, EXCEPT X-HELO: DUB004-OMC2S6.hotmail.com Received: from dub004-omc2s6.hotmail.com (HELO DUB004-OMC2S6.hotmail.com) (157.55.1.145) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 08 Feb 2016 06:45:45 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com ([157.55.1.138]) by DUB004-OMC2S6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 7 Feb 2016 22:45:42 -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.396.15; Mon, 8 Feb 2016 06:45:41 +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.0396.020; Mon, 8 Feb 2016 06:45:40 +0000 From: Bernd Edlinger To: David Wohlferd , Bernd Schmidt , "gcc-patches@gcc.gnu.org" , Richard Henderson , "jason@redhat.com" CC: "segher@kernel.crashing.org" , "sandra@codesourcery.com" , "Paul_Koning@Dell.com" , Jeff Law , "bernds_cb1@t-online.de" , Andrew Haley Subject: AW: Wonly-top-basic-asm Date: Mon, 08 Feb 2016 06:45:00 -0000 Message-ID: References: <56A54EF9.8060006@LimeGreenSocks.com> <56A61442.3090803@redhat.com> <56A9C134.1030500@LimeGreenSocks.com>,<56B80F57.9020606@LimeGreenSocks.com> In-Reply-To: <56B80F57.9020606@LimeGreenSocks.com> authentication-results: kernel.crashing.org; dkim=none (message not signed) header.d=none;kernel.crashing.org; dmarc=none action=none header.from=hotmail.de; x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [2FiGMUBb3XfVk/YBD6UQS7MDcKcUQBWy] x-microsoft-exchange-diagnostics: 1;HE1PR07MB0905;5:87h69xTdcfAMCH2IlTt29CpUGWEtJdBvGk3bnx3xFkMvZQHXjkWhmImb4uRWBgy7+Owh7ZziD5+WUVY1D9ULJ4QoJMzt6jT7U4Y0MgxpsMJxA9TBtvL3JPDmcpJJJcP9Za4GHm+I2J4uOZ4YWYtpSg==;24:yRsrofiHiYTVAIyKvpDKIG19Uw9143JymXdDPJDzLKgWho41uplVfaeZJmNSwRynE3EI60ZkF9MAGoqz1odl0MdNF1xz5PuJj+tra+G3aRM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB0905; x-ms-office365-filtering-correlation-id: 7ffb5ee3-05ae-47d3-5ea3-08d3305375e5 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: 084674B2CF x-forefront-antispam-report: SFV:NSPM;SFS:(7070004)(6009001)(24454002)(164054003)(74316001)(229853001)(122556002)(102836003)(106116001)(3280700002)(87936001)(2501003)(3660700001)(586003)(4326007)(189998001)(77096005)(33656002)(40100003)(230783001)(86362001)(1220700001)(2950100001)(5002640100001)(92566002)(76176999)(76576001)(5008740100001)(5003600100002)(50986999)(5001770100001)(54356999)(74482002)(73972006)(19580395003)(2900100001)(82202001)(93886004)(10400500002)(5890100001)(7059030);DIR:OUT;SFP:1901;SCL:1;SRVR:HE1PR07MB0905;H:HE1PR07MB0905.eurprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: sct-15-1-318-9-msonline-outlook-efc2f.templateTenant X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2016 06:45:40.4944 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0905 X-SW-Source: 2016-02/txt/msg00502.txt.bz2 On 8. 2. 2016 04:45, David Wohlferd wrote: > Hey Bernd. >=20 > I replied with a patch that includes most of the changes you asked for > (see inline below). Were you waiting on me for something more? >=20 ChangeLog entries are still missing. > I have cleaned up the testcases so they aren't so i386-specific, but > otherwise this patch (attached) is the same. Let me know if there is > something more I need to do here. >=20 > Thanks, > dw David, there is a tool that you can use to check the patch for some style-nits before submission. I used it and it complains about these things: contrib/check_GNU_style.sh 24414Q.patch Blocks of 8 spaces should be replaced with tabs. 29:+ DECL_ATTRIBUTES (current_function_decl))=20 30:+ =3D=3D NULL_TREE) 31:+ warning_at (asm_loc, OPT_Wonly_top_basic_asm,=20 32:+ "asm statement in function does not use extended sy= ntax"); 57:+ EXCEPT when in naked functions. Also allow asm(""). */ 59:+ && TREE_STRING_LENGTH (string) !=3D 1) 60:+ if (lookup_attribute("naked", 61:+ DECL_ATTRIBUTES (current_function_decl)) 62:+ =3D=3D NULL_TREE) 63:+ warning_at (asm_loc, OPT_Wonly_top_basic_asm, 64:+ "asm statement in function does not use extended" 65:+ " syntax"); Trailing whitespace. 25:+ /* Warn on basic asm used inside of functions,=20 28:+ if (lookup_attribute ("naked",=20 29:+ DECL_ATTRIBUTES (current_function_decl))=20 31:+ warning_at (asm_loc, OPT_Wonly_top_basic_asm,=20 Dot, space, space, end of comment. 122:+/* Define macro at file scope with basic asm. */ 123:+/* Add macro parameter p to eax. */ 130:+/* the "a" constraint since it modifies eax. */ 186:+ /* basic asm should not warn in naked functions. */ Sentences should end with a dot. Dot, space, space, end of the comment. 128:+/* Use macro in function using extended asm. It needs */ 129:+/* the "cc" clobber since the flags are changed and uses */ 187:+ asm(" "); /* no warning */ 203:+/* acceptable */ 209:+/* acceptable */ 212:+/* acceptable */ 215:+/* acceptable */ 221:+ /* acceptable */ 227:+ /* acceptable */ 230:+ /* acceptable */ 233:+ /* acceptable */ 236:+ /* warning */ There should be exactly one space between function name and parentheses. 10:+C ObjC ObjC++ C++ Var(warn_only_top_basic_asm) Warning 26:+ EXCEPT when in naked functions. Also allow asm(""). */ 57:+ EXCEPT when in naked functions. Also allow asm(""). */ 60:+ if (lookup_attribute("naked", 124:+asm(".macro test p\n\t" 131:+int DoAdd(int value) 133:+ asm("test 5" : "+a" (value) : : "cc"); 187:+ asm(" "); /* no warning */ 190:+int main(int argc, char *argv[]) 192:+ return func(argc, argc); 202:+#if defined(__i386__) || defined(__x86_64__) 204:+register int b asm("esi"); 218:+int main(int argc, char *argv[]) 220:+#if defined(__i386__) || defined(__x86_64__) 222:+ register int a asm("edi"); 228:+ asm(" "::"r"(a), "r" (b)); 234:+ asm(""); 237:+ asm(" "); /* { dg-warning "does not use extended syntax" } */ Well regarding line 10 that is of course correct syntax. And I looked with vi at gcc/testsuite/c-c++-common/Wonly-top-basic-asm.c it seems to be using mixed windows and unix style line endings. I would use unix line endings wherever possible, for consistency. Thanks Bernd.