Skip to content

Commit

Permalink
x86: math-emu: Fix up 'cmp' insn for clang ias
Browse files Browse the repository at this point in the history
[ Upstream commit 81e96851ea32deb2c921c870eecabf335f598aeb ]

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lkml.kernel.org/r/20200527135352.1198078-1-arnd@arndb.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: John Vincent <git@tensevntysevn.cf>
Signed-off-by: John Vincent <git@tenseventyseven.cf>
  • Loading branch information
arndb authored and ravindu644 committed Aug 18, 2024
1 parent 7d1ee0b commit 9c93566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/math-emu/wm_sqrt.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 9c93566

Please sign in to comment.