Changeset c7afcba7 in mainline for boot/genarch/src/division.c
- Timestamp:
- 2012-04-07T17:50:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 446ac2a
- Parents:
- 8e893ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/genarch/src/division.c
r8e893ae rc7afcba7 183 183 } 184 184 185 int __divmodsi3(int a, int b, int *c) 186 { 187 unsigned int rem; 188 int result = (int) divandmod32(ABSVAL(a), ABSVAL(b), &rem); 189 190 if (SGN(a) == SGN(b)) { 191 *c = rem; 192 return result; 193 } 194 195 *c = -rem; 196 return -result; 197 } 198 185 199 unsigned int __udivmodsi3(unsigned int a, unsigned int b, 186 200 unsigned int *c) … … 189 203 } 190 204 205 long long __divmoddi3(long long a, long long b, long long *c) 206 { 207 unsigned long long rem; 208 long long result = (int) divandmod64(ABSVAL(a), ABSVAL(b), &rem); 209 210 if (SGN(a) == SGN(b)) { 211 *c = rem; 212 return result; 213 } 214 215 *c = -rem; 216 return -result; 217 } 218 191 219 unsigned long long __udivmoddi3(unsigned long long a, unsigned long long b, 192 220 unsigned long long *c)
Note:
See TracChangeset
for help on using the changeset viewer.