Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
565 B
ArmAsm
31 lines
565 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Sparc optimized memcmp code.
|
|
*
|
|
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
|
|
* Copyright (C) 2000, 2008 David S. Miller (davem@davemloft.net)
|
|
*/
|
|
|
|
#include <linux/export.h>
|
|
#include <linux/linkage.h>
|
|
#include <asm/asm.h>
|
|
|
|
.text
|
|
ENTRY(memcmp)
|
|
cmp %o2, 0
|
|
1: BRANCH32(be, pn, 2f)
|
|
nop
|
|
ldub [%o0], %g7
|
|
ldub [%o1], %g3
|
|
sub %o2, 1, %o2
|
|
add %o0, 1, %o0
|
|
add %o1, 1, %o1
|
|
subcc %g7, %g3, %g3
|
|
BRANCH32(be, pt, 1b)
|
|
cmp %o2, 0
|
|
retl
|
|
mov %g3, %o0
|
|
2: retl
|
|
mov 0, %o0
|
|
ENDPROC(memcmp)
|
|
EXPORT_SYMBOL(memcmp)
|