Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4176054ybv; Tue, 25 Feb 2020 14:48:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzp4KI0I0boOXdPyXKzTp93XuKCtCaKVUU9i7/Q5U+rNwdSjvHop9Dv7wbnOK0IPkOOlrBD X-Received: by 2002:a05:6808:104:: with SMTP id b4mr840603oie.169.1582670921446; Tue, 25 Feb 2020 14:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582670921; cv=none; d=google.com; s=arc-20160816; b=NeCDOiGiEKnOqtRYbNZRCnyhZe1kOVDyl1ldjVoXudrOD6msOMGWBihIchdVzWdWbn dEoiYkilOhxDZQtiCl/y861hkPZWy5TtTxJE4oTxcohJI/My1oz7cJvMWvXazd0Klw1R QCndcDOJgzvEj/a7HeRZ77eDkL3UGXxT7vhe6bKUryDvruiHPpEcoQRp+4dRYWA59P9q t0Thj9kIZZzhmvq9gakR6HwcIpQyCtxCHIoZhIEhFyxLDGJTEYYuYfW6ivw1ltQsZSSD PrNi9/eRXALp2xRj9boTk2jle8mPGY5jZqmp/FFb6n5r6kha5GTOzvKRtzZ7bQLKUKL8 aIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MIqEZR3STz4QmJr+fA8HRU8cSaP8JPrg45nVIamGD0w=; b=B9rloIPzCHMiZc1JrXeGhFD5Aiv25xIc9u6QBQdaAyERK/fnn6Ng7hKVfveHKpGyPB lWNDMFC9FUT9ZrDq1FaGxymCeBIQzYWzj1k+GRVG+Pf0xQKrgJoyc5p0hbAzu6PrvG03 hiypQQk8JGVKTNTYo9Nb/7Q8UDGWaX25kP3t8h1J11bhliGS9G1mhCklTzs48F+Ds8Xo DqIMV6i/ech9hkDSYghyxFRg+cE3Op9WqyPWgj5au84xmZR7EAKbLRQVSqSDPPoR3C18 Ln0bAhXYlHX2F+C26fGDm8uJy7FYOnAJJBm4yO2QJsu6JSq4qVtNkPBAOBKKI1Rp4KKV wXaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gBECvMi7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h139si79015oib.85.2020.02.25.14.48.29; Tue, 25 Feb 2020 14:48:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gBECvMi7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729023AbgBYWqg (ORCPT + 99 others); Tue, 25 Feb 2020 17:46:36 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45752 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYWqg (ORCPT ); Tue, 25 Feb 2020 17:46:36 -0500 Received: by mail-pg1-f194.google.com with SMTP id r77so259329pgr.12 for ; Tue, 25 Feb 2020 14:46:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MIqEZR3STz4QmJr+fA8HRU8cSaP8JPrg45nVIamGD0w=; b=gBECvMi7LHmxCEXE4SlEiKIpMkovh72MZMxjWYJzsDNBuxk7ho0+Wof+H2bOJqtXS7 rUCWlKnKNGbWHQza9F05epdVS1Rdwh0pk03rGO+AJnno5ul+MTbPjK9L+oJb3OhW6hfC 84Lupv2kd2qDNzvwLPNxAltuBFabP1Dktlyf8Cgp9b8OnFlgn3uPyYI8815zJIuhdhAz n8MhfVeFTXr9HScaQx/56l2tsfGKRjNlQ/js/vH0krXT3/p1QMpJaV8NLDlyeFfbv8Yf Ey9hZCmxEHjGglNbV/XRFfwQVHA2+v1ZxJquLPR/9y5GIpo63W3mYrPKl1WfLs8DGrum +8YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MIqEZR3STz4QmJr+fA8HRU8cSaP8JPrg45nVIamGD0w=; b=QufA0eGrgpLlruNRZUowOmPtopg4VFk0cdpQF8B2T4T4SJQbP7lvfjYou5RfhNtEqr g63QHHzIFCk6GzN1DJqSt+C7fu8uen4T136UzIeFfadDpobchRB1W41cslqj6ZJurcnD If80gG3k/XH4IC9tnnS9Gmvs+W8cvT5xjNKmjk5GSw246gi3xFNQdH0SPH/TJZEkH0uB uVUI6v87/HnFOe0GbNwvM2saYmc4wQtie15RyC+ik2kqOgYGOA7t/6+ftUwMs2gW1r0+ skwftYHB/EBrNdmtAbq05qDXyuHaUt/Wb6qOj/2BymzzjY/hHccQ969QYj91mj28pZaQ JO/A== X-Gm-Message-State: APjAAAVtIuyQGU7xSJmvOSfzKezj2zJuOpDkCOe6ES+z4tzy3tPJDoxJ oerfm3aztoKrsSZPSR1KT8l8ldOUKVfWJu25wb12QQ== X-Received: by 2002:a62:1615:: with SMTP id 21mr1010975pfw.84.1582670794833; Tue, 25 Feb 2020 14:46:34 -0800 (PST) MIME-Version: 1.0 References: <8bb16ac4b15a7e28a8e819ef9aae20bfc3f75fbc.1582266841.git.stefan@agner.ch> In-Reply-To: From: Nick Desaulniers Date: Tue, 25 Feb 2020 14:46:22 -0800 Message-ID: Subject: Re: [PATCH] ARM: use assembly mnemonics for VFP register access To: Ard Biesheuvel Cc: Stefan Agner , Arnd Bergmann , LKML , Jian Cai , clang-built-linux , Manoj Gupta , Russell King , Linux ARM , Peter Smith Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 12:27 PM Nick Desaulniers wrote: > > On Tue, Feb 25, 2020 at 11:33 AM Ard Biesheuvel > wrote: > > > > On Tue, 25 Feb 2020 at 20:10, Nick Desaulniers wrote: > > > Ah, this is only when streaming to assembly. Looks like they have the > > > same encoding, and produce the same disassembly. (Godbolt emits > > > assembly by default, and has the option to compile, then disassemble)= . > > > If I take my case from godbolt above: > > > > > > =E2=9E=9C /tmp arm-linux-gnueabihf-gcc -O2 -c x.c > > > =E2=9E=9C /tmp llvm-objdump -dr x.o > > > > > > x.o: file format elf32-arm-little > > > > > > > > > Disassembly of section .text: > > > > > > 00000000 bar: > > > 0: f1 ee 10 0a vmrs r0, fpscr > > > 4: 70 47 bx lr > > > 6: 00 bf nop > > > > > > 00000008 baz: > > > 8: f1 ee 10 0a vmrs r0, fpscr > > > c: 70 47 bx lr > > > e: 00 bf nop > > > > > > So indeed a similar encoding exists for the two different assembler > > > instructions. > > > > Does that hold for ARM (A32) instructions as well? > > TIL -mthumb is the default for arm-linux-gnueabihf-gcc -O2. > > =E2=9E=9C /tmp arm-linux-gnueabihf-gcc -O2 -c x.c -marm > =E2=9E=9C /tmp llvm-objdump -dr x.o > > x.o: file format elf32-arm-little > > > Disassembly of section .text: > > 00000000 bar: > 0: 10 0a f1 ee vmrs r0, fpscr > 4: 1e ff 2f e1 bx lr > > 00000008 baz: > 8: 10 0a f1 ee vmrs r0, fpscr > c: 1e ff 2f e1 bx lr > > ^ Just to show the matching encoding. Further, Peter just sent me this response off thread, which I thought I'd share. Thanks Peter. Bookmarked. ``` FWIW the Arm ARM reference manual https://static.docs.arm.com/ddi0487/ea/DDI0487E_a_armv8_arm.pdf has a table that maps the pre-UAL syntax to the UAL syntax. K6.1.2 Pre-UAL instruction syntax for the A32 floating-point instructions This has an entry mapping pre-UAL (FMRX) to UAL (VMSR) So they are the same instruction with the modern name being VMSR. If it is possible to use the new name it will probably confuse fewer people, but other than that it won't do any harm. ``` --=20 Thanks, ~Nick Desaulniers