]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - arch/metag/lib/ucmpdi2.S
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / metag / lib / ucmpdi2.S
1 ! SPDX-License-Identifier: GPL-2.0
2 ! Copyright (C) 2012 by Imagination Technologies Ltd.
3 !
4 ! 64-bit unsigned compare routine.
5 !
6
7 .text
8 .global ___ucmpdi2
9 .type ___ucmpdi2,function
10
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
17
18 ! high words
19 CMP D1Ar1,D1Ar3
20 ! or if equal, low words
21 CMPEQ D0Ar2,D0Ar4
22
23 ! unsigned compare
24 SUBLO D0Re0,D0Re0,#1
25 ADDHI D0Re0,D0Re0,#1
26
27 MOV PC,D1RtP
28 .size ___ucmpdi2,.-___ucmpdi2