Changeset 772 for soft/giet_vm/giet_libs
- Timestamp:
- Feb 3, 2016, 9:59:18 AM (9 years ago)
- Location:
- soft/giet_vm/giet_libs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.h
r771 r772 161 161 int arg_3 ) 162 162 { 163 register int reg_no_and_output asm("v0") = call_no;164 register int reg_a0 asm("a0") = arg_0;165 register int reg_a1 asm("a1") = arg_1;166 register int reg_a2 asm("a2") = arg_2;167 register int reg_a3 asm("a3") = arg_3;168 169 asmvolatile(163 register int reg_no_and_output __asm__("v0") = call_no; 164 register int reg_a0 __asm__("a0") = arg_0; 165 register int reg_a1 __asm__("a1") = arg_1; 166 register int reg_a2 __asm__("a2") = arg_2; 167 register int reg_a3 __asm__("a3") = arg_3; 168 169 __asm__ volatile( 170 170 "syscall" 171 171 : "+r" (reg_no_and_output), /* input/output argument */ -
soft/giet_vm/giet_libs/stdlib.c
r771 r772 113 113 114 114 /////////////////////////////////// 115 unsigned int strlen(char* string )115 int strlen( const char* string ) 116 116 { 117 117 unsigned int i = 0; … … 121 121 122 122 /////////////////////////////// 123 unsigned int strcmp(char * s1,124 123 int strcmp( const char * s1, 124 const char * s2 ) 125 125 { 126 126 while (1) … … 135 135 ///////////////////////// 136 136 char* strcpy( char* dest, 137 c har* source )137 const char* source ) 138 138 { 139 139 if (!dest || !source) return dest; -
soft/giet_vm/giet_libs/stdlib.h
r771 r772 45 45 // The terminating NUL character is not taken into account. 46 46 //////////////////////////////////////////////////////////////////////////////////////// 47 unsigned int strlen(char* string );47 int strlen( const char* string ); 48 48 49 49 //////////////////////////////////////////////////////////////////////////////////////// … … 52 52 // It returns 1 if they are not. 53 53 //////////////////////////////////////////////////////////////////////////////////////// 54 unsigned int strcmp(char* s1,55 54 int strcmp( const char* s1, 55 const char* s2 ); 56 56 57 57 //////////////////////////////////////////////////////////////////////////////////////// … … 60 60 //////////////////////////////////////////////////////////////////////////////////////// 61 61 char* strcpy( char* dest, 62 c har* source );62 const char* source ); 63 63 64 64 ///////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.