1 /* ===-- cmpdi2.c - Implement __cmpdi2 -------------------------------------===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
10 * This file implements __cmpdi2 for the compiler_rt library.
12 * ===----------------------------------------------------------------------===
18 /* Returns: if (a < b) returns 0
19 * if (a == b) returns 1
20 * if (a > b) returns 2
23 COMPILER_RT_ABI si_int
24 __cmpdi2(di_int a, di_int b)
30 if (x.s.high < y.s.high)
32 if (x.s.high > y.s.high)
34 if (x.s.low < y.s.low)
36 if (x.s.low > y.s.low)