From patchwork Tue Jun 16 12:44:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Butler X-Patchwork-Id: 39641 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A14C5388C038; Tue, 16 Jun 2020 12:44:38 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60055.outbound.protection.outlook.com [40.107.6.55]) by sourceware.org (Postfix) with ESMTPS id 2811F383F84F for ; Tue, 16 Jun 2020 12:44:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2811F383F84F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Alex.Butler@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BgJ6d4KxvaWLk8AMhfV6ZSzexaYyUjmA5xIANTHzUiY=; b=GzT78iBtDNVWGeAWAV0SkReHB0Ixyjkbp0oe81YXuAT0Qqeu511Bv8JGqOCP9jMZ5bKqvCXvDlGmSWu48QUDtptX+UlNMtFP2Kl97XKimVKVX0MwkO/BNVn849QHTWfFhy0GLqawfnmruVt8ozsjTqM4IN7uNJGFlW5ErXz35jo= Received: from AM5PR0402CA0014.eurprd04.prod.outlook.com (2603:10a6:203:90::24) by VI1PR0801MB1902.eurprd08.prod.outlook.com (2603:10a6:800:88::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.20; Tue, 16 Jun 2020 12:44:32 +0000 Received: from AM5EUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:90:cafe::d1) by AM5PR0402CA0014.outlook.office365.com (2603:10a6:203:90::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.19 via Frontend Transport; Tue, 16 Jun 2020 12:44:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT063.mail.protection.outlook.com (10.152.16.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Tue, 16 Jun 2020 12:44:31 +0000 Received: ("Tessian outbound 79611f28bf50:v59"); Tue, 16 Jun 2020 12:44:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 532aab008ede1e9c X-CR-MTA-TID: 64aa7808 Received: from d0860113fd2f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 357C2F23-51F5-48F6-8905-08C23A3C5B6A.1; Tue, 16 Jun 2020 12:44:26 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d0860113fd2f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 16 Jun 2020 12:44:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FIZ+i1n+J/ZgRX51wkHpHeuGtIzpSbFOwIsp58lRB1AtT5oouFPBI0oX7EECCTO+gDf7wlzqxgznnsuls2vptJnc3iJ5Q0h6pbGAY/B3u/G9sQjNYsMF1AEp+sr/liHDWJxwlXHqhFDNK5ShX5MQkdZApB92f3XBsproWumM7sZ552+T2GWnyW3jav6KK70DlVCLhzm9vLGd02OclVGbBxr2RhGiWgZ0fg9SybtlE4ROtHHNczY0rCIcZWCHKj3EK+hjGf3aSSFVDRNt5s5/zZ6WatQVN5FUoGeqFJ7tT0NY10LkdeTFZCn7H+JPmJThAiHfUcrHHGVqZFrQixghHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BgJ6d4KxvaWLk8AMhfV6ZSzexaYyUjmA5xIANTHzUiY=; b=g8960dSBghwcdDm+dXWG5a+nx1K5TCIf3WRgowGp/qL1VxyrehGShNH9/6cFqYFd/lngVAU3w4SArYHYMXqVe7AshQTIYV0d52ZtJQMqbdln9UVOQ1TyqlhZN4BmxnmOoyYiG1FM1/vPBcEo/dprL37XWUzOwTwdNHBVEHtGBqPjrHvE/K4HmTq3Qc7w2pempwBmhs0DznPEJjbe9Uk3jEedkANBbKrCvjuIeAYlVk5yZOfF7LRdzgcZKH0/k+7oM/yHYzzp5gSqMls8ZLARN6xyFhxvEufwTQ6U6ntyLD8UBwiLNT9K1MQmmx0aStZI6vqx3pwE87DISmyTbMhZ+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BgJ6d4KxvaWLk8AMhfV6ZSzexaYyUjmA5xIANTHzUiY=; b=GzT78iBtDNVWGeAWAV0SkReHB0Ixyjkbp0oe81YXuAT0Qqeu511Bv8JGqOCP9jMZ5bKqvCXvDlGmSWu48QUDtptX+UlNMtFP2Kl97XKimVKVX0MwkO/BNVn849QHTWfFhy0GLqawfnmruVt8ozsjTqM4IN7uNJGFlW5ErXz35jo= Received: from VI1PR08MB3663.eurprd08.prod.outlook.com (2603:10a6:803:85::26) by VI1PR08MB3024.eurprd08.prod.outlook.com (2603:10a6:803:45::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.25; Tue, 16 Jun 2020 12:44:24 +0000 Received: from VI1PR08MB3663.eurprd08.prod.outlook.com ([fe80::dda9:2735:3473:b60c]) by VI1PR08MB3663.eurprd08.prod.outlook.com ([fe80::dda9:2735:3473:b60c%6]) with mapi id 15.20.3088.028; Tue, 16 Jun 2020 12:44:24 +0000 From: Alex Butler To: "libc-alpha@sourceware.org" Subject: [PATCH v2] aarch64: MTE compatible strncmp Thread-Topic: [PATCH v2] aarch64: MTE compatible strncmp Thread-Index: AQHWQ9uzdjhqqFjdFUaZlzKazislpw== Date: Tue, 16 Jun 2020 12:44:24 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [82.70.46.126] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5776e46d-45ca-4d0d-1ac4-08d811f30428 x-ms-traffictypediagnostic: VI1PR08MB3024:|VI1PR0801MB1902: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:4714;OLM:4714; x-forefront-prvs: 04362AC73B X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: jfTj8GyO6vIUEhHJH1FsfjPp/JvvXWVGkWXy4m6dAGej2iW6p6mqQJ2Y0nGb0zZ8ipS5MPl9VeioIYdeb4VN4y/u25B4LhXl7W5yImY9oDQevUWpVwpu3GsXxHc6efLnLgtJpv2Bk7LLy46Xxb74hFflLpT3giuiBUs5SgiAQ6xxtvDyMhItFZJRebRkqHsZvfAuRjMsSs1PS9uJA0a60adU8GDGUNyIUlIm2xRvoMcZWdj07Va2zIBRgMGg+bkJPny52UaHiieMxrHsWF0ExlLXfkpR80NB7AS4qt+mNUBmvXMn1JjtygbLve0PHjmjAVfPEjCI9cQFA2p62SVqihBgng/vi0Vm6T7yoLUWEorYXddxXC3J53Fst2m6bsjRrnt2gRss9wetEsgdYEeKqQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3663.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(396003)(346002)(376002)(39860400002)(136003)(66446008)(66556008)(91956017)(66616009)(64756008)(66476007)(76116006)(55016002)(7696005)(478600001)(5660300002)(9686003)(66946007)(26005)(86362001)(52536014)(6506007)(30864003)(33656002)(6916009)(186003)(8676002)(316002)(99936003)(71200400001)(8936002)(83380400001)(2906002)(17423001)(156123004)(559001)(579004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: nJCSP0KRJQj0AS4J6b8GCWlVkHvMx4QWWZ4CvstM+41pTH7q0XdQvbV7J3gnYQCN3GeQm8G8Oul7wcFZxdn1fZ8ulAWiARURlAFItUyU8KBfE3fSvi3mkUD6XoO+AIbL4Ad4fYwf6RKMwpy7oA3B8+PTMvOOfWL1Yld+CobprUMlat0n2X+Kfa2QkJUcUUF6k8H+5KZFJOSx877w4hdzzStoW1PmFUutTbJmL5dPaxYYh1c6glUFivCOzSX8ChgtwQ1Wiyr3EZZDVrL+Z5vTGU2VoIL/9Iy2AAuRiACFdAtrnEmu72WVzaXzvaNKWJplZi3U6QN3EFjKN3RvFYMH54ihJO5pbfHl0Tf7UxgXMeR/05dqWbS0rLaRUc29ZI4WdR/CwW2Hx4uAZ2E8QZCMSz4T1si/lNtAlfYOzCwxyt6jgwN/TzatGpWv/3OovAwR4QgfKRfARX+uFozT3/1J5FK/hUbCnfFwgTguRqIPx3s= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3024 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT063.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(39860400002)(136003)(346002)(46966005)(70206006)(99936003)(6916009)(5660300002)(235185007)(186003)(70586007)(8936002)(66616009)(8676002)(356005)(478600001)(26005)(82310400002)(82740400003)(36906005)(316002)(336012)(47076004)(2906002)(33656002)(9686003)(7696005)(52536014)(83380400001)(86362001)(55016002)(6506007)(30864003)(81166007)(17423001)(156123004); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 116c0aab-6e00-4844-40b7-08d811f2ffc3 X-Forefront-PRVS: 04362AC73B X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Edvfy3iiedK04IPM9jSjHTVZn2AlcNHwbjUV8Vq89iLOqmei6E45tfNkAZfBg1V+IH28vHekP6t5FKdAX46A/EEYSKNd63AOclXL6h8pBgXar6MD02B0Jf9lR04wRjWG6I7MAX9lJow0CqLFkegZVRdJZgA2LtXHCuwcA9nWOjtcwH1PXoyeraiIMK8h3OakQxfPR2s+sIROmWwVVj75x1Mif/SsnhKDdvdqfwOPjexmx/DyIN3xSFfjIHXLFAfCTKs+QO3X+yWdLPEoh8LjUi7bFOgz61pirHxe+TiN5rzYb+Hiq0O+tZBSH3QOfrEb4CRKU00RCsHsiVS0JhTafJT9PNn6VN6kZRuakW33QjfS3E9q3NmTW5Ue3Jm10NVnvA53gSCnMQjMEkadLaXsBVPvTagBhtB3cfshrXIlkKscGqDtbANt6r2Aa8V+GZyA X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2020 12:44:31.6823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5776e46d-45ca-4d0d-1ac4-08d811f30428 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1902 X-Spam-Status: No, score=-17.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch adds an MTE compatible implementation of strncmp. Please see the benchmark results for the performance uplift. | strlen | len | align1 | align2 | uplift A72 | uplift A53 | uplift N1 | | 8 | 1 | 0 | 0 | 1.15x | 1.17x | 1.21x | | 8 | 1 | 0 | 0 | 1.00x | 1.17x | 1.21x | | 8 | 1 | 0 | 0 | 1.00x | 1.17x | 1.20x | | 8 | 1 | 1 | 1 | 1.03x | 1.14x | 1.28x | | 8 | 1 | 1 | 1 | 1.03x | 1.14x | 1.22x | | 8 | 1 | 1 | 1 | 1.03x | 1.14x | 1.22x | | 8 | 1 | 1 | 2 | 1.03x | 1.00x | 0.78x | | 8 | 1 | 2 | 1 | 1.05x | 1.02x | 1.00x | | 8 | 1 | 1 | 3 | 1.05x | 0.98x | 1.42x | | 8 | 1 | 0 | 0 | 1.14x | 1.17x | 1.20x | | 8 | 1 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 1 | 0 | 0 | 1.14x | 1.17x | 1.20x | | 8 | 1 | 1 | 1 | 1.15x | 1.14x | 1.25x | | 8 | 1 | 1 | 1 | 1.15x | 1.14x | 1.20x | | 8 | 1 | 1 | 1 | 1.15x | 1.14x | 1.22x | | 8 | 1 | 1 | 2 | 1.05x | 0.99x | 0.78x | | 8 | 1 | 2 | 1 | 1.05x | 1.00x | 0.78x | | 8 | 1 | 1 | 3 | 1.05x | 1.00x | 0.78x | | 8 | 2 | 0 | 0 | 1.13x | 1.17x | 1.20x | | 8 | 2 | 0 | 0 | 1.14x | 1.17x | 1.22x | | 8 | 2 | 0 | 0 | 1.14x | 1.19x | 1.21x | | 8 | 2 | 2 | 2 | 1.15x | 1.14x | 1.22x | | 8 | 2 | 2 | 2 | 1.15x | 1.14x | 1.22x | | 8 | 2 | 2 | 2 | 1.17x | 1.14x | 1.22x | | 8 | 2 | 2 | 4 | 1.04x | 1.00x | 1.06x | | 8 | 2 | 4 | 2 | 1.04x | 1.00x | 1.06x | | 8 | 2 | 2 | 6 | 1.04x | 1.00x | 0.95x | | 8 | 2 | 0 | 0 | 1.14x | 1.17x | 1.20x | | 8 | 2 | 0 | 0 | 1.16x | 1.19x | 1.21x | | 8 | 2 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 2 | 2 | 2 | 1.15x | 1.14x | 1.22x | | 8 | 2 | 2 | 2 | 1.15x | 1.14x | 1.22x | | 8 | 2 | 2 | 2 | 1.15x | 1.14x | 1.22x | | 8 | 2 | 2 | 4 | 1.04x | 1.00x | 1.06x | | 8 | 2 | 4 | 2 | 1.04x | 1.00x | 1.22x | | 8 | 2 | 2 | 6 | 1.04x | 1.00x | 0.95x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.22x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 3 | 3 | 3 | 1.15x | 1.15x | 1.22x | | 8 | 3 | 3 | 3 | 1.15x | 1.14x | 1.22x | | 8 | 3 | 3 | 3 | 1.15x | 1.13x | 1.22x | | 8 | 3 | 3 | 6 | 1.05x | 1.01x | 0.87x | | 8 | 3 | 6 | 3 | 0.99x | 1.00x | 0.88x | | 8 | 3 | 3 | 1 | 1.03x | 1.00x | 0.87x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 3 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 3 | 3 | 3 | 1.14x | 1.13x | 1.22x | | 8 | 3 | 3 | 3 | 1.15x | 1.15x | 1.22x | | 8 | 3 | 3 | 3 | 1.15x | 1.14x | 1.22x | | 8 | 3 | 3 | 6 | 1.04x | 1.00x | 1.08x | | 8 | 3 | 6 | 3 | 1.03x | 1.01x | 1.08x | | 8 | 3 | 3 | 1 | 1.03x | 1.00x | 1.09x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.22x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 4 | 4 | 4 | 1.14x | 1.14x | 1.10x | | 8 | 4 | 4 | 4 | 1.15x | 1.13x | 1.10x | | 8 | 4 | 4 | 4 | 1.15x | 1.14x | 1.10x | | 8 | 4 | 4 | 0 | 1.02x | 1.00x | 1.07x | | 8 | 4 | 8 | 4 | 1.03x | 0.99x | 1.08x | | 8 | 4 | 4 | 4 | 1.15x | 1.14x | 1.10x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.23x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.22x | | 8 | 4 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 4 | 4 | 4 | 1.13x | 1.14x | 1.11x | | 8 | 4 | 4 | 4 | 1.15x | 1.14x | 1.10x | | 8 | 4 | 4 | 4 | 1.15x | 1.14x | 1.10x | | 8 | 4 | 4 | 0 | 1.03x | 1.00x | 1.08x | | 8 | 4 | 8 | 4 | 1.03x | 1.00x | 1.08x | | 8 | 4 | 4 | 4 | 1.15x | 1.14x | 1.10x | | 8 | 5 | 0 | 0 | 1.14x | 1.17x | 1.22x | | 8 | 5 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 5 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 5 | 5 | 5 | 1.11x | 1.10x | 1.16x | | 8 | 5 | 5 | 5 | 1.12x | 1.11x | 1.17x | | 8 | 5 | 5 | 5 | 1.12x | 1.14x | 1.16x | | 8 | 5 | 5 | 2 | 1.03x | 1.00x | 1.07x | | 8 | 5 | 10 | 5 | 1.02x | 0.99x | 1.07x | | 8 | 5 | 5 | 7 | 1.03x | 1.00x | 1.07x | | 8 | 5 | 0 | 0 | 1.14x | 1.23x | 1.21x | | 8 | 5 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 5 | 0 | 0 | 1.12x | 1.17x | 1.22x | | 8 | 5 | 5 | 5 | 1.12x | 1.12x | 1.24x | | 8 | 5 | 5 | 5 | 1.12x | 1.10x | 1.16x | | 8 | 5 | 5 | 5 | 1.12x | 1.10x | 1.16x | | 8 | 5 | 5 | 2 | 1.02x | 0.99x | 1.07x | | 8 | 5 | 10 | 5 | 1.03x | 1.00x | 1.07x | | 8 | 5 | 5 | 7 | 1.03x | 1.01x | 1.07x | | 8 | 6 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 6 | 0 | 0 | 1.12x | 1.17x | 1.22x | | 8 | 6 | 0 | 0 | 1.14x | 1.17x | 1.20x | | 8 | 6 | 6 | 6 | 1.12x | 1.14x | 1.16x | | 8 | 6 | 6 | 6 | 1.12x | 1.14x | 1.09x | | 8 | 6 | 6 | 6 | 1.11x | 1.13x | 1.16x | | 8 | 6 | 6 | 4 | 1.03x | 1.00x | 1.06x | | 8 | 6 | 12 | 6 | 1.03x | 1.00x | 0.89x | | 8 | 6 | 6 | 2 | 1.03x | 1.00x | 0.89x | | 8 | 6 | 0 | 0 | 1.14x | 1.18x | 1.22x | | 8 | 6 | 0 | 0 | 1.14x | 1.15x | 1.21x | | 8 | 6 | 0 | 0 | 1.14x | 1.17x | 1.20x | | 8 | 6 | 6 | 6 | 1.12x | 1.10x | 1.16x | | 8 | 6 | 6 | 6 | 1.11x | 1.14x | 1.16x | | 8 | 6 | 6 | 6 | 1.12x | 1.11x | 1.24x | | 8 | 6 | 6 | 4 | 1.03x | 0.99x | 1.07x | | 8 | 6 | 12 | 6 | 1.03x | 1.00x | 1.07x | | 8 | 6 | 6 | 2 | 1.04x | 1.00x | 1.07x | | 8 | 7 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 7 | 0 | 0 | 1.14x | 1.18x | 1.21x | | 8 | 7 | 0 | 0 | 1.14x | 1.17x | 1.21x | | 8 | 7 | 7 | 7 | 1.13x | 1.10x | 1.09x | | 8 | 7 | 7 | 7 | 1.12x | 1.10x | 1.16x | | 8 | 7 | 7 | 7 | 1.12x | 1.14x | 1.09x | | 8 | 7 | 7 | 6 | 1.02x | 1.00x | 0.90x | | 8 | 7 | 14 | 7 | 1.03x | 0.99x | 1.02x | | 8 | 7 | 7 | 5 | 1.03x | 1.01x | 1.03x | | 8 | 7 | 0 | 0 | 1.14x | 1.23x | 1.22x | | 8 | 7 | 0 | 0 | 1.15x | 1.17x | 1.22x | | 8 | 7 | 0 | 0 | 1.14x | 1.16x | 1.20x | | 8 | 7 | 7 | 7 | 1.12x | 1.09x | 1.16x | | 8 | 7 | 7 | 7 | 1.12x | 1.11x | 1.09x | | 8 | 7 | 7 | 7 | 1.12x | 1.14x | 1.16x | | 8 | 7 | 7 | 6 | 1.03x | 1.01x | 1.03x | | 8 | 7 | 14 | 7 | 1.03x | 1.00x | 1.02x | | 8 | 7 | 7 | 5 | 1.02x | 1.00x | 1.02x | | 8 | 8 | 0 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 0 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 0 | 0 | 1.14x | 1.17x | 1.12x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.12x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.12x | | 8 | 8 | 16 | 0 | 1.12x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 0 | 0 | 1.14x | 1.15x | 1.12x | | 8 | 8 | 0 | 0 | 1.14x | 1.17x | 1.12x | | 8 | 8 | 0 | 0 | 1.12x | 1.17x | 1.12x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.10x | | 8 | 8 | 8 | 0 | 1.12x | 1.17x | 1.10x | | 8 | 8 | 16 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 8 | 8 | 0 | 1.14x | 1.17x | 1.11x | | 8 | 9 | 0 | 0 | 1.10x | 1.11x | 1.16x | | 8 | 9 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 8 | 9 | 0 | 0 | 1.10x | 1.12x | 1.15x | | 8 | 9 | 9 | 1 | 1.12x | 1.10x | 1.16x | | 8 | 9 | 9 | 1 | 1.11x | 1.10x | 1.16x | | 8 | 9 | 9 | 1 | 1.12x | 1.10x | 1.16x | | 8 | 9 | 9 | 2 | 1.02x | 1.00x | 1.08x | | 8 | 9 | 18 | 1 | 1.02x | 1.00x | 1.00x | | 8 | 9 | 9 | 3 | 1.02x | 1.00x | 1.01x | | 8 | 9 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 9 | 0 | 0 | 1.11x | 1.09x | 1.15x | | 8 | 9 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 8 | 9 | 9 | 1 | 1.12x | 1.09x | 1.16x | | 8 | 9 | 9 | 1 | 1.13x | 1.10x | 1.16x | | 8 | 9 | 9 | 1 | 1.11x | 1.11x | 1.16x | | 8 | 9 | 9 | 2 | 1.02x | 1.00x | 1.00x | | 8 | 9 | 18 | 1 | 1.02x | 1.01x | 1.00x | | 8 | 9 | 9 | 3 | 1.02x | 1.00x | 1.00x | | 8 | 10 | 0 | 0 | 1.10x | 1.11x | 1.16x | | 8 | 10 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 10 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 8 | 10 | 10 | 2 | 1.12x | 1.14x | 1.16x | | 8 | 10 | 10 | 2 | 1.12x | 1.14x | 1.17x | | 8 | 10 | 10 | 2 | 1.12x | 1.13x | 1.16x | | 8 | 10 | 10 | 4 | 1.02x | 1.00x | 1.00x | | 8 | 10 | 20 | 2 | 1.02x | 0.99x | 1.00x | | 8 | 10 | 10 | 6 | 1.02x | 1.00x | 1.00x | | 8 | 10 | 0 | 0 | 1.09x | 1.18x | 1.15x | | 8 | 10 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 10 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 10 | 10 | 2 | 1.12x | 1.14x | 1.16x | | 8 | 10 | 10 | 2 | 1.12x | 1.14x | 1.16x | | 8 | 10 | 10 | 2 | 1.13x | 1.10x | 1.16x | | 8 | 10 | 10 | 4 | 1.02x | 1.00x | 1.00x | | 8 | 10 | 20 | 2 | 1.02x | 1.00x | 1.00x | | 8 | 10 | 10 | 6 | 1.03x | 1.00x | 1.00x | | 8 | 11 | 0 | 0 | 1.10x | 1.15x | 1.15x | | 8 | 11 | 0 | 0 | 1.09x | 1.10x | 1.15x | | 8 | 11 | 0 | 0 | 1.10x | 1.09x | 1.15x | | 8 | 11 | 11 | 3 | 1.12x | 1.14x | 1.16x | | 8 | 11 | 11 | 3 | 1.12x | 1.13x | 1.16x | | 8 | 11 | 11 | 3 | 1.12x | 1.13x | 1.16x | | 8 | 11 | 11 | 6 | 1.02x | 1.00x | 1.00x | | 8 | 11 | 22 | 3 | 1.02x | 1.01x | 1.00x | | 8 | 11 | 11 | 1 | 1.02x | 1.00x | 1.00x | | 8 | 11 | 0 | 0 | 1.10x | 1.16x | 1.03x | | 8 | 11 | 0 | 0 | 1.10x | 1.10x | 1.03x | | 8 | 11 | 0 | 0 | 1.09x | 1.10x | 1.15x | | 8 | 11 | 11 | 3 | 1.13x | 1.14x | 1.16x | | 8 | 11 | 11 | 3 | 1.12x | 1.10x | 1.16x | | 8 | 11 | 11 | 3 | 1.12x | 1.10x | 1.15x | | 8 | 11 | 11 | 6 | 1.03x | 0.99x | 0.99x | | 8 | 11 | 22 | 3 | 1.02x | 1.00x | 1.00x | | 8 | 11 | 11 | 1 | 1.02x | 0.99x | 0.99x | | 8 | 12 | 0 | 0 | 1.10x | 1.21x | 1.15x | | 8 | 12 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 12 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 12 | 12 | 4 | 1.13x | 1.10x | 1.07x | | 8 | 12 | 12 | 4 | 1.15x | 1.11x | 1.07x | | 8 | 12 | 12 | 4 | 1.15x | 1.10x | 1.01x | | 8 | 12 | 12 | 0 | 1.02x | 1.01x | 1.00x | | 8 | 12 | 24 | 4 | 1.02x | 1.00x | 1.00x | | 8 | 12 | 12 | 4 | 1.15x | 1.11x | 1.07x | | 8 | 12 | 0 | 0 | 1.10x | 1.15x | 1.15x | | 8 | 12 | 0 | 0 | 1.12x | 1.11x | 1.14x | | 8 | 12 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 8 | 12 | 12 | 4 | 1.15x | 1.09x | 1.07x | | 8 | 12 | 12 | 4 | 1.16x | 1.10x | 1.07x | | 8 | 12 | 12 | 4 | 1.15x | 1.10x | 1.07x | | 8 | 12 | 12 | 0 | 1.02x | 1.00x | 0.98x | | 8 | 12 | 24 | 4 | 1.02x | 1.00x | 1.00x | | 8 | 12 | 12 | 4 | 1.15x | 1.10x | 1.07x | | 8 | 13 | 0 | 0 | 1.10x | 1.21x | 1.15x | | 8 | 13 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 8 | 13 | 0 | 0 | 1.10x | 1.10x | 1.33x | | 8 | 13 | 13 | 5 | 1.06x | 1.08x | 1.07x | | 8 | 13 | 13 | 5 | 1.06x | 1.08x | 1.07x | | 8 | 13 | 13 | 5 | 1.06x | 1.08x | 1.07x | | 8 | 13 | 13 | 2 | 1.02x | 1.00x | 1.00x | | 8 | 13 | 26 | 5 | 1.02x | 1.00x | 1.00x | | 8 | 13 | 13 | 7 | 1.02x | 1.00x | 1.00x | | 8 | 13 | 0 | 0 | 1.10x | 1.12x | 1.04x | | 8 | 13 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 8 | 13 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 13 | 13 | 5 | 1.06x | 1.08x | 1.07x | | 8 | 13 | 13 | 5 | 1.06x | 1.08x | 1.07x | | 8 | 13 | 13 | 5 | 1.07x | 1.08x | 1.07x | | 8 | 13 | 13 | 2 | 1.02x | 1.00x | 1.01x | | 8 | 13 | 26 | 5 | 1.02x | 1.00x | 1.00x | | 8 | 13 | 13 | 7 | 1.02x | 1.00x | 1.00x | | 8 | 14 | 0 | 0 | 1.10x | 1.10x | 1.14x | | 8 | 14 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 14 | 0 | 0 | 1.11x | 1.09x | 1.16x | | 8 | 14 | 14 | 6 | 1.05x | 1.08x | 1.06x | | 8 | 14 | 14 | 6 | 1.06x | 1.08x | 1.07x | | 8 | 14 | 14 | 6 | 1.06x | 1.08x | 1.07x | | 8 | 14 | 14 | 4 | 1.02x | 1.01x | 1.00x | | 8 | 14 | 28 | 6 | 1.02x | 1.00x | 1.00x | | 8 | 14 | 14 | 2 | 1.03x | 1.01x | 1.08x | | 8 | 14 | 0 | 0 | 1.10x | 1.10x | 1.33x | | 8 | 14 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 8 | 14 | 0 | 0 | 1.11x | 1.10x | 1.04x | | 8 | 14 | 14 | 6 | 1.06x | 1.08x | 1.07x | | 8 | 14 | 14 | 6 | 1.03x | 1.08x | 1.07x | | 8 | 14 | 14 | 6 | 1.06x | 1.08x | 1.07x | | 8 | 14 | 14 | 4 | 1.02x | 0.99x | 1.00x | | 8 | 14 | 28 | 6 | 1.02x | 1.00x | 1.00x | | 8 | 14 | 14 | 2 | 1.02x | 0.99x | 0.96x | | 8 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 8 | 15 | 15 | 7 | 1.07x | 1.08x | 1.07x | | 8 | 15 | 15 | 7 | 1.06x | 1.08x | 1.06x | | 8 | 15 | 15 | 7 | 1.05x | 1.08x | 1.07x | | 8 | 15 | 15 | 6 | 1.02x | 1.00x | 1.08x | | 8 | 15 | 30 | 7 | 1.02x | 1.00x | 1.00x | | 8 | 15 | 15 | 5 | 1.01x | 1.00x | 1.00x | | 8 | 15 | 0 | 0 | 1.11x | 1.11x | 1.15x | | 8 | 15 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 8 | 15 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 8 | 15 | 15 | 7 | 1.06x | 1.07x | 1.07x | | 8 | 15 | 15 | 7 | 1.06x | 1.08x | 1.07x | | 8 | 15 | 15 | 7 | 1.06x | 1.08x | 1.07x | | 8 | 15 | 15 | 6 | 1.02x | 1.00x | 0.97x | | 8 | 15 | 30 | 7 | 1.02x | 1.00x | 1.00x | | 8 | 15 | 15 | 5 | 1.02x | 1.00x | 1.00x | | 16 | 32 | 0 | 0 | 1.02x | 1.09x | 1.02x | | 16 | 32 | 0 | 0 | 1.03x | 1.10x | 1.03x | | 16 | 32 | 0 | 0 | 1.03x | 1.08x | 1.04x | | 16 | 32 | 0 | 0 | 1.04x | 1.09x | 1.03x | | 16 | 32 | 0 | 0 | 1.03x | 1.09x | 1.03x | | 16 | 32 | 0 | 0 | 1.03x | 1.09x | 1.03x | | 16 | 32 | 7 | 2 | 1.15x | 0.99x | 0.85x | | 16 | 32 | 7 | 2 | 1.15x | 0.98x | 0.85x | | 16 | 32 | 2 | 1 | 1.02x | 0.98x | 0.86x | | 16 | 32 | 2 | 1 | 1.02x | 0.99x | 0.86x | | 32 | 64 | 0 | 0 | 1.03x | 0.97x | 0.99x | | 32 | 64 | 0 | 0 | 1.03x | 0.96x | 0.99x | | 32 | 64 | 0 | 0 | 1.03x | 0.96x | 0.99x | | 32 | 64 | 0 | 0 | 1.03x | 0.96x | 0.99x | | 32 | 64 | 0 | 0 | 1.03x | 0.97x | 0.99x | | 32 | 64 | 0 | 0 | 1.03x | 0.97x | 0.99x | | 32 | 64 | 6 | 4 | 1.15x | 0.93x | 0.81x | | 32 | 64 | 6 | 4 | 1.16x | 0.93x | 0.81x | | 32 | 64 | 4 | 2 | 0.94x | 0.94x | 0.81x | | 32 | 64 | 4 | 2 | 0.93x | 0.94x | 0.80x | | 64 | 128 | 0 | 0 | 1.02x | 0.96x | 0.99x | | 64 | 128 | 0 | 0 | 1.02x | 0.96x | 0.99x | | 64 | 128 | 0 | 0 | 1.02x | 0.96x | 0.99x | | 64 | 128 | 0 | 0 | 1.02x | 0.97x | 0.99x | | 64 | 128 | 0 | 0 | 1.02x | 0.96x | 1.00x | | 64 | 128 | 0 | 0 | 1.02x | 0.97x | 0.99x | | 64 | 128 | 5 | 6 | 0.86x | 0.83x | 0.78x | | 64 | 128 | 5 | 6 | 0.86x | 0.83x | 0.77x | | 64 | 128 | 6 | 3 | 1.00x | 0.84x | 0.80x | | 64 | 128 | 6 | 3 | 1.00x | 0.84x | 0.80x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 0 | 0 | 1.01x | 1.02x | 1.00x | | 128 | 256 | 4 | 0 | 0.79x | 0.82x | 0.79x | | 128 | 256 | 4 | 0 | 0.79x | 0.82x | 0.79x | | 128 | 256 | 8 | 4 | 0.76x | 0.81x | 0.75x | | 128 | 256 | 8 | 4 | 0.76x | 0.81x | 0.75x | | 256 | 512 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 256 | 512 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 256 | 512 | 0 | 0 | 1.21x | 1.01x | 1.00x | | 256 | 512 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 256 | 512 | 0 | 0 | 1.00x | 1.01x | 1.00x | | 256 | 512 | 0 | 0 | 1.19x | 1.02x | 1.00x | | 256 | 512 | 3 | 2 | 0.87x | 0.80x | 0.77x | | 256 | 512 | 3 | 2 | 0.87x | 0.80x | 0.77x | | 256 | 512 | 10 | 5 | 0.85x | 0.81x | 0.76x | | 256 | 512 | 10 | 5 | 0.85x | 0.81x | 0.76x | | 512 | 1024 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 512 | 1024 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 512 | 1024 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 512 | 1024 | 0 | 0 | 1.02x | 1.01x | 1.00x | | 512 | 1024 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 512 | 1024 | 0 | 0 | 1.01x | 1.01x | 1.00x | | 512 | 1024 | 2 | 4 | 0.79x | 0.79x | 0.75x | | 512 | 1024 | 2 | 4 | 0.79x | 0.79x | 0.75x | | 512 | 1024 | 12 | 6 | 0.79x | 0.78x | 0.75x | | 512 | 1024 | 12 | 6 | 0.79x | 0.78x | 0.75x | | 1024 | 2048 | 0 | 0 | 1.01x | 1.00x | 1.00x | | 1024 | 2048 | 0 | 0 | 1.01x | 1.00x | 1.00x | | 1024 | 2048 | 0 | 0 | 1.01x | 1.00x | 1.00x | | 1024 | 2048 | 0 | 0 | 1.00x | 1.01x | 1.00x | | 1024 | 2048 | 0 | 0 | 1.01x | 1.00x | 1.00x | | 1024 | 2048 | 0 | 0 | 1.01x | 1.00x | 1.00x | | 1024 | 2048 | 1 | 6 | 0.73x | 0.78x | 0.74x | | 1024 | 2048 | 1 | 6 | 0.73x | 0.78x | 0.74x | | 1024 | 2048 | 14 | 7 | 0.74x | 0.78x | 0.74x | | 1024 | 2048 | 14 | 7 | 0.74x | 0.78x | 0.74x | | 21 | 20 | 4 | 0 | 1.12x | 1.01x | 0.91x | | 21 | 20 | 0 | 4 | 0.89x | 0.81x | 0.76x | | 25 | 24 | 8 | 0 | 1.12x | 1.11x | 1.03x | | 25 | 24 | 0 | 8 | 1.12x | 1.10x | 1.03x | | 17 | 16 | 0 | 0 | 1.13x | 1.11x | 1.12x | | 17 | 16 | 0 | 0 | 1.13x | 1.10x | 1.11x | | 15 | 16 | 0 | 0 | 1.13x | 1.10x | 1.12x | | 15 | 16 | 0 | 0 | 1.13x | 1.10x | 1.12x | | 15 | 16 | 0 | 0 | 1.13x | 1.09x | 1.11x | | 15 | 16 | 0 | 0 | 1.14x | 1.10x | 1.11x | | 15 | 16 | 0 | 0 | 1.12x | 1.10x | 1.12x | | 15 | 16 | 0 | 0 | 1.13x | 1.11x | 1.11x | | 16 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 16 | 15 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 14 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 14 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 14 | 15 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 14 | 15 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 14 | 15 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 14 | 15 | 0 | 0 | 1.10x | 1.09x | 1.16x | | 15 | 14 | 0 | 0 | 1.10x | 1.11x | 1.16x | | 15 | 14 | 0 | 0 | 1.10x | 1.09x | 1.15x | | 13 | 14 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 13 | 14 | 0 | 0 | 1.10x | 1.09x | 1.15x | | 13 | 14 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 13 | 14 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 13 | 14 | 0 | 0 | 1.08x | 1.10x | 1.20x | | 13 | 14 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 14 | 13 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 14 | 13 | 0 | 0 | 1.10x | 1.10x | 1.03x | | 12 | 13 | 0 | 0 | 1.10x | 1.10x | 1.02x | | 12 | 13 | 0 | 0 | 1.07x | 1.10x | 1.02x | | 12 | 13 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 12 | 13 | 0 | 0 | 1.10x | 1.10x | 1.33x | | 12 | 13 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 12 | 13 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 13 | 12 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 13 | 12 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 11 | 12 | 0 | 0 | 1.10x | 1.10x | 1.03x | | 11 | 12 | 0 | 0 | 1.10x | 1.11x | 1.04x | | 11 | 12 | 0 | 0 | 1.10x | 1.10x | 1.04x | | 11 | 12 | 0 | 0 | 1.10x | 1.11x | 1.03x | | 11 | 12 | 0 | 0 | 1.10x | 1.10x | 1.02x | | 11 | 12 | 0 | 0 | 1.09x | 1.11x | 1.14x | | 12 | 11 | 0 | 0 | 1.10x | 1.10x | 1.14x | | 12 | 11 | 0 | 0 | 1.10x | 1.11x | 1.15x | | 10 | 11 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 10 | 11 | 0 | 0 | 1.10x | 1.09x | 1.15x | | 10 | 11 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 10 | 11 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 10 | 11 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 10 | 11 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 11 | 10 | 0 | 0 | 1.10x | 1.10x | 1.15x | | 11 | 10 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 9 | 10 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 9 | 10 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 9 | 10 | 0 | 0 | 1.09x | 1.16x | 1.15x | | 9 | 10 | 0 | 0 | 1.11x | 1.10x | 1.03x | | 9 | 10 | 0 | 0 | 1.10x | 1.09x | 1.04x | | 9 | 10 | 0 | 0 | 1.10x | 1.10x | 1.03x | | 10 | 9 | 0 | 0 | 1.10x | 1.11x | 1.33x | | 10 | 9 | 0 | 0 | 1.10x | 1.10x | 1.16x | | 8 | 9 | 0 | 0 | 1.10x | 1.11x | 1.14x | | 8 | 9 | 0 | 0 | 1.09x | 1.16x | 1.03x | | 8 | 9 | 0 | 0 | 1.10x | 1.10x | 1.03x | | 8 | 9 | 0 | 0 | 1.10x | 1.10x | 1.04x | | 8 | 9 | 0 | 0 | 1.10x | 1.16x | 1.15x | | 8 | 9 | 0 | 0 | 1.12x | 1.09x | 1.15x | This patch passes the tests with no regressions. 8< --- 8< --- 8< Add support for MTE to strncmp. Regression tested with xcheck and benchmarked with glibc's benchtests on the Cortex-A53, Cortex-A72, and Neoverse N1. The existing implementation assumes that any access to the pages in which the string resides is safe. This assumption is not true when MTE is enabled. This patch updates the algorithm to ensure that accesses remain within the bounds of an MTE tag (16-byte chunks) and improves overall performance. Co-authored-by: Branislav Rankov Co-authored-by: Wilco Dijkstra From 4d1a6e729916032287291a28eeb7f8538bb918c7 Mon Sep 17 00:00:00 2001 From: Alex Butler Date: Thu, 28 May 2020 14:07:22 +0100 Subject: [PATCH] aarch64: add MTE compatible strncmp --- sysdeps/aarch64/strncmp.S | 244 +++++++++++++++++++++++++++------------------- 1 file changed, 145 insertions(+), 99 deletions(-) diff --git a/sysdeps/aarch64/strncmp.S b/sysdeps/aarch64/strncmp.S index c5141fa..ba25634 100644 --- a/sysdeps/aarch64/strncmp.S +++ b/sysdeps/aarch64/strncmp.S @@ -25,7 +25,6 @@ #define REP8_01 0x0101010101010101 #define REP8_7f 0x7f7f7f7f7f7f7f7f -#define REP8_80 0x8080808080808080 /* Parameters and result. */ #define src1 x0 @@ -46,15 +45,31 @@ #define tmp3 x10 #define zeroones x11 #define pos x12 -#define limit_wd x13 -#define mask x14 -#define endloop x15 +#define mask x13 +#define endloop x14 #define count mask +#define offset pos +#define neg_offset x15 -ENTRY_ALIGN_AND_PAD (strncmp, 6, 7) - DELOUSE (0) - DELOUSE (1) - DELOUSE (2) +/* Define endian dependent shift operations. + On big-endian early bytes are at MSB and on little-endian LSB. + LS_FW means shifting towards early bytes. + LS_BK means shifting towards later bytes. + */ +#ifdef __AARCH64EB__ +#define LS_FW lsl +#define LS_BK lsr +#else +#define LS_FW lsr +#define LS_BK lsl +#endif + + .text + .p2align 6 + .rep 9 + nop /* Pad so that the loop below fits a cache line. */ + .endr +ENTRY_ALIGN (strncmp, 0) cbz limit, L(ret0) eor tmp1, src1, src2 mov zeroones, #REP8_01 @@ -62,9 +77,6 @@ ENTRY_ALIGN_AND_PAD (strncmp, 6, 7) and count, src1, #7 b.ne L(misaligned8) cbnz count, L(mutual_align) - /* Calculate the number of full and partial words -1. */ - sub limit_wd, limit, #1 /* limit != 0, so no underflow. */ - lsr limit_wd, limit_wd, #3 /* Convert to Dwords. */ /* NUL detection works on the principle that (X - 1) & (~X) & 0x80 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and @@ -74,56 +86,52 @@ L(loop_aligned): ldr data1, [src1], #8 ldr data2, [src2], #8 L(start_realigned): - subs limit_wd, limit_wd, #1 + subs limit, limit, #8 sub tmp1, data1, zeroones orr tmp2, data1, #REP8_7f eor diff, data1, data2 /* Non-zero if differences found. */ - csinv endloop, diff, xzr, pl /* Last Dword or differences. */ + csinv endloop, diff, xzr, hi /* Last Dword or differences. */ bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ ccmp endloop, #0, #0, eq b.eq L(loop_aligned) /* End of performance-critical section -- one 64B cache line. */ - /* Not reached the limit, must have found the end or a diff. */ - tbz limit_wd, #63, L(not_limit) - - /* Limit % 8 == 0 => all bytes significant. */ - ands limit, limit, #7 - b.eq L(not_limit) - - lsl limit, limit, #3 /* Bits -> bytes. */ - mov mask, #~0 -#ifdef __AARCH64EB__ - lsr mask, mask, limit -#else - lsl mask, mask, limit -#endif - bic data1, data1, mask - bic data2, data2, mask - - /* Make sure that the NUL byte is marked in the syndrome. */ - orr has_nul, has_nul, mask - -L(not_limit): +L(full_check): +#ifndef __AARCH64EB__ orr syndrome, diff, has_nul - -#ifndef __AARCH64EB__ + add limit, limit, 8 /* Rewind limit to before last subs. */ +L(syndrome_check): + /* Limit was reached. Check if the NUL byte or the difference + is before the limit. */ rev syndrome, syndrome rev data1, data1 - /* The MS-non-zero bit of the syndrome marks either the first bit - that is different, or the top bit of the first zero byte. - Shifting left now will bring the critical information into the - top bits. */ clz pos, syndrome rev data2, data2 lsl data1, data1, pos + cmp limit, pos, lsr #3 lsl data2, data2, pos /* But we need to zero-extend (char is unsigned) the value and then perform a signed 32-bit subtraction. */ lsr data1, data1, #56 sub result, data1, data2, lsr #56 - RET + csel result, result, xzr, hi + ret #else + /* Not reached the limit, must have found the end or a diff. */ + tbz limit, #63, L(not_limit) + add tmp1, limit, 8 + cbz limit, L(not_limit) + + lsl limit, tmp1, #3 /* Bits -> bytes. */ + mov mask, #~0 + lsr mask, mask, limit + bic data1, data1, mask + bic data2, data2, mask + + /* Make sure that the NUL byte is marked in the syndrome. */ + orr has_nul, has_nul, mask + +L(not_limit): /* For big-endian we cannot use the trick with the syndrome value as carry-propagation can corrupt the upper bits if the trailing bytes in the string contain 0x01. */ @@ -134,7 +142,7 @@ L(not_limit): cmp data1, data2 cset result, ne cneg result, result, lo - RET + ret 1: /* Re-compute the NUL-byte detection, using a byte-reversed value. */ rev tmp3, data1 @@ -144,17 +152,18 @@ L(not_limit): rev has_nul, has_nul orr syndrome, diff, has_nul clz pos, syndrome - /* The MS-non-zero bit of the syndrome marks either the first bit - that is different, or the top bit of the first zero byte. + /* The most-significant-non-zero bit of the syndrome marks either the + first bit that is different, or the top bit of the first zero byte. Shifting left now will bring the critical information into the top bits. */ +L(end_quick): lsl data1, data1, pos lsl data2, data2, pos /* But we need to zero-extend (char is unsigned) the value and then perform a signed 32-bit subtraction. */ lsr data1, data1, #56 sub result, data1, data2, lsr #56 - RET + ret #endif L(mutual_align): @@ -169,22 +178,12 @@ L(mutual_align): neg tmp3, count, lsl #3 /* 64 - bits(bytes beyond align). */ ldr data2, [src2], #8 mov tmp2, #~0 - sub limit_wd, limit, #1 /* limit != 0, so no underflow. */ -#ifdef __AARCH64EB__ - /* Big-endian. Early bytes are at MSB. */ - lsl tmp2, tmp2, tmp3 /* Shift (count & 63). */ -#else - /* Little-endian. Early bytes are at LSB. */ - lsr tmp2, tmp2, tmp3 /* Shift (count & 63). */ -#endif - and tmp3, limit_wd, #7 - lsr limit_wd, limit_wd, #3 - /* Adjust the limit. Only low 3 bits used, so overflow irrelevant. */ - add limit, limit, count - add tmp3, tmp3, count + LS_FW tmp2, tmp2, tmp3 /* Shift (count & 63). */ + /* Adjust the limit and ensure it doesn't overflow. */ + adds limit, limit, count + csinv limit, limit, xzr, lo orr data1, data1, tmp2 orr data2, data2, tmp2 - add limit_wd, limit_wd, tmp3, lsr #3 b L(start_realigned) .p2align 6 @@ -203,18 +202,15 @@ L(byte_loop): b.eq L(byte_loop) L(done): sub result, data1, data2 - RET - + ret /* Align the SRC1 to a dword by doing a bytewise compare and then do the dword loop. */ L(try_misaligned_words): - lsr limit_wd, limit, #3 - cbz count, L(do_misaligned) + cbz count, L(src1_aligned) neg count, count and count, count, #7 sub limit, limit, count - lsr limit_wd, limit, #3 L(page_end_loop): ldrb data1w, [src1], #1 @@ -225,48 +221,98 @@ L(page_end_loop): subs count, count, #1 b.hi L(page_end_loop) -L(do_misaligned): - /* Prepare ourselves for the next page crossing. Unlike the aligned - loop, we fetch 1 less dword because we risk crossing bounds on - SRC2. */ - mov count, #8 - subs limit_wd, limit_wd, #1 - b.lo L(done_loop) + /* The following diagram explains the comparison of misaligned strings. + The bytes are shown in natural order. For little-endian, it is + reversed in the registers. The "x" bytes are before the string. + The "|" separates data that is loaded at one time. + src1 | a a a a a a a a | b b b c c c c c | . . . + src2 | x x x x x a a a a a a a a b b b | c c c c c . . . + After shifting in each step, the data looks like this: + STEP_A STEP_B STEP_C + data1 a a a a a a a a b b b c c c c c b b b c c c c c + data2 a a a a a a a a b b b 0 0 0 0 0 0 0 0 c c c c c + The bytes with "0" are eliminated from the syndrome via mask. + Align SRC2 down to 16 bytes. This way we can read 16 bytes at a + time from SRC2. The comparison happens in 3 steps. After each step + the loop can exit, or read from SRC1 or SRC2. */ +L(src1_aligned): + /* Calculate offset from 8 byte alignment to string start in bits. No + need to mask offset since shifts are ignoring upper bits. */ + lsl offset, src2, #3 + bic src2, src2, #0xf + mov mask, -1 + neg neg_offset, offset + ldr data1, [src1], #8 + ldp tmp1, tmp2, [src2], #16 + LS_BK mask, mask, neg_offset + and neg_offset, neg_offset, #63 /* Need actual value for cmp later. */ + /* Skip the first compare if data in tmp1 is irrelevant. */ + tbnz offset, 6, L(misaligned_mid_loop) + L(loop_misaligned): - and tmp2, src2, #0xff8 - eor tmp2, tmp2, #0xff8 - cbz tmp2, L(page_end_loop) + /* STEP_A: Compare full 8 bytes when there is enough data from SRC2.*/ + LS_FW data2, tmp1, offset + LS_BK tmp1, tmp2, neg_offset + subs limit, limit, #8 + orr data2, data2, tmp1 /* 8 bytes from SRC2 combined from two regs.*/ + sub has_nul, data1, zeroones + eor diff, data1, data2 /* Non-zero if differences found. */ + orr tmp3, data1, #REP8_7f + csinv endloop, diff, xzr, hi /* If limit, set to all ones. */ + bic has_nul, has_nul, tmp3 /* Non-zero if NUL byte found in SRC1. */ + orr tmp3, endloop, has_nul + cbnz tmp3, L(full_check) ldr data1, [src1], #8 - ldr data2, [src2], #8 - sub tmp1, data1, zeroones - orr tmp2, data1, #REP8_7f - eor diff, data1, data2 /* Non-zero if differences found. */ - bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ - ccmp diff, #0, #0, eq - b.ne L(not_limit) - subs limit_wd, limit_wd, #1 - b.pl L(loop_misaligned) +L(misaligned_mid_loop): + /* STEP_B: Compare first part of data1 to second part of tmp2. */ + LS_FW data2, tmp2, offset +#ifdef __AARCH64EB__ + /* For big-endian we do a byte reverse to avoid carry-propagation + problem described above. This way we can reuse the has_nul in the + next step and also use syndrome value trick at the end. */ + rev tmp3, data1 + #define data1_fixed tmp3 +#else + #define data1_fixed data1 +#endif + sub has_nul, data1_fixed, zeroones + orr tmp3, data1_fixed, #REP8_7f + eor diff, data2, data1 /* Non-zero if differences found. */ + bic has_nul, has_nul, tmp3 /* Non-zero if NUL terminator. */ +#ifdef __AARCH64EB__ + rev has_nul, has_nul +#endif + cmp limit, neg_offset, lsr #3 + orr syndrome, diff, has_nul + bic syndrome, syndrome, mask /* Ignore later bytes. */ + csinv tmp3, syndrome, xzr, hi /* If limit, set to all ones. */ + cbnz tmp3, L(syndrome_check) -L(done_loop): - /* We found a difference or a NULL before the limit was reached. */ - and limit, limit, #7 - cbz limit, L(not_limit) - /* Read the last word. */ - sub src1, src1, 8 - sub src2, src2, 8 - ldr data1, [src1, limit] - ldr data2, [src2, limit] - sub tmp1, data1, zeroones - orr tmp2, data1, #REP8_7f - eor diff, data1, data2 /* Non-zero if differences found. */ - bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ - ccmp diff, #0, #0, eq - b.ne L(not_limit) + /* STEP_C: Compare second part of data1 to first part of tmp1. */ + ldp tmp1, tmp2, [src2], #16 + cmp limit, #8 + LS_BK data2, tmp1, neg_offset + eor diff, data2, data1 /* Non-zero if differences found. */ + orr syndrome, diff, has_nul + and syndrome, syndrome, mask /* Ignore earlier bytes. */ + csinv tmp3, syndrome, xzr, hi /* If limit, set to all ones. */ + cbnz tmp3, L(syndrome_check) + + ldr data1, [src1], #8 + sub limit, limit, #8 + b L(loop_misaligned) + +#ifdef __AARCH64EB__ +L(syndrome_check): + clz pos, syndrome + cmp pos, limit, lsl #3 + b.lo L(end_quick) +#endif L(ret0): mov result, #0 - RET + ret END (strncmp) libc_hidden_builtin_def (strncmp) -- 2.7.4