[PATCH] x86/assembly: replace MOVSD uses

From: Jan Beulich
Date: Thu Oct 06 2022 - 03:25:01 EST

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@xxxxxxxx>
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

--- 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 */
@@ -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 @@
movl %edx,%ecx
- rep movsd
+ rep movsl