mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08:00
Implement __aeabi_lcmp and ulcmp
Patch contributed by Andrew Turner. llvm-svn: 172366
This commit is contained in:
@@ -36,3 +36,16 @@ __cmpdi2(di_int a, di_int b)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
/* Returns: if (a < b) returns -1
|
||||
* if (a == b) returns 0
|
||||
* if (a > b) returns 1
|
||||
*/
|
||||
COMPILER_RT_ABI si_int
|
||||
__aeabi_lcmp(di_int a, di_int b)
|
||||
{
|
||||
return __cmpdi2(a, b) - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,3 +36,16 @@ __ucmpdi2(du_int a, du_int b)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
/* Returns: if (a < b) returns -1
|
||||
* if (a == b) returns 0
|
||||
* if (a > b) returns 1
|
||||
*/
|
||||
COMPILER_RT_ABI si_int
|
||||
__aeabi_ulcmp(di_int a, di_int b)
|
||||
{
|
||||
return __ucmpdi2(a, b) - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user