From patchwork Fri Nov 17 15:21:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 839046 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-467152-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="cO5zNhhf"; 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 3ydhfh2BRfz9s1h for ; Sat, 18 Nov 2017 02:21:47 +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:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=OzX MVwZF8+s9AteNjcd5MqYxpL3zcVqB/6QLbszR2nqfc/bZCDQwWWkjqRGEhNDiHmB AycEWCJSQZjGJtASCzaJ54mhe3hGjuykYOff5SNNMnw/TX8nzf+m+OcK72G8nTV5 zOpEeOmII5LQlhf0QhX21Sdf911A35PMdUePgyeQ= 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 :content-transfer-encoding:mime-version; s=default; bh=bYmdnkmeR 71pk3jEaXyzA84l8Mw=; b=cO5zNhhfzdFobRNG+6EVgLkLz/ZEg80QNxKAmQNT2 Lq7yuyWKhxOfuftv6ACS1Zwh/A75D01xbMptsP9wkTBgVMpnEi+bztdU4Ntb2fZK iOpZGLcTbM2LXCKdX/oiJ4LNn+A25ueCqyxd7cxs0mSG5RqkQltjDbLbXq64Vz81 PY= Received: (qmail 88407 invoked by alias); 17 Nov 2017 15:21:36 -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 87709 invoked by uid 89); 17 Nov 2017 15:21:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1489 X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0054.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Nov 2017 15:21:34 +0000 Received: from DB6PR0801MB2053.eurprd08.prod.outlook.com (10.168.86.22) by DB6PR0801MB2054.eurprd08.prod.outlook.com (10.168.86.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Fri, 17 Nov 2017 15:21:31 +0000 Received: from DB6PR0801MB2053.eurprd08.prod.outlook.com ([fe80::9cdc:27e2:bc30:67f7]) by DB6PR0801MB2053.eurprd08.prod.outlook.com ([fe80::9cdc:27e2:bc30:67f7%17]) with mapi id 15.20.0218.011; Fri, 17 Nov 2017 15:21:31 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd Subject: [PATCH][AArch64] Set SLOW_BYTE_ACCESS Date: Fri, 17 Nov 2017 15:21:31 +0000 Message-ID: x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0801MB2054; 6:fdFdQQgVpKHioBljuwOFyte5wctjzK1Dcb8mmi4vyIhqv3Xl+Z8ITGutroZd0yG2Zfj019gPGCEza4YopHv3yczKMNLjhjgLiJemHQPvTj+/bDu24TQp0rQN0u6IzaO6b922QCQDgPSsH1x26inMQIW65oVXsJ2ZWVlk8thEnPdzWjEO57nZv3qo7hFPvPiDlqAZGoRBTQFPnOdK9/z4/96bdXC+8B2cVQwfKCFTx/nzgsighNtxjLAMQK2wfxijQe6nkdp2epPwEzehggPhCA43hF7ZJZt68fA6YeNw+gDiDDy0whwNOeAyZSTWNVb3g0AVGt2sxOeBXQ5eERSP3w==; 5:bBBRcr3AMLGOVD3fX/F0TQlo/ezscPRUyr08idpF15GJ6RWcHvB6VrtWarH2DNQ3Al+4D4WjZYGGsWirIRA//LZvjzr9/ms+ws9pI27HOdEvSf879eSBHmyMP0Qb1F98+qZh47kP+QuzouP4+oFz0Bi3CjD6WFMWA8frp48juok=; 24:8x1ApAR6Zmi0+uF7cEGOP7YD89qJGnDR8YW7RsraeaPUm2s4rHrcZ+pulhCa5yHU7HMkbSEWvG3FE8NiqgDV3HW37Lz9a3l0QxkpLp9SsRs=; 7:+nLswEYRKlc6NS4BoiIPQ2nPA3ge6kGYFhaG77xE4eyzBvuNOUt1I1d+LLQUXEbUzUHlMPVG4tkh/4UA18MXVYMqVgtYPWrgn2dr+ZHPoHsfj7kKLGUfYXi/X1KlCcKADiWdLnAVIxSQyvXe4mbEosEGbbrQD8lD1+cAfYUvgDdfDFWy8AJRtPTVYIPQx24ATzfcFCHD4EHpq8EeOx8h9fTAuk2SkQRi9KfCNwhqoqa9MiE6yyeysw4jh9ZsdXXj x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 8ea7dc27-7ec2-454a-c0d7-08d52dcee190 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603258); SRVR:DB6PR0801MB2054; x-ms-traffictypediagnostic: DB6PR0801MB2054: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3231022)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0801MB2054; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0801MB2054; x-forefront-prvs: 049486C505 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(376002)(346002)(39860400002)(54534003)(199003)(377424004)(189002)(2900100001)(106356001)(66066001)(8676002)(81166006)(81156014)(3280700002)(6116002)(102836003)(3846002)(189998001)(105586002)(5250100002)(97736004)(68736007)(50986999)(3660700001)(7696004)(54356999)(99286004)(101416001)(4001150100001)(6506006)(5660300001)(6916009)(86362001)(33656002)(316002)(25786009)(14454004)(72206003)(9686003)(6436002)(53936002)(8936002)(4326008)(55016002)(2906002)(305945005)(7736002)(74316002)(478600001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0801MB2054; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ea7dc27-7ec2-454a-c0d7-08d52dcee190 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2017 15:21:31.2728 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2054 Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing bitfields by their declared type, which results in better codegeneration on practically any target. I'm thinking we should completely remove all trace of SLOW_BYTE_ACCESS from GCC as it's confusing and useless. OK for commit until we get rid of it? ChangeLog: 2017-11-17 Wilco Dijkstra gcc/ * config/aarch64/aarch64.h (SLOW_BYTE_ACCESS): Set to 1. diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 056110afb228fb919e837c04aa5e5552a4868ec3..d8f4d129a02fb89eb00d256aba8c4764d6026078 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -769,14 +769,9 @@ typedef struct if given data not on the nominal alignment. */ #define STRICT_ALIGNMENT TARGET_STRICT_ALIGN -/* Define this macro to be non-zero if accessing less than a word of - memory is no faster than accessing a word of memory, i.e., if such - accesses require more than one instruction or if there is no - difference in cost. - Although there's no difference in instruction count or cycles, - in AArch64 we don't want to expand to a sub-word to a 64-bit access - if we don't have to, for power-saving reasons. */ -#define SLOW_BYTE_ACCESS 0 +/* Contrary to all documentation, this enables wide bitfield accesses, + which results in better code when accessing multiple bitfields. */ +#define SLOW_BYTE_ACCESS 1 #define NO_FUNCTION_CSE 1