1 /* __ucmpdi2.S: 64-bit unsigned compare
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
16 ###############################################################################
18 # int __ucmpdi2(unsigned long long a [GR8:GR9],
19 # unsigned long long b [GR10:GR11])
21 # - returns 0, 1, or 2 as a <, =, > b respectively.
23 ###############################################################################
25 .type __ucmpdi2,@function
28 subcc gr8,gr10,gr0,icc0
30 bclr icc0,#2 ; a.msw < b.msw
33 bhilr icc0,#0 ; a.msw > b.msw
35 subcc.p gr9,gr11,gr0,icc1
40 cor.p gr9,gr0,gr8, cc6,#1
41 cckls icc1,cc4, cc6,#1
43 cor gr7,gr0,gr8, cc4,#1
45 .size __ucmpdi2, .-__ucmpdi2