Changeset 2467b41 in mainline for uspace/lib/softint/generic/comparison.c
- Timestamp:
- 2018-01-17T16:58:41Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17c14273
- Parents:
- 33b8d024
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-17 16:58:14)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-17 16:58:41)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softint/generic/comparison.c
r33b8d024 r2467b41 34 34 */ 35 35 36 #include <alias.h>37 36 #include <comparison.h> 38 37 #include <lltype.h> … … 42 41 #define GREATER 2; 43 42 44 int __cmp ti2 (long long a, long long b)43 int __cmpdi2 (long long a, long long b) 45 44 { 46 45 union lltype lla; … … 65 64 } 66 65 67 int __ucmp ti2 (unsigned long long a, unsigned long long b)66 int __ucmpdi2 (unsigned long long a, unsigned long long b) 68 67 { 69 68 union lltype lla; … … 88 87 } 89 88 90 #if LONG_MAX == LLONG_MAX91 int ALIAS(__cmp, i2);92 int ALIAS(__ucmp, i2);93 #else94 95 int __cmpdi2(long a, long b)96 {97 if ((int)a < (int)b) {98 return LESSER;99 } else if ((int)a > (int)b) {100 return GREATER;101 } else {102 return EQUAL;103 }104 }105 106 int __ucmpdi2(unsigned long a, unsigned long b)107 {108 if ((int)a < (int)b) {109 return LESSER;110 } else if ((int)a > (int)b) {111 return GREATER;112 } else {113 return EQUAL;114 }115 }116 117 #endif118 119 89 /** @} 120 90 */
Note:
See TracChangeset
for help on using the changeset viewer.