repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git]
/
arch
/
powerpc
/
lib
/
memcmp_32.S
blob
5010e376f7b835e7b5c2d9be99629da653486af5
1
/* SPDX-License-Identifier: GPL-2.0 */
2
3
/*
4
* memcmp for PowerPC32
5
*
6
* Copyright (C) 1996 Paul Mackerras.
7
*
8
*/
9
10
#include <asm/ppc_asm.h>
11
#include <asm/export.h>
12
13
.text
14
15
_GLOBAL(memcmp)
16
srawi. r7, r5, 2 /* Divide len by 4 */
17
mr r6, r3
18
beq- 3f
19
mtctr r7
20
li r7, 0
21
1: lwzx r3, r6, r7
22
lwzx r0, r4, r7
23
addi r7, r7, 4
24
cmplw cr0, r3, r0
25
bdnzt eq, 1b
26
bne 5f
27
3: andi. r3, r5, 3
28
beqlr
29
cmplwi cr1, r3, 2
30
blt- cr1, 4f
31
lhzx r3, r6, r7
32
lhzx r0, r4, r7
33
addi r7, r7, 2
34
subf. r3, r0, r3
35
beqlr cr1
36
bnelr
37
4: lbzx r3, r6, r7
38
lbzx r0, r4, r7
39
subf. r3, r0, r3
40
blr
41
5: li r3, 1
42
bgtlr
43
li r3, -1
44
blr
45
EXPORT_SYMBOL(memcmp)