- Timestamp:
- 2012-04-11T15:37:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49a736e2
- Parents:
- 3a01483 (diff), d11a181 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- boot
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/Makefile.inc
r3a01483 rc127e1c 49 49 BITS = 32 50 50 ENDIANESS = LE 51 EXTRA_CFLAGS = -march=armv4 51 52 52 53 ifeq ($(MACHINE), gta02) … … 73 74 SOURCES = \ 74 75 arch/$(BARCH)/src/asm.S \ 76 arch/$(BARCH)/src/eabi.S \ 75 77 arch/$(BARCH)/src/main.c \ 76 78 arch/$(BARCH)/src/mm.c \ -
boot/arch/arm32/src/asm.S
r3a01483 rc127e1c 60 60 # before passing control to the copied code. 61 61 # 62 bxr062 mov pc, r0 -
boot/genarch/include/division.h
r3a01483 rc127e1c 33 33 #define BOOT_DIVISION_H_ 34 34 35 /* 32bit integer division */36 35 extern int __divsi3(int, int); 37 38 /* 64bit integer division */39 36 extern long long __divdi3(long long, long long); 40 37 41 /* 32bit unsigned integer division */42 38 extern unsigned int __udivsi3(unsigned int, unsigned int); 43 44 /* 64bit unsigned integer division */45 39 extern unsigned long long __udivdi3(unsigned long long, unsigned long long); 46 40 47 /* 32bit remainder of the signed division */48 41 extern int __modsi3(int, int); 49 50 /* 64bit remainder of the signed division */51 42 extern long long __moddi3(long long, long long); 52 43 53 /* 32bit remainder of the unsigned division */54 44 extern unsigned int __umodsi3(unsigned int, unsigned int); 55 56 /* 64bit remainder of the unsigned division */57 45 extern unsigned long long __umoddi3(unsigned long long, unsigned long long); 58 46 47 extern int __divmodsi3(int, int, int *); 48 extern unsigned int __udivmodsi3(unsigned int, unsigned int, unsigned int *); 49 50 extern long long __divmoddi3(long long, long long, long long *); 59 51 extern unsigned long long __udivmoddi3(unsigned long long, unsigned long long, 60 52 unsigned long long *); -
boot/genarch/src/division.c
r3a01483 rc127e1c 73 73 { 74 74 unsigned long long result; 75 int steps = sizeof(unsigned long long) * 8; 75 int steps = sizeof(unsigned long long) * 8; 76 76 77 77 *remainder = 0; … … 104 104 105 105 /* 32bit integer division */ 106 int __divsi3(int a, int b) 106 int __divsi3(int a, int b) 107 107 { 108 108 unsigned int rem; … … 116 116 117 117 /* 64bit integer division */ 118 long long __divdi3(long long a, long long b) 118 long long __divdi3(long long a, long long b) 119 119 { 120 120 unsigned long long rem; … … 155 155 156 156 /* 64bit remainder of the signed division */ 157 long long __moddi3(long long a, longlong b)157 long long __moddi3(long long a, long long b) 158 158 { 159 159 unsigned long long rem; … … 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 199 unsigned int __udivmodsi3(unsigned int a, unsigned int b, 200 unsigned int *c) 201 { 202 return divandmod32(a, b, c); 203 } 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 185 219 unsigned long long __udivmoddi3(unsigned long long a, unsigned long long b, 186 220 unsigned long long *c) -
boot/generic/src/str.c
r3a01483 rc127e1c 100 100 #include <str.h> 101 101 #include <errno.h> 102 103 /** Check the condition if wchar_t is signed */ 104 #ifdef WCHAR_IS_UNSIGNED 105 #define WCHAR_SIGNED_CHECK(cond) (true) 106 #else 107 #define WCHAR_SIGNED_CHECK(cond) (cond) 108 #endif 102 109 103 110 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 198 205 * code was invalid. 199 206 */ 200 int chr_encode( wchar_t ch, char *str, size_t *offset, size_t size)207 int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size) 201 208 { 202 209 if (*offset >= size) … … 325 332 bool ascii_check(wchar_t ch) 326 333 { 327 if ( (ch >= 0) && (ch <= 127))334 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127)) 328 335 return true; 329 336 … … 338 345 bool chr_check(wchar_t ch) 339 346 { 340 if ( (ch >= 0) && (ch <= 1114111))347 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111)) 341 348 return true; 342 349
Note:
See TracChangeset
for help on using the changeset viewer.