mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/assembly: replace MOVSD uses
@ 2022-10-06  7:24 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-10-06  7:24 UTC (permalink / raw)
  To: the arch/x86 maintainers
  Cc: lkml, H. Peter Anvin, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-06  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06  7:24 [PATCH] x86/assembly: replace MOVSD uses Jan Beulich

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®