Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / metag / lib / ucmpdi2.S
blob46f5686db8b1c728e3ce64e70146c61d40648aac
1 ! SPDX-License-Identifier: GPL-2.0
2 ! Copyright (C) 2012 by Imagination Technologies Ltd.
4 ! 64-bit unsigned compare routine.
7         .text
8         .global ___ucmpdi2
9         .type   ___ucmpdi2,function
11 !         low    high
12 ! u64 a  (D0Ar2, D1Ar1)
13 ! u64 b  (D0Ar4, D1Ar3)
14 ___ucmpdi2:
15         ! start at 1 (equal) and conditionally increment or decrement
16         MOV     D0Re0,#1
18         ! high words
19         CMP     D1Ar1,D1Ar3
20         ! or if equal, low words
21         CMPEQ   D0Ar2,D0Ar4
23         ! unsigned compare
24         SUBLO   D0Re0,D0Re0,#1
25         ADDHI   D0Re0,D0Re0,#1
27         MOV     PC,D1RtP
28         .size ___ucmpdi2,.-___ucmpdi2