From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113535 invoked by alias); 12 Aug 2016 13:41:03 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 113517 invoked by uid 89); 12 Aug 2016 13:41:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_LOTSOFHASH,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=thomaspreudhommearmcom, thomas.preudhomme@arm.com, U*thomas.preudhomme, Disassembly X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Aug 2016 13:40:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5DA628; Fri, 12 Aug 2016 06:42:18 -0700 (PDT) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D5B23F41F; Fri, 12 Aug 2016 06:40:48 -0700 (PDT) To: binutils@sourceware.org, Richard Earnshaw , Nick Clifton , Alan Modra From: Thomas Preudhomme Subject: [PATCH, binutils/ARM] Remove _S version or MSR/MRS special registers Message-ID: Date: Fri, 12 Aug 2016 13:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B9467670410515D17C33AB7F" X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00087.txt.bz2 This is a multi-part message in MIME format. --------------B9467670410515D17C33AB7F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1232 Hi, When adding support for ARMv8-M in GAS, MRS/MSR special registers were extended with MSP_S/MSP_NS and PSP_S/PSP_NS. While _NS versions make sense as they correspond to a different encoding, _S version do not. They are artifacts of previous version of the patch where a special CLI switch was considered to assemble ARMv8-M Secure code. In their current form they are a source of confusion because they would lead to read or write the non secure version of MSP and PSP when in non secure state. Since this is early 2.27 days, we believe it to be best to remove them now rather than keep them in. Patch is in attachment. ChangeLog entrie is as follows: *** gas/ChangeLog *** 2016-08-11 Thomas Preud'homme * config/tc-arm.c (v7m_psrs): Remove msp_s, MSP_S, psp_s and PSP_S special registers. * testsuite/gas/arm/archv8m-cmse-msr.s: Remove test for above special registers. * testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise. * testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise. * testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise. Is this ok for master and more importantly binutils-2_27-branch? Best regards, Thomas --------------B9467670410515D17C33AB7F Content-Type: text/x-patch; name="remove_s_msr_special_regs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="remove_s_msr_special_regs.patch" Content-length: 5205 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 73d0531639a9f8b277729122999122a423cc7549..4fa0bfc5bb19c8d61550618dc6d496793f4580ba 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -18788,8 +18788,8 @@ static const struct asm_psr v7m_psrs[] = {"ipsr", 5 }, {"IPSR", 5 }, {"epsr", 6 }, {"EPSR", 6 }, {"iepsr", 7 }, {"IEPSR", 7 }, - {"msp", 8 }, {"MSP", 8 }, {"msp_s", 8 }, {"MSP_S", 8 }, - {"psp", 9 }, {"PSP", 9 }, {"psp_s", 9 }, {"PSP_S", 9 }, + {"msp", 8 }, {"MSP", 8 }, + {"psp", 9 }, {"PSP", 9 }, {"primask", 16}, {"PRIMASK", 16}, {"basepri", 17}, {"BASEPRI", 17}, {"basepri_max", 18}, {"BASEPRI_MAX", 18}, diff --git a/gas/testsuite/gas/arm/archv8m-cmse-msr-base.d b/gas/testsuite/gas/arm/archv8m-cmse-msr-base.d index 4bbb82d79b2c1f6277d93dd49270250748fb61f6..0c46a44a3e160c2e8957085c1a59faed3136b00a 100644 --- a/gas/testsuite/gas/arm/archv8m-cmse-msr-base.d +++ b/gas/testsuite/gas/arm/archv8m-cmse-msr-base.d @@ -7,26 +7,18 @@ Disassembly of section .text: 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS diff --git a/gas/testsuite/gas/arm/archv8m-cmse-msr-main.d b/gas/testsuite/gas/arm/archv8m-cmse-msr-main.d index 30a3361c37458c8894fa76bd2dd5b8425664668b..42d3ba9b0c8350243b42dc418d2e4e317a071211 100644 --- a/gas/testsuite/gas/arm/archv8m-cmse-msr-main.d +++ b/gas/testsuite/gas/arm/archv8m-cmse-msr-main.d @@ -7,26 +7,18 @@ Disassembly of section .text: 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS diff --git a/gas/testsuite/gas/arm/archv8m-cmse-msr.s b/gas/testsuite/gas/arm/archv8m-cmse-msr.s index 897be1a9256195de85a7b8869e942a298faf92ec..66a3b64f86bde5ed26201c6365b1fa0ab3846627 100644 --- a/gas/testsuite/gas/arm/archv8m-cmse-msr.s +++ b/gas/testsuite/gas/arm/archv8m-cmse-msr.s @@ -1,25 +1,17 @@ T: msr MSP, r0 -msr MSP_S, r0 msr MSP_NS, r0 msr PSP, r0 -msr PSP_S, r0 msr PSP_NS, r0 msr msp, r0 -msr msp_s, r0 msr msp_ns, r0 msr psp, r0 -msr psp_s, r0 msr psp_ns, r0 mrs r0, MSP -mrs r0, MSP_S mrs r0, MSP_NS mrs r0, PSP -mrs r0, PSP_S mrs r0, PSP_NS mrs r0, msp -mrs r0, msp_s mrs r0, msp_ns mrs r0, psp -mrs r0, psp_s mrs r0, psp_ns diff --git a/gas/testsuite/gas/arm/archv8m-main-dsp-4.d b/gas/testsuite/gas/arm/archv8m-main-dsp-4.d index 248f75e00af6d1a7a43f80bcfc6e4f80556ae1d4..7ebc9c1178543710358b7ff76f415261891429bf 100644 --- a/gas/testsuite/gas/arm/archv8m-main-dsp-4.d +++ b/gas/testsuite/gas/arm/archv8m-main-dsp-4.d @@ -7,26 +7,18 @@ Disassembly of section .text: 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f380 8808 msr MSP, r0 -0+.* <[^>]*> f380 8808 msr MSP, r0 0+.* <[^>]*> f380 8888 msr MSP_NS, r0 0+.* <[^>]*> f380 8809 msr PSP, r0 -0+.* <[^>]*> f380 8809 msr PSP, r0 0+.* <[^>]*> f380 8889 msr PSP_NS, r0 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS 0+.* <[^>]*> f3ef 8008 mrs r0, MSP -0+.* <[^>]*> f3ef 8008 mrs r0, MSP 0+.* <[^>]*> f3ef 8088 mrs r0, MSP_NS 0+.* <[^>]*> f3ef 8009 mrs r0, PSP -0+.* <[^>]*> f3ef 8009 mrs r0, PSP 0+.* <[^>]*> f3ef 8089 mrs r0, PSP_NS --------------B9467670410515D17C33AB7F--