Skip to contentSkip to conversation

x86: math-emu: fix up 'cmp' insn for clang ias

PATCH Applied Arnd Bergmann 3 participants 3 messages May 27, 2020 – Jul 16, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: math-emu: fix up 'cmp' insn for clang ias

The clang integrated assembler requires the 'cmp' instruction to have a length prefix here:

arch/x86/math-emu/wm_sqrt.S:212:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', or 'cmpl')
cmp $0xffffffff,-24(%ebp)
^

Make this a 32-bit comparison, which it was clearly meant to be.

---
 arch/x86/math-emu/wm_sqrt.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/math-emu/wm_sqrt.S +1 -1
index 3b2b58164ec1..40526dd85137 100644
@@ -209,7 +209,7 @@ sqrt_stage_2_finish:
 
 #ifdef PARANOID
 /* It should be possible to get here only if the arg is ffff....ffff */
-	cmp	$0xffffffff,FPU_fsqrt_arg_1
+	cmpl	$0xffffffff,FPU_fsqrt_arg_1
 	jnz	sqrt_stage_2_error
 #endif /* PARANOID */
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

The clang integrated assembler requires the 'cmp' instruction to have a length prefix here:

arch/x86/math-emu/wm_sqrt.S:212:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', or 'cmpl')
cmp $0xffffffff,-24(%ebp)
^

Make this a 32-bit comparison, which it was clearly meant to be.

Thanks for the patch.

Quoted 18 lines
---
 arch/x86/math-emu/wm_sqrt.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/math-emu/wm_sqrt.S +1 -2
index 3b2b58164ec1..40526dd85137 100644
@@ -209,7 +209,7 @@ sqrt_stage_2_finish:
 
 #ifdef PARANOID
 /* It should be possible to get here only if the arg is ffff....ffff */
-       cmp     $0xffffffff,FPU_fsqrt_arg_1
+       cmpl    $0xffffffff,FPU_fsqrt_arg_1
        jnz     sqrt_stage_2_error
 #endif /* PARANOID */
 
--
Signature · 2 lines
Thanks,
~Nick Desaulniers
merge bot Applied
#2 lore raw

[tip: x86/urgent] x86: math-emu: Fix up 'cmp' insn for clang ias

In reply to Arnd Bergmann
The following commit has been merged into the x86/urgent branch of tip:

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     81e96851ea32deb2c921c870eecabf335f598aeb
Gitweb:        https://git.kernel.org/tip/81e96851ea32deb2c921c870eecabf335f598aeb
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 27 May 2020 15:53:46 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Thu, 16 Jul 2020 17:26:42 +02:00

x86: math-emu: Fix up 'cmp' insn for clang ias

The clang integrated assembler requires the 'cmp' instruction to have a length prefix here:

arch/x86/math-emu/wm_sqrt.S:212:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', or 'cmpl')
cmp $0xffffffff,-24(%ebp)
^

Make this a 32-bit comparison, which it was clearly meant to be.

---
 arch/x86/math-emu/wm_sqrt.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/math-emu/wm_sqrt.S +1 -1
index 3b2b581..40526dd 100644
@@ -209,7 +209,7 @@ sqrt_stage_2_finish:
 
 #ifdef PARANOID
 /* It should be possible to get here only if the arg is ffff....ffff */
-	cmp	$0xffffffff,FPU_fsqrt_arg_1
+	cmpl	$0xffffffff,FPU_fsqrt_arg_1
 	jnz	sqrt_stage_2_error
 #endif /* PARANOID */