From patchwork Thu Jan 11 23:44:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 859405 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-470920-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sTKC44WT"; 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 3zHjDh2w0Rz9sNr for ; Fri, 12 Jan 2018 10:45:40 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:reply-to:to:date:content-type :mime-version; q=dns; s=default; b=hIEgaMcTJapTgK3D1eF/nycF1l14P SfLci/b7h0OZf3nCFXtYB3nyhUwP+/M21cv0SQ1hKmcijZId7E0EnEjXaXoB+PrL 1cvhSecCoTtSypnrJfW+KlaTi8J/xfkD2OT1Qk0s9VLNoD+yxaqGrtrDEhDpwHA3 KfMXfdm5+HobuE= 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 :message-id:subject:from:reply-to:to:date:content-type :mime-version; s=default; bh=0z53xoowSHO3ECAK1vl3xqtSsus=; b=sTK C44WTWiofjpNhpxguAXk6JrJxfURsR3BK3y48qPpNgxVtg6/0COR41eX1CZ9DsHd cj5DM7sKMya4N3dVylmgUAn0t0RO66qTt6/ENLWuu8QBTF8I7Wo8xrKiKcx9S2Bw u8H6RrX1niD5L3eK/TdS/LHq24aQdsQbJLchAs/8= Received: (qmail 57582 invoked by alias); 11 Jan 2018 23:45:19 -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 57424 invoked by uid 89); 11 Jan 2018 23:45:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: NAM02-BL2-obe.outbound.protection.outlook.com Received: from mail-bl2nam02on0075.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (104.47.38.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jan 2018 23:45:03 +0000 Received: from sellcey-dt.caveonetworks.com (50.233.148.156) by BY2PR0701MB2039.namprd07.prod.outlook.com (10.163.156.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 11 Jan 2018 23:44:59 +0000 Message-ID: <1515714296.8647.7.camel@cavium.com> Subject: [Patch][Aarch64][PR target/79924] Cannot translate diagnostics From: Steve Ellcey Reply-To: sellcey@cavium.com To: gcc-patches , "james.greenhalgh" , "richard.earnshaw" , Marcus Shawcroft Date: Thu, 11 Jan 2018 15:44:56 -0800 Mime-Version: 1.0 X-ClientProxiedBy: MWHPR02CA0005.namprd02.prod.outlook.com (10.168.209.143) To BY2PR0701MB2039.namprd07.prod.outlook.com (10.163.156.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: be1285b1-5de2-4062-31db-08d5594d5421 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020073)(4652020)(5600026)(4604075)(4534103)(4602075)(4627199)(201703031133081)(201702281549075)(2017052603307)(7153060)(49563074)(7193020); SRVR:BY2PR0701MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2039; 3:wNtRZcJtLaCwnM0iLJUfevxy71nthKRLutDP72tnWrOP8c0eXzR4St0IInFU/C7j6SUyQeD37iddH7PjZcQRehFQRxkCgqSEURVuBO0zujrEq5rJ9cBYJTYDjrlQ9o6f3oHMRGdBr4KDlt/Molvuhu5eBvScVtEZTXtC5YfvjLr+IJ7QEDezsWdiRE9Q61Wzf39grJyvvhRHr7A1llNf0NKFmFVUrPxy6jq3vMV8cEts/ZIpnZcQdkwsphMG3GrH; 25:GRmbFHkwnW3ojifD8OlgEWs5Nfvj3ULKy/yQE/q+hF7sn5ar4JCuqRmxSUcnL0Ig5y//rGU1Ae3hgY0mAMg5awOwz6hbVk/kfFU75MThoCu1uNZBYM8O77vpJ+IVyVX009pjyc6t5/z7P6x0aloUo6hgYt3HAFlLnzDUUkFQSN53WIMfB0aN7+GZBi2VXF6m0iDpreth2F48GTFAhLk4nnm+ya6ZuFDKHnFPP7IRDDfeEDPeKyJ9X4gW702MPWZVZha0INDjZYBzOnjmbt645F7ZqbzskgtEYkBsrbIP3O36eMEDS29GLLB/PdA7FKyH5jXl8fmH3jY7B16M1qNBAKoNg/uNbJ0vVYzH/XjBEeU=; 31:M7u6+ORvCtCiEcCWyge3f1mS5PBnIgluLeG9okCMI2qUe3OYk+NxOACJfVF2QDotDH50alQqsPMxDewieyvA9+jUHoh2axhpuvGuaboPU1ZEe/lO2VrBnnO0ikrdQfua2cF1k3FUu2iURT6LS31ewtzRwjSUlDCtNBJ/nCkAr7fl2xqUd3+P1xNSnEBgvefbw/HU2wjzbewBJqRM1gjwgNUI9U/wrNNZlf5TJW63jC4= X-MS-TrafficTypeDiagnostic: BY2PR0701MB2039: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2039; 20:JxU3DeY5gUE9QeUl94oatYsyHPOLNLJ/Awai778cE8s3+i4LCrba8UdtiC9DNhvI0ce2pCkCBCGAfkVl9qOxKOZw8LkKiLeewHbJAK9+cb0nU278Ow8FNqK2Oef+CNGGwrAqyxrCqgwZFUv50QxentIW4LydByiwkLjfptLUy2WeLwaspjm4O4+QCTBDTVbB3FLE8Fu9jEAjxuIbhubccP0ek+Nv1awGcQDgapJiny/jOPuNk6id4TsXqfERdPwBUBq3HTI6A4RJij14uqQdvydp3Ot4FgHZBqlem9t26GdTuEXA5CyVQL6u8xSvCJAmdk4wM7fnYSciMNNfuCt1kd3HNVepqa08C27bLTH2ZwkdTb7xc57wrEamQavF+mkETWf2emwmXqbOYgFBasqjf7HqPdpk2Fv84IpnWNvmeFgCLQHl0dodGB3L867BnjUoSOuXoDVwIGlr+2l9sj7nBZZIs2Hrz/7JCu2vr7JPe1wSVf/5TDjROaEFGam4pGkd; 4:nlDpiv0o0Xlamkh0zsnSTortkQIjxuy/GKwrGqoMFjvHd2tvaBs21WUtYiMdejUX0lHkwJDiyynnmroCKkEn8ENs6S1AsbBU/MJHAWGP0JFmpk+yAj+vJd3AYYRc6Ms0u8fkI6/JpiQOgVKNNbL6XmfrTVN6lwz7ZqJADjyDS1EIIxVnveM9QI+VMHrAQVudYn3yWQir/MxBYwQqnL9xM6xjxXQo7KRCiT2crmFCjgPmww2inuBQox4zJ/xLlTFPnWKOejk2QtgCgQsquPc5+Wr+1YalQajO5/xsy+AggTX1gql/MOMot2bS2Zf8Ncbl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040470)(2401047)(5005006)(8121501046)(3231023)(944501137)(93006095)(93001095)(10201501046)(3002001)(6041268)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:BY2PR0701MB2039; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0701MB2039; X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(366004)(346002)(39380400002)(396003)(377424004)(51444003)(199004)(189003)(3846002)(478600001)(59450400001)(25786009)(72206003)(53936002)(6506007)(52116002)(386003)(33964004)(43066004)(69596002)(8676002)(568964002)(6116002)(105586002)(2476003)(66066001)(305945005)(7736002)(36756003)(103116003)(81156014)(5890100001)(2906002)(106356001)(3450700001)(6512007)(6666003)(5660300001)(4810100001)(53416004)(316002)(16526018)(6486002)(84326002)(81166006)(97736004)(68736007)(8936002)(50226002)(16586007)(4610100001)(110136005)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB2039; H:sellcey-dt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2039; 23:VW0rPGn579oe4McptWngtxLAko9264/SOmEfaGbCIaoQ0SwpKTLt9AlDZCE8P7+o2s9Al/1s+2f7RkcUgsZOgMLTxbTvCsyR+Mgv8loUSDmz87eDVWwTevnzQa5uZhN/VEyfXfLC0S29jeDx5tD7Uzan9alF2Uejx8ojoeIF3gLXCSafHjuOqeH27nG7oMDRAkrtGO8XAFk1Ob2Li85X5CUO9HsYYvi5hJ9B5JiUIR7GS5qh001r7Kz6nQ5k20Cer74Ehqo7abtVXcpM47AgB5mjYTHABr4q0IWqsTVEj9wwt6BpP8PgoGzpQkK6+dTn3GIsa7IqWji1WUiQQkGLJ2bx/EaeEf1kuxGc4GHuJWDHDCDzi38537b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k2+2ZmJPOX2o28xJMlgciud9jYkC06K9LsEFQ7+Ky3NeTSoWQBTWaJ77LanG2o6DhcupyGdd90TBUIAbPqKiibv+5Cxt8FVpapmcTOH5rr/t7YS5cCGG9AhHV9Yk7zdTdzNqYI+2BwyOm0nQ1meL8PXPCGbevcFK4Fh1IKynfAXiLJxFh6S7YO4ZclKA3JWurYRmeKLVkd3CZsH0sEQdaPXYt8/1SwmcPRR4XxqKRw+1KM1E08LPXCQJRMNUAuwlc=; 5:DAMRbRJ2SgtIrDenepr6GRuC1/Pnvurb+/+R/cmpGF5nClhCurfAD4/xx3u7xXTeTQDHdatTEJqJfLVzTM4AKbrjero7hEHYNJuyGuqOIsjnkh0a9UViyEE70E/m6konKGlizQzQ86qlV/pk1KI3nCSAuoSl/OvKTf8gJ5697tM=; 24:YFwRoooVOEJs+oLN6lSAeJfekw5LGq9Ufy5YqdkmZrMFyDYts5xXyZzfP0YZ9gQIDVMPRl1Sg5bldfQprM7YDt9ofKVcYnkhKlIo1yzFjJQ=; 7:oYwf6cBgDVjDLWtDemde6/lRM9wdMBVtXn0MTg0GAeA2Wv8kPplKCO8XPGUNc0yOg1ZBbBVBcxBMgoJTqWh1gUPKl2gdXMtmuqiw7cQ5S7BpVpFUmJP3s3JlFx8xpXNzyvhry+n356R41BK89q826iuFxynT0QXYC2Z9s7d6bDmFixNm8aj1rMvoganMDwhzYFoNefgF9Z8xQDQEWXijwiWU03yihqjtyOmgSYgxEYMziQiFjnFEzusKSk5kst4i SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 23:44:59.8483 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be1285b1-5de2-4062-31db-08d5594d5421 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0701MB2039 This is a patch for PR target/79924, which says the error messages called from aarch64_err_no_fpadvsimd cannot be translated due to how they are constructed.  To make them translatable and not change the actual messages would have required creating 16 individual messages which seemed a bit excessive so I simplified them a bit and fixed up the test cases that scan for them. Instead of having 16 messages with: ['-mgeneral-regs-only'|'+nofp' feature modifier] is incompatible with [vector|floating-point] [argument|return type|varargs|code] I changed it to four messages with [-mgeneral-regs-only|+nofp feature modifier] is incompatible with the use of [vector|floating point] types The changes I made in the actual messages were: Remove the quotes from around '-mgeneral-regs-only' and '+nofp' because error messages I saw on other platforms did not use quotes around compiler flags. Replace the specific [argument|return type|varargs|code] terms with 'use of [vector|floating point] types.  This got me from 16 to 4 messages.  I think that since the error message will point at the actual line where the problem is, having the message be a bit more generic is not a problem.  Also I chose to include 'the use of' because having these types (and not doing anything with them) will not trigger one of these errors only using them in code (as an argument, return type, etc) will trigger the error.  Also I got rid of the '-' in floating-point since I didn't see any reason for it to be there. Tested with no regressions, OK to checkin? Steve Ellcey sellcey@cavium.com 2018-01-11  Steve Ellcey   PR target/79924 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove second argument. * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd): Remove second argument, change how error is called. (aarch64_layout_arg): Remove second argument from aarch64_err_no_fpadvsimd call. (aarch64_init_cumulative_args): Ditto. (aarch64_gimplify_va_arg_expr): Ditto. * config/aarch64/aarch64.md (mov): Ditto. 2018-01-11  Steve Ellcey   PR target/79924 * gcc.target/aarch64/mgeneral-regs_1.c: Update error message. * gcc.target/aarch64/mgeneral-regs_2.c: Ditto. * gcc.target/aarch64/mgeneral-regs_3.c: Ditto. * gcc.target/aarch64/nofp_1.c: Ditto. diff --git a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_1.c b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_1.c index 1656db5..9484c8a 100644 --- a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_1.c +++ b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_1.c @@ -2,8 +2,7 @@ typedef int int32x2_t __attribute__ ((__vector_size__ ((8)))); -/* { dg-error "'-mgeneral-regs-only' is incompatible with vector return type" "" {target "aarch64*-*-*"} .+2 } */ -/* { dg-error "'-mgeneral-regs-only' is incompatible with vector argument" "" {target "aarch64*-*-*"} .+1 } */ +/* { dg-error "-mgeneral-regs-only is incompatible with the use of vector types" "" {target "aarch64*-*-*"} .+1 } */ int32x2_t test (int32x2_t a, int32x2_t b) { return a + b; diff --git a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_2.c b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_2.c index 8590199..34b4d97 100644 --- a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_2.c +++ b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_2.c @@ -10,6 +10,6 @@ test (int i, ...) va_list argp; va_start (argp, i); int32x2_t x = (int32x2_t) {0, 1}; - x += va_arg (argp, int32x2_t); /* { dg-error "'-mgeneral-regs-only' is incompatible with vector varargs" } */ + x += va_arg (argp, int32x2_t); /* { dg-error "-mgeneral-regs-only is incompatible with the use of vector types" } */ return x[0] + x[1]; } diff --git a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c index f6b5fba..84320fe 100644 --- a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c +++ b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c @@ -5,7 +5,7 @@ extern void abort (void); int test (int i, ...) { - float f = (float) i; /* { dg-error "'-mgeneral-regs-only' is incompatible with floating-point code" } */ + float f = (float) i; /* { dg-error "-mgeneral-regs-only is incompatible with the use of floating point types" } */ if (f != f) abort (); return 2; } diff --git a/gcc/testsuite/gcc.target/aarch64/nofp_1.c b/gcc/testsuite/gcc.target/aarch64/nofp_1.c index 3fc0036..c176c19 100644 --- a/gcc/testsuite/gcc.target/aarch64/nofp_1.c +++ b/gcc/testsuite/gcc.target/aarch64/nofp_1.c @@ -15,5 +15,5 @@ main (int argc, char **argv) { int32x2_t a = (int32x2_t) {0, 1}; int32x2_t b = (int32x2_t) {2, 3}; - return test (2, a, b); /* { dg-error "'\\+nofp' feature modifier is incompatible with vector argument" } */ + return test (2, a, b); /* { dg-error "\\+nofp feature modifier is incompatible with the use of vector types" } */ }