forked from KolibriOS/kolibrios
small fixes. need more
git-svn-id: svn://kolibrios.org@6410 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a1265dabee
commit
845d2f0618
@ -6,10 +6,10 @@ echo ####################################################
|
|||||||
rem #### CONFIG SECTION ####
|
rem #### CONFIG SECTION ####
|
||||||
set LIBNAME=libck.a
|
set LIBNAME=libck.a
|
||||||
set INCLUDE=include
|
set INCLUDE=include
|
||||||
set CC=
|
set CC=kos32-tcc
|
||||||
set CFLAGS=-c -nostdinc -DGNUC -I"%cd%\%INCLUDE%"
|
set CFLAGS=-c -nostdinc -DGNUC -I"%cd%\%INCLUDE%"
|
||||||
set AR=
|
set AR=kos32-ar
|
||||||
set ASM=
|
set ASM=fasm
|
||||||
set dirs=stdio memory kolibrisys string stdlib
|
set dirs=stdio memory kolibrisys string stdlib
|
||||||
rem #### END OF CONFIG SECTION ####
|
rem #### END OF CONFIG SECTION ####
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ include 'proc32.inc'
|
|||||||
public memcpy
|
public memcpy
|
||||||
public memmove
|
public memmove
|
||||||
|
|
||||||
proc memcpy stdcall, to:dword,from:dword,count:dword
|
proc memcpy c, to:dword,from:dword,count:dword
|
||||||
|
|
||||||
mov ecx,[count]
|
mov ecx,[count]
|
||||||
test ecx,ecx
|
test ecx,ecx
|
||||||
@ -20,7 +20,7 @@ proc memcpy stdcall, to:dword,from:dword,count:dword
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc memmove stdcall, to:dword,from:dword,count:dword
|
proc memmove c, to:dword,from:dword,count:dword
|
||||||
|
|
||||||
mov ecx,[count]
|
mov ecx,[count]
|
||||||
test ecx,ecx
|
test ecx,ecx
|
||||||
|
@ -2,7 +2,7 @@ char* strcat(char* strDest, const char* strSource)
|
|||||||
{
|
{
|
||||||
char* res;
|
char* res;
|
||||||
res=strDest;
|
res=strDest;
|
||||||
while (*strDest++) ;
|
while (*strDest) strDest++;
|
||||||
while (*strDest++ = *strSource++) ;
|
while (*strDest++ = *strSource++) ;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@ char* strcpy(char* strDest,char* strSource)
|
|||||||
{
|
{
|
||||||
char* res;
|
char* res;
|
||||||
res=strDest;
|
res=strDest;
|
||||||
while(*strDest++ == strSource++) ;
|
while(*strDest++ = *strSource++) ;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
OUTFILE = ktcc.kex
|
OUTFILE = ktcc.kex
|
||||||
OBJS = tcc.o console.o
|
OBJS = tcc.o console.o getcwd.o
|
||||||
CGLAGS =-O2 -g -Wall -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing
|
CGLAGS =-O2 -g -Wall -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_program
|
include Makefile_for_program
|
||||||
|
@ -5,3 +5,7 @@
|
|||||||
#define TCC_VERSION "0.9.23"
|
#define TCC_VERSION "0.9.23"
|
||||||
//#define TCC_TARGET_PE
|
//#define TCC_TARGET_PE
|
||||||
#define TCC_TARGET_MEOS
|
#define TCC_TARGET_MEOS
|
||||||
|
|
||||||
|
/* enable bound checking code */
|
||||||
|
//#define CONFIG_TCC_BCHECK 1
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ long long __moddi3(long long u, long long v)
|
|||||||
if (vv.s.high < 0)
|
if (vv.s.high < 0)
|
||||||
vv.ll = __negdi2 (vv.ll);
|
vv.ll = __negdi2 (vv.ll);
|
||||||
|
|
||||||
__udivmoddi4 (uu.ll, vv.ll, &w);
|
__udivmoddi4 (uu.ll, vv.ll, (UDWtype *) &w);
|
||||||
if (c)
|
if (c)
|
||||||
w = __negdi2 (w);
|
w = __negdi2 (w);
|
||||||
return w;
|
return w;
|
||||||
@ -466,7 +466,7 @@ long long __shldi3(long long a, int b)
|
|||||||
u.s.high = (unsigned)u.s.low << (b - 32);
|
u.s.high = (unsigned)u.s.low << (b - 32);
|
||||||
u.s.low = 0;
|
u.s.low = 0;
|
||||||
} else if (b != 0) {
|
} else if (b != 0) {
|
||||||
u.s.high = ((unsigned)u.s.high << b) | (u.s.low >> (32 - b));
|
u.s.high = ((unsigned)u.s.high << b) | ((unsigned)u.s.low >> (32 - b));
|
||||||
u.s.low = (unsigned)u.s.low << b;
|
u.s.low = (unsigned)u.s.low << b;
|
||||||
}
|
}
|
||||||
return u.ll;
|
return u.ll;
|
||||||
|
@ -1034,7 +1034,8 @@ static inline void tcc_free(void *ptr)
|
|||||||
#ifdef MEM_DEBUG
|
#ifdef MEM_DEBUG
|
||||||
mem_cur_size -= malloc_usable_size(ptr);
|
mem_cur_size -= malloc_usable_size(ptr);
|
||||||
#endif
|
#endif
|
||||||
free(ptr);
|
//2016-04-27 siemargl commented to fix crash temporally. Need to fix
|
||||||
|
// free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *tcc_malloc(unsigned long size)
|
static void *tcc_malloc(unsigned long size)
|
||||||
@ -10591,7 +10592,7 @@ int parse_args(TCCState *s, int argc, char **argv)
|
|||||||
return optind;
|
return optind;
|
||||||
}
|
}
|
||||||
|
|
||||||
int app_main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
TCCState *s;
|
TCCState *s;
|
||||||
|
Loading…
Reference in New Issue
Block a user