mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: the arch/x86 maintainers <x86@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: [PATCH] x86/assembly: replace MOVSD uses
Date: Thu, 6 Oct 2022 09:24:42 +0200	[thread overview]
Message-ID: <bf62192a-ab6a-dade-2a06-73d27fe02282@suse.com> (raw)

D-suffixed mnemonics do not exist in AT&T syntax; an L suffix is to be
used instead. MOVSD and CMPSD are only SSE2 instructions in AT&T mode.
Future gas versions may at least warn about such bogus uses. (Due to an
implementation detail [read: bug] gas has been supporting MOVSD and
CMPSD as string instructions, but not any of the other mnemonics where
Intel/AMD documentation enumerates a possible D suffix, e.g. STOS or
IRET. Clang's integrated assembler, yet more oddly, supports only MOVSD
as a string instruction, and apparently only without any operands.)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
I also view as questionable the use of semicolons in two of the three
instances changed - REP isn't really an instruction on its own. I wasn't
sure though whether adjusting this at the same time would be deemed
acceptable.

--- a/arch/x86/boot/bioscall.S
+++ b/arch/x86/boot/bioscall.S
@@ -32,7 +32,7 @@ intcall:
 	movw	%dx, %si
 	movw	%sp, %di
 	movw	$11, %cx
-	rep; movsd
+	rep; movsl
 
 	/* Pop full state from the stack */
 	popal
@@ -67,7 +67,7 @@ intcall:
 	jz	4f
 	movw	%sp, %si
 	movw	$11, %cx
-	rep; movsd
+	rep; movsl
 4:	addw	$44, %sp
 
 	/* Restore state and return */
--- a/arch/x86/lib/iomap_copy_64.S
+++ b/arch/x86/lib/iomap_copy_64.S
@@ -10,6 +10,6 @@
  */
 SYM_FUNC_START(__iowrite32_copy)
 	movl %edx,%ecx
-	rep movsd
+	rep movsl
 	RET
 SYM_FUNC_END(__iowrite32_copy)

                 reply	other threads:[~2022-10-06  7:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf62192a-ab6a-dade-2a06-73d27fe02282@suse.com \
    --to=jbeulich@suse.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®