From patchwork Fri Aug 17 10:11:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 28947 Received: (qmail 16013 invoked by alias); 17 Aug 2018 10:11:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15998 invoked by uid 89); 17 Aug 2018 10:11:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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=Hx-languages-length:1112, 2612 X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr30061.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 10:11:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nbPJH6q6/9GvCNvC0sYajIImkXdXwWKJweh+WQrA2p8=; b=hRaEXKP5Lle/mR+zq0U0JNLSPG3cKKRimwDDSQtsNvls6iykGxYfOiw0gmcM5ht0ExLOlF6c2KsdEfdAvOjzUlI+WDcEcXUclNobklcmeY5ThWiZjCzj7RYv2mfXW6dY3QxWyAECw97XwNy6GCeKshz4fCi67JNi8y9tTJVbbwY= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.21; Fri, 17 Aug 2018 10:11:08 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::6c67:c822:7f7d:d62d]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::6c67:c822:7f7d:d62d%7]) with mapi id 15.20.1059.021; Fri, 17 Aug 2018 10:11:08 +0000 From: Alan Hayward To: GDB Patches CC: nd Subject: [OBV/Pushed] Fix asm in testsuite/gdb.arch/aarch64-fp.c Date: Fri, 17 Aug 2018 10:11:08 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) Content-ID: MIME-Version: 1.0 X-IsSubscribed: yes Pushed as obvious. Getting rid of an old minor bug... Cannot assume result of first and third ldr will go into x0. Rewrite asm to be clearer. gdb/testsuite/Changelog 2018-08-17 Alan Hayward PR gdb/18931: * gdb.arch/aarch64-fp.c (main): Fix asm registers. diff --git a/gdb/testsuite/gdb.arch/aarch64-fp.c b/gdb/testsuite/gdb.arch/aarch64-fp.c index 0ff8e00bbd38281863ff56af040d1de352c6236a..7eb6df2a0401f2af71633312aa8ef620f643daf4 100644 --- a/gdb/testsuite/gdb.arch/aarch64-fp.c +++ b/gdb/testsuite/gdb.arch/aarch64-fp.c @@ -26,12 +26,18 @@ main (void) void *addr; addr = &buf0[0]; - __asm __volatile ("ldr %x0, [%1]" : "=r" (val) : "r" (&addr)); - __asm __volatile ("ldr q0, [x0]"); - + __asm __volatile ("ldr %x0, [%1]\n\t" + "ldr q0, [%x0]" + : "=r" (val) + : "r" (&addr) + : "q0" ); + addr = &buf1[0]; - __asm __volatile ("ldr %x0, [%1]" : "=r" (val) : "r" (&addr)); - __asm __volatile ("ldr q1, [x0]"); + __asm __volatile ("ldr %x0, [%1]\n\t" + "ldr q1, [%x0]" + : "=r" (val) + : "r" (&addr) + : "q1" ); return 1; }