From patchwork Thu Oct 29 08:39:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1389958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=U2Ktoaf4; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMJlm6VWlz9sSP for ; Thu, 29 Oct 2020 19:39:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 34D25385EC58; Thu, 29 Oct 2020 08:39:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34D25385EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603960785; bh=HlUeCHPeuJT3VZ4UWmpIReJh7LExjJvzAcCGeo2qSM4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=U2Ktoaf4uXe6MMxnS7uJJJs9ManOyEB+JlHHoxDcdvUPEFd6VazuZgU6nX9ATgk9g VM+1ZyjTCVTxGdCuuLE4FzUzs9BZHqqqba/QaLV4Q4ef7Qza2sKkurWn3Hf2Aas5V5 AkTkip6432L5O9vg2MQESTf62v0cftJLpEP35Du0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2084.outbound.protection.outlook.com [40.107.21.84]) by sourceware.org (Postfix) with ESMTPS id 1DBAA3951C10 for ; Thu, 29 Oct 2020 08:39:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1DBAA3951C10 Received: from AM5P194CA0014.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::24) by VE1PR08MB5280.eurprd08.prod.outlook.com (2603:10a6:803:10d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Thu, 29 Oct 2020 08:39:38 +0000 Received: from VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:8f:cafe::31) by AM5P194CA0014.outlook.office365.com (2603:10a6:203:8f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Thu, 29 Oct 2020 08:39:38 +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=pass 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 VE1EUR03FT005.mail.protection.outlook.com (10.152.18.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15 via Frontend Transport; Thu, 29 Oct 2020 08:39:37 +0000 Received: ("Tessian outbound 7c188528bfe0:v64"); Thu, 29 Oct 2020 08:39:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 839dc5c16b44b4ad X-CR-MTA-TID: 64aa7808 Received: from c25168078383.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A1BDC28F-C23D-473D-8A2A-733023F796A0.1; Thu, 29 Oct 2020 08:39:31 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c25168078383.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 29 Oct 2020 08:39:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuIVnVc8UGBXuCxNrs1uovF1ZgVJrNAyqG3eEwuwB8/m9zHojNFrLzMWX302dcGBgoN357H1NyrrOIoG0eIWy61wgsLrBqF46wmlaHqAiZOws/enTOaKzHCH35YKalWWILPoYCu85hSwObPe28npKgIEVRRK8+mdUIheahRgyK2m2muvcW6VCmx9YoRLnA8MB4KFG8MB3HmGgtZzKz1iIjbo6tvi/sPbzx/oKNrGlioJCaSg1dH0cDgdEW1V7sDrhGygDgZ/MH7lrQGml6uewpWmx5HKWYVxYSMtH7OteHPA9U9y/eBHTzfdX2Vxczy82xy99gmureR8fMNQjvKZGA== 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=HlUeCHPeuJT3VZ4UWmpIReJh7LExjJvzAcCGeo2qSM4=; b=N8JkFYktmQAYMJzouq/LHDJkZdep9MRieWevXis6+VvSPtSw1NH+G09ihLzcJSm3HncXDkPMt7bWD0PE+MiGFdwrDbNOKSrEkHVdtjcZdvbM6/mCX4Z/BtaGYrhZcZXUS05AZP6xBNQfYKLFu0wNroVajmPXbcYCa4ZvfNeTNXYxm+4Bels7xfufIgrg7GSguxhxsyzRyscnzEBuZ1J7acIi5y8dN93ZhpbnT1GB1PneJ2FX6ENorEpFPbf8To0MwQJKiPcnb8C1i7VS0LO76EHW2gybJNm7VT6Q80crFa65EZ46VaM9NrI09QmovJKu1zlYRshTZKYEmoiz4d4fTw== 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 Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PR3PR08MB5611.eurprd08.prod.outlook.com (2603:10a6:102:85::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19; Thu, 29 Oct 2020 08:39:30 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792%3]) with mapi id 15.20.3499.024; Thu, 29 Oct 2020 08:39:30 +0000 To: libc-alpha@sourceware.org Subject: [PATCH 1/2] aarch64: Fix DT_AARCH64_VARIANT_PCS handling [BZ #26798] Date: Thu, 29 Oct 2020 08:39:22 +0000 Message-Id: <4524a344b42edc9df4f732d3d3f4f09878d3c6a1.1603909005.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0090.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::30) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.54) by LO2P265CA0090.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Thu, 29 Oct 2020 08:39:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4e263cbf-698d-4329-68ad-08d87be62bc4 X-MS-TrafficTypeDiagnostic: PR3PR08MB5611:|VE1PR08MB5280: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fO0LdWBsXSdZU+FKKkV+8PFM4Z0Rz1ZbApKNkXNJGDNOnMiNU0Oavn03b68qMkylZQ4hoa7WR67yrU/ADGrcGtsY8Tl2QoO970LIllr5YIzU7tPrzqpNiT72r1LBFf/Xw2ReMji8Sc6p9T891GdVJQMqSjpPZjCDZ9k/2pNna9u9aYlgmNiX9GWgVcs4qlHwkjqJ1ukz5yFdJzRDyddVl3fxshOUd+G6XKaQP0POyYw7OC+JPGddmCdzal8UqCvez+3ejANYsD41zdFXjlDStwsiPBBx7eDxb0iFqrfooE61yGp9hKVTdxiAYGWY4xtP6QSPE/2yMOiZ0ON5BSpGCmvc7bq+pyxxKME0G0+825EKN37ODLyBRBz9NaSm9o0F X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(366004)(6916009)(6666004)(316002)(2906002)(83380400001)(5660300002)(86362001)(6512007)(36756003)(478600001)(44832011)(8676002)(66946007)(66556008)(66476007)(8936002)(6486002)(956004)(2616005)(52116002)(186003)(6506007)(69590400008)(26005)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: a4XyBsOfOfqlAjEs6GyzaCp/3MVGaZ5+rOvrvPgFGuBmK3XgA8BpZz5fEjP50Izsc5/Be6JayDpdCr6NbJqU+F8kINDFGIbMe2wMw3k3v652+/dQ72W7rdBh0+pcvedNrF8vok7i50oAfG+obrFjftPi9kjCOVkg5wC/6TjtYxB89iYmh23HHMGqixYUFw7Pz6IuJM5EDM8K+cvk+8FCdtMkRbVW7ALMcmU4thQg7W9o4Q1rW9gpcbUUfhDtAKTqPmiIQPgTCnxgGPK/FIrQApfLNcN8BA9FGiFY+pfL8zRgx7WC3gfMT8BQRpVGSkCV3Wxnv2i8586d74+hoOdbps80wpMR3vzg7r01zgSAHoMja+0Qm/88Ja8TFArFZF5Rmj3Jy00I38W4R8atsuzIR3F2RbWpFgglqJbiM2VHp9hkwG26/nwWlsSjZrUCZ3cRAA1+t9DkM3CHBBfI54RWDAJrbxHVLUG3dUkDJ81FUTEFVc+PkjO6qBw/7MjsxYwRwv7YqFTit+2zHAr5JLtjfSecuGc9VHttlj5wm5urhqPnHzuyE4AOmeYmZdIyG2Q0SYRKYvxamir3V1B7Q1NYYWuYKaBOP+VX3pZwQmCk9enPYsk6JLEoepRpiKf9W4GpdV+VRpCnKxtOewKNS3DO1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5611 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: VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6068370a-cb83-48de-b226-08d87be62742 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NA0BBMZXdB1pv9FWafvWcMH5ci1MHUDkmHmF082R+dwvK/mDcFLHoDSE+d/kXbGzJv/GWVoh50bqjvENuerDOVMbejOe5lMi9hFOycVVC4QiJ3tVtw1nZ6tvSmkUzorn7/NsYdqiPuZq3BFDIp1i3RhmaLKVLLV6IRvnrSOlYaM49xhraHdhKE1YMEXIO0eP7gkNH/zs2Q6w5hl0IGr10vRjouqEYPZZ9kIZRAZX0qeMrVuaERhfUNmdVbdd4VNWHh1UbDW8Zx/CzWrE+4+xD5hQr3xoi0aT2TG03lQ5J/Oem49sRLdxV1hChFUr0e5/VWp7zP5lvAvHJkkVc8gT66NxPl7zya5oPmq+XofE1DYtVNipq9m07dMv6ZU4A3CmUTnmYXJkybjAelttvoKShDXfUE9YmzhesrvFuxdcPM7pS+uCmTZMx/krvnlepGGe 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; SFS:(4636009)(136003)(39860400002)(346002)(396003)(376002)(46966005)(8936002)(16526019)(44832011)(956004)(8676002)(2616005)(6512007)(36756003)(316002)(26005)(82740400003)(356005)(81166007)(82310400003)(336012)(47076004)(186003)(83380400001)(69590400008)(6486002)(478600001)(6666004)(2906002)(5660300002)(86362001)(36906005)(6506007)(70206006)(70586007)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2020 08:39:37.8802 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e263cbf-698d-4329-68ad-08d87be62bc4 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-AuthSource: VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5280 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, 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: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The variant PCS support was ineffective because in the common case linkmap->l_mach.plt == 0 but then the symbol table flags were ignored and normal lazy binding was used instead of resolving the relocs early. (This was a misunderstanding about how GOT[1] is setup by the linker.) In practice this mainly affects SVE calls when the vector length is more than 128 bits, then the top bits of the argument registers get clobbered during lazy binding. Fixes bug 26798. --- sysdeps/aarch64/dl-machine.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h index 70b9ed3925..fde7cfd9e2 100644 --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -395,13 +395,6 @@ elf_machine_lazy_rel (struct link_map *map, /* Check for unexpected PLT reloc type. */ if (__builtin_expect (r_type == AARCH64_R(JUMP_SLOT), 1)) { - if (map->l_mach.plt == 0) - { - /* Prelinking. */ - *reloc_addr += l_addr; - return; - } - if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL)) { /* Check the symbol table for variant PCS symbols. */ @@ -425,7 +418,10 @@ elf_machine_lazy_rel (struct link_map *map, } } - *reloc_addr = map->l_mach.plt; + if (map->l_mach.plt == 0) + *reloc_addr += l_addr; + else + *reloc_addr = map->l_mach.plt; } else if (__builtin_expect (r_type == AARCH64_R(TLSDESC), 1)) { From patchwork Thu Oct 29 08:39:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1389961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=M0Wuz+3k; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMJm04QmMz9sSP for ; Thu, 29 Oct 2020 19:40:00 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 554A73985400; Thu, 29 Oct 2020 08:39:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 554A73985400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603960787; bh=5Kne+4q5vKxnmyCoR7bWKslduMxBE/zoZxCxkO12HDg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=M0Wuz+3ktwxSfMttjspJZxhShacSDybxRI0Fs8pcI3cxhCtWRK08Rsw98mwGR0MjL EVCDiStJvIhDMflplSAgAAR2Dht2ZFdAQ6Dq4lfcxmDDfm6z2XU8wrhBBZav8+23px cbFaSq/oSUAE7BvhXtuY6n9h8sbOl+SfJY4umVfQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130070.outbound.protection.outlook.com [40.107.13.70]) by sourceware.org (Postfix) with ESMTPS id E221A3854810 for ; Thu, 29 Oct 2020 08:39:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E221A3854810 Received: from AM5PR0701CA0003.eurprd07.prod.outlook.com (2603:10a6:203:51::13) by AM0PR08MB3699.eurprd08.prod.outlook.com (2603:10a6:208:10c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Thu, 29 Oct 2020 08:39:38 +0000 Received: from AM5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::74) by AM5PR0701CA0003.outlook.office365.com (2603:10a6:203:51::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.11 via Frontend Transport; Thu, 29 Oct 2020 08:39:38 +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=pass 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 AM5EUR03FT057.mail.protection.outlook.com (10.152.17.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15 via Frontend Transport; Thu, 29 Oct 2020 08:39:38 +0000 Received: ("Tessian outbound 7c188528bfe0:v64"); Thu, 29 Oct 2020 08:39:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c914f13c2493209f X-CR-MTA-TID: 64aa7808 Received: from 159bf4683a33.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9271C231-7E86-468C-8545-BEC9A0F69C6F.1; Thu, 29 Oct 2020 08:39:31 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 159bf4683a33.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 29 Oct 2020 08:39:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OdEVEFdFGg35OJkOy+SPaTPGUpkyKBExH5CMJKt4/XnMqj/tTAT69bFNfYq5CsQoBdbvckWxdKWwOTqtbB3ncmKpHZwceHZQ0urkjksrY8Hjvx+3X9uUBnsKftUoxP+jqJkQprKh3ErBVwwmBsy/mbBHo6Uf1PcPchCIpgnkBquc+0IOBTZxWpe6YKVGDPdxg5xFVrkdvIl/u3545b72alu41Dp9G/wYthmAJn9jZeIvLJ0QDpgxC5QAzeeD8WHmn+Oom3dJ/ARanz+tJ7UY605kVy5/S0rDlcMhAbMK6wwQnMedRY/ldvY4TXwRnGPxeSheZbpJlPKzFUh5Vl6WNA== 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=5Kne+4q5vKxnmyCoR7bWKslduMxBE/zoZxCxkO12HDg=; b=Buxeyn2O/25eAWtHu6NNJwZYDIIYfPsD+1boozvomp+sfs7PtpI6L4HIJzWJYifTTmtdoJ6wquacJ16d/wLCc9lLvExUzAs4NlzPm9FKaK/L4QTpBxgOvumYosOi2MjPr10cIRgoU5Lzksl+cPhprTY1yiwoeLQ7UMttnd+3SUdP5hUvBkTZEYyhQSyrM06dY+Bc9Bb8FqJOvgoP0CZ11Ks/tNesM6AtHKkCgjP1ixQA/1qo2Hj971rkrX1SJDYhU95WQvur9eXvK279n1zR1Ofz2jHuKOoU3G1/pX1Yo4WmyJ8h9NQtu+myBc4HqaEMniUVRMlNThPFKKbPZQatsw== 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 Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PR3PR08MB5611.eurprd08.prod.outlook.com (2603:10a6:102:85::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19; Thu, 29 Oct 2020 08:39:31 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792%3]) with mapi id 15.20.3499.024; Thu, 29 Oct 2020 08:39:31 +0000 To: libc-alpha@sourceware.org Subject: [PATCH 2/2] aarch64: Add variant PCS lazy binding test [BZ #26798] Date: Thu, 29 Oct 2020 08:39:23 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0090.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::30) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.54) by LO2P265CA0090.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Thu, 29 Oct 2020 08:39:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7aaf6a97-d97a-4b96-397c-08d87be62bd5 X-MS-TrafficTypeDiagnostic: PR3PR08MB5611:|AM0PR08MB3699: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: U38PP11dJC1Ar5EE58tM0yiid6mzE3U9d+dRS3qsqi1ZPWfwfjeqli4p/Set2QFmVU13VFA4k/nFYXpX5xz8613Vjz7e9m/ZzxWqT4jV6Q6C4uD12jQBT1/x0jJvGXsubwsftqzfh1uBJW+hTeNFaJNl0DTkGmYpdAZU/okEUQWGe59l0Vb7FmXIZ5VVkBZzewrymZTjUUzverucEY6cGnljs5axDI5AXZSyVsx9VuUaJigU+1JNlLTPCDViCnSNRkxVePZI6vOFZq4ZsCcpXUzl3h5odogp+f8Z4TRIeJ0BDfzWdQMkt0FI6WtLUOYH/L618r1MeH5/dksdtUDcXn5rB1jSbpWg1M53sFxOUjCgv54eetny7XAhDAL+BVlYCvAlybMyarH+BPeNtNKhWLmQe8kU6ba8ms0HvhR+p9U1MShFhFzNlzI3L0oIGeknVIabS9ev25m8QiGwuePetf/bsApVZTAqNi3KRmqJm5U= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(366004)(6916009)(6666004)(316002)(2906002)(30864003)(83380400001)(5660300002)(86362001)(6512007)(36756003)(478600001)(44832011)(8676002)(66946007)(66556008)(66476007)(8936002)(6486002)(956004)(2616005)(52116002)(186003)(6506007)(69590400008)(26005)(16526019)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: QeGeViWNz/k1D4wPXkmDtRChMLs19h3i9alhKtjHyju7hBm0aPcgINYBKrLrNl/ikDoO1bnUb0PJuXowRkRVClGJ60BHODQMcg+SOTPuYtZNvZ8Z8A1+/oN/S9y58wPZD9qkNTTtNKPmoTn7T5t/evgNL+jkWfTbm9nxzvtufV1DJ7EYVo9EZko4wKytqOSj8Ddvqz30T/l/l4nVVI2iY1PAF8wcBSub5nyNM1uPOPG4rXhnrEtUn+vA6qlbrmG7zBYBGg1E8YEMVpgJRliUkJq6JJnjCFC2PW/UnQFG0uXYpMPFfw3dinyVcM2F1K6PHlJuuwKzXHuktWSKXC0jxsxCkU2lffoSba7YZyl1gbi9gzATAjBlkt2xXVSRhypJcZzq8scEclFbU6x84gepuicN1IkD6/cvAP60pvbt4dS8Enn8bMrusLvBWtRjgD60Gbh+uSaFqC4kSTTVOaFG5zkrfUSg09EuKnYwNlegqcJoKY9p72r1ePpvf6Ez2UnMegaypLe0HOSiZWiBrD1hYktGIsjg56X6cjxxdfv4C+YBpDDiOyJVSLawdxlISghjaxma5gHAcP5HxQLIqXVhT2Oft2w8rY3+pJLREMySl51bFpA8lUvO0YVcuikoXNS1PllLQ99tkbwAocVCgiYGdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5611 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: AM5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3cdbb1fd-b563-46bb-330f-08d87be62782 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7c63k4AuQh1VaxfgDLHHlbLDMzyTJ2qrYE3LJzdYnhX52Hqmrj4jOMyiX5oi7er4LaCzuMYTyhM9hNGVitaqtwusc9Ki7KA+CicBUbKyLnhjeHKaHw8sbG790erNRGN6NquFs0NAFGTXbOx3Bo6PwSHPAvvH1x/EwpRkd4t8Ykr6j8AXC4NLJPqBE4m2fiKJUlL705s+EcVz0L3H7gfRbMWTYYUkbFBzrsaeyPXmBIFE4hlb3APg87oOLS+SFRi2k+NKrMZJog7aK2CACYfh6sd6IXQW9ObsU6GdcKjbb8C21rBqRS41eOagpOXSvaRrGuW3B0f+qzTEJCF7pgwsNJrNaZfrUhbcHArK0ouc9yCK0zRgxES4LZFGZ4vulqsj5x/HIjfzRKDgopanficC8KL8BpkuKWcGZEWhMSyyZn3aBo0IXKwyGybUolEuRmmb4zQXAwQsv+/IEtYTNEhkMQcqR7VdQgISrwOOstvKwWcGUQRT2MtspH5B/pmnSXSnbACgqkb5sOWnOdeDyZ3vwA== 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; SFS:(4636009)(346002)(396003)(376002)(136003)(39860400002)(46966005)(69590400008)(26005)(47076004)(316002)(2906002)(86362001)(36906005)(44832011)(6486002)(356005)(82310400003)(8676002)(6512007)(83380400001)(82740400003)(5660300002)(81166007)(956004)(70206006)(30864003)(8936002)(70586007)(6666004)(6506007)(478600001)(336012)(36756003)(186003)(16526019)(6916009)(2616005)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2020 08:39:38.0214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7aaf6a97-d97a-4b96-397c-08d87be62bd5 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-AuthSource: AM5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3699 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, 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: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This test fails without bug 26798 fixed because some integer registers likely get clobbered by lazy binding and variant PCS only allows x16 and x17 to be clobbered at call time. The test requires binutils 2.32.1 or newer for handling variant PCS symbols. SVE registers are not covered by this test, to avoid the complexity of handling multiple compile- and runtime feature support cases. --- sysdeps/aarch64/Makefile | 7 ++ sysdeps/aarch64/configure | 40 ++++++++++ sysdeps/aarch64/configure.ac | 22 +++++ sysdeps/aarch64/tst-vpcs-mod.S | 141 +++++++++++++++++++++++++++++++++ sysdeps/aarch64/tst-vpcs.c | 78 ++++++++++++++++++ 5 files changed, 288 insertions(+) create mode 100644 sysdeps/aarch64/tst-vpcs-mod.S create mode 100644 sysdeps/aarch64/tst-vpcs.c diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile index 7f82fc055e..d8e06d27b2 100644 --- a/sysdeps/aarch64/Makefile +++ b/sysdeps/aarch64/Makefile @@ -17,6 +17,13 @@ sysdep-dl-routines += tlsdesc dl-tlsdesc gen-as-const-headers += dl-link.sym tests-internal += tst-ifunc-arg-1 tst-ifunc-arg-2 + +ifeq (yes,$(aarch64-variant-pcs)) +tests += tst-vpcs +modules-names += tst-vpcs-mod +LDFLAGS-tst-vpcs-mod.so = -Wl,-z,lazy +$(objpfx)tst-vpcs: $(objpfx)tst-vpcs-mod.so +endif endif ifeq ($(subdir),csu) diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure index ac3cf6fd36..1f8223725f 100644 --- a/sysdeps/aarch64/configure +++ b/sysdeps/aarch64/configure @@ -255,3 +255,43 @@ if test $libc_cv_aarch64_pac_ret = yes; then $as_echo "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h fi + +# Check if binutils supports variant PCS symbols. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variant PCS support" >&5 +$as_echo_n "checking for variant PCS support... " >&6; } +if ${libc_cv_aarch64_variant_pcs+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.S <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } \ + && { ac_try='$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + libc_cv_aarch64_variant_pcs=yes + fi + rm -rf conftest.* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5 +$as_echo "$libc_cv_aarch64_variant_pcs" >&6; } +config_vars="$config_vars +aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs" diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac index 8b042d6d05..da2a8d81d0 100644 --- a/sysdeps/aarch64/configure.ac +++ b/sysdeps/aarch64/configure.ac @@ -61,3 +61,25 @@ EOF if test $libc_cv_aarch64_pac_ret = yes; then AC_DEFINE(HAVE_AARCH64_PAC_RET) fi + +# Check if binutils supports variant PCS symbols. +AC_CACHE_CHECK([for variant PCS support], [libc_cv_aarch64_variant_pcs], [dnl + cat > conftest.S <. */ + + .variant_pcs vpcs_call + .global vpcs_call + .type vpcs_call, %function +vpcs_call: + .cfi_startproc + hint 34 /* bti c. */ + + /* Save register state to *x0. */ + stp x0, x1, [x0] + stp x2, x3, [x0, 16] + stp x4, x5, [x0, 32] + stp x6, x7, [x0, 48] + stp x8, x9, [x0, 64] + stp x10, x11, [x0, 80] + stp x12, x13, [x0, 96] + stp x14, x15, [x0, 112] + stp x16, x17, [x0, 128] + stp x18, x19, [x0, 144] + stp x20, x21, [x0, 160] + stp x22, x23, [x0, 176] + stp x24, x25, [x0, 192] + stp x26, x27, [x0, 208] + stp x28, x29, [x0, 224] + mov x1, sp + stp x30, x1, [x0, 240] + stp q0, q1, [x0, 256] + stp q2, q3, [x0, 288] + stp q4, q5, [x0, 320] + stp q6, q7, [x0, 352] + stp q8, q9, [x0, 384] + stp q10, q11, [x0, 416] + stp q12, q13, [x0, 448] + stp q14, q15, [x0, 480] + stp q16, q17, [x0, 512] + stp q18, q19, [x0, 544] + stp q20, q21, [x0, 576] + stp q22, q23, [x0, 608] + stp q24, q25, [x0, 640] + stp q26, q27, [x0, 672] + stp q28, q29, [x0, 704] + stp q30, q31, [x0, 736] + ret + .cfi_endproc + .size vpcs_call, .-vpcs_call + + .global vpcs_call_regs + .type vpcs_call_regs, %function +vpcs_call_regs: + .cfi_startproc + hint 34 /* bti c. */ + + stp x29, x30, [sp, -160]! + mov x29, sp + + /* Save callee-saved registers. */ + stp x19, x20, [sp, 16] + stp x21, x22, [sp, 32] + stp x23, x24, [sp, 48] + stp x25, x26, [sp, 64] + stp x27, x28, [sp, 80] + stp d8, d9, [sp, 96] + stp d10, d11, [sp, 112] + stp d12, d13, [sp, 128] + stp d14, d15, [sp, 144] + + /* Initialize most registers from *x1, and save x0, x1, x29, x30, + and sp (== x29), so *x1 contains the register state. */ + stp x0, x1, [x1] + str x29, [x1, 232] + ldp x2, x3, [x1, 16] + ldp x4, x5, [x1, 32] + ldp x6, x7, [x1, 48] + ldp x8, x9, [x1, 64] + ldp x10, x11, [x1, 80] + ldp x12, x13, [x1, 96] + ldp x14, x15, [x1, 112] + ldp x16, x17, [x1, 128] + ldp x18, x19, [x1, 144] + ldp x20, x21, [x1, 160] + ldp x22, x23, [x1, 176] + ldp x24, x25, [x1, 192] + ldp x26, x27, [x1, 208] + ldr x28, [x1, 224] + /* Skip x29, x30, sp. */ + ldp q0, q1, [x1, 256] + ldp q2, q3, [x1, 288] + ldp q4, q5, [x1, 320] + ldp q6, q7, [x1, 352] + ldp q8, q9, [x1, 384] + ldp q10, q11, [x1, 416] + ldp q12, q13, [x1, 448] + ldp q14, q15, [x1, 480] + ldp q16, q17, [x1, 512] + ldp q18, q19, [x1, 544] + ldp q20, q21, [x1, 576] + ldp q22, q23, [x1, 608] + ldp q24, q25, [x1, 640] + ldp q26, q27, [x1, 672] + ldp q28, q29, [x1, 704] + ldp q30, q31, [x1, 736] + + /* Emulate a BL using B, but save x30 before the branch. */ + adr x30, .L_return_addr + stp x30, x29, [x1, 240] + b vpcs_call +.L_return_addr: + + /* Restore callee-saved registers. */ + ldp x19, x20, [sp, 16] + ldp x21, x22, [sp, 32] + ldp x23, x24, [sp, 48] + ldp x25, x26, [sp, 64] + ldp x27, x28, [sp, 80] + ldp d8, d9, [sp, 96] + ldp d10, d11, [sp, 112] + ldp d12, d13, [sp, 128] + ldp d14, d15, [sp, 144] + + ldp x29, x30, [sp], 160 + ret + .cfi_endproc + .size vpcs_call_regs, .-vpcs_call_regs diff --git a/sysdeps/aarch64/tst-vpcs.c b/sysdeps/aarch64/tst-vpcs.c new file mode 100644 index 0000000000..92a701eb7c --- /dev/null +++ b/sysdeps/aarch64/tst-vpcs.c @@ -0,0 +1,78 @@ +/* Test that variant PCS calls don't clobber registers with lazy binding. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + +struct regs +{ + uint64_t x[32]; + union { + long double q[32]; + uint64_t u[64]; + } v; +}; + +/* Gives the registers in the caller and callee around a variant PCS call. + Most registers are initialized from BEFORE in the caller so they can + have values that likely show clobbers. Register state extensions such + as SVE is not covered here, only the base registers. */ +void vpcs_call_regs (struct regs *after, struct regs *before); + +static int +do_test (void) +{ + struct regs before, after; + int err = 0; + + unsigned char *p = (unsigned char *)&before; + for (int i = 0; i < sizeof before; i++) + p[i] = i & 0xff; + + vpcs_call_regs (&after, &before); + + for (int i = 0; i < 32; i++) + if (before.x[i] != after.x[i]) + { + if (i == 16 || i == 17) + /* Variant PCS allows clobbering x16 and x17. */ + continue; + err++; + printf ("x%d: before: 0x%016llx after: 0x%016llx\n", + i, + (unsigned long long)before.x[i], + (unsigned long long)after.x[i]); + } + for (int i = 0; i < 64; i++) + if (before.v.u[i] != after.v.u[i]) + { + err++; + printf ("v%d: before: 0x%016llx %016llx after: 0x%016llx %016llx\n", + i/2, + (unsigned long long)before.v.u[2*(i/2)+1], + (unsigned long long)before.v.u[2*(i/2)], + (unsigned long long)after.v.u[2*(i/2)+1], + (unsigned long long)after.v.u[2*(i/2)]); + } + if (err) + FAIL_EXIT1 ("The variant PCS call clobbered %d registers.\n", err); + return 0; +} + +#include