forked from KolibriOS/kolibrios
small math fix & readme
git-svn-id: svn://kolibrios.org@6439 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e4cdc1239f
commit
65400f0014
@ -30,17 +30,19 @@ extern "C" {
|
|||||||
|
|
||||||
typedef unsigned int color_t;
|
typedef unsigned int color_t;
|
||||||
|
|
||||||
typedef union
|
|
||||||
|
typedef union __attribute__((packed)) pos_t
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
short x;
|
short x;
|
||||||
short y;
|
short y;
|
||||||
}xy;
|
};
|
||||||
} __attribute__((packed)) pos_t ;
|
} pos_t;
|
||||||
|
|
||||||
typedef union
|
|
||||||
|
typedef union __attribute__((packed)) oskey_t
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
struct
|
struct
|
||||||
@ -48,8 +50,8 @@ typedef union
|
|||||||
uint8_t state;
|
uint8_t state;
|
||||||
uint8_t code;
|
uint8_t code;
|
||||||
uint16_t ctrl_key;
|
uint16_t ctrl_key;
|
||||||
}in;
|
};
|
||||||
}__attribute__((packed)) oskey_t ;
|
} oskey_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -154,6 +156,7 @@ uint32_t get_skin_height(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
// TinyC dont support aliasing of static inline funcs
|
||||||
static inline void BeginDraw(void) __attribute__ ((alias ("begin_draw")));
|
static inline void BeginDraw(void) __attribute__ ((alias ("begin_draw")));
|
||||||
static inline void EndDraw(void) __attribute__ ((alias ("end_draw")));
|
static inline void EndDraw(void) __attribute__ ((alias ("end_draw")));
|
||||||
static inline void DrawWindow(int x, int y, int w, int h, const char *name,
|
static inline void DrawWindow(int x, int y, int w, int h, const char *name,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
most test adapted from "musl-libctest-master" project
|
most test adapted from "musl-libctest-master" project
|
||||||
some taken from newlib
|
some taken from newlib
|
||||||
|
|
||||||
Status or tests
|
Status or libc tests
|
||||||
|
|
||||||
---NOT TESTED---
|
---NOT TESTED---
|
||||||
no library fns realized
|
no library fns realized
|
||||||
|
@ -4,5 +4,5 @@
|
|||||||
#define TCC_TARGET_I386
|
#define TCC_TARGET_I386
|
||||||
#define ONE_SOURCE
|
#define ONE_SOURCE
|
||||||
|
|
||||||
#define COMMIT_4ad186c5ef61_IS_FIXED
|
//#define COMMIT_4ad186c5ef61_IS_FIXED
|
||||||
|
|
||||||
|
@ -21,17 +21,15 @@ otherwise (error) underscoring all symbols, not only cdecl
|
|||||||
-no symbols (mapfile) for debug, see howtodebugtcc
|
-no symbols (mapfile) for debug, see howtodebugtcc
|
||||||
|
|
||||||
|
|
||||||
-how to use packed attribute see test82
|
-using __attribute__((packed)) see test82. need naming struct twice as in kos32sys1.h
|
||||||
-alias attribute wont work
|
-using __attribute__ ((alias xxx)) restricted only for non "static inline" functions
|
||||||
-unnamed structs in union may lead to compiler internal error
|
-erroneous or "non TCC" member using in nested structs or unions can lead to compiler internal error
|
||||||
-tcc: error: undefined symbol '__tcc_cvt_ftol'
|
|
||||||
--in config.h - used workaround (#define COMMIT_4ad186c5ef61_IS_FIXED
|
|
||||||
--but this is precision bugfix - see \tests\tests2\000_cvttoftol.c
|
|
||||||
-not working: default search path are ./include ./lib from executable
|
-not working: default search path are ./include ./lib from executable
|
||||||
--under KOS need to use -Bpath_to_ktcc
|
--under KOS need to use -Bpath_to_ktcc
|
||||||
--start.o not found using -B (kos) - put near your.c file
|
--start.o not found using -B (kos) - put near your.c file
|
||||||
-if static var sized more than 14096+ -> crash compiled .exe (kos)
|
-if static var sized more than 14096+ -> crash compiled .exe (kos)
|
||||||
---^ stack size set in menuet header at compile time tccmeos.c:177 about 4k
|
---^ stack size set in menuet header at compile time tccmeos.c:177 about 4k
|
||||||
|
-bench timing coarse (0s or 1s), no usec in newlib gettimeofday. OK
|
||||||
|
|
||||||
Tests status:
|
Tests status:
|
||||||
asmtest +
|
asmtest +
|
||||||
@ -55,19 +53,17 @@ test46 no stdin - removed funtionality read from console, but file ops works
|
|||||||
|
|
||||||
libc:
|
libc:
|
||||||
-no "finished" in title of console program after exit console - use con_exit()
|
-no "finished" in title of console program after exit console - use con_exit()
|
||||||
-bench timing error (0s or 1s)
|
-used system memory allocator (4096 bytes minimum)
|
||||||
-minimal memory allocator
|
|
||||||
|
|
||||||
|
|
||||||
libc not complete. overall status:
|
libc not complete. overall status:
|
||||||
no files:
|
no files:
|
||||||
assert.h
|
|
||||||
errno.h - in stdio
|
errno.h - in stdio
|
||||||
limits.h
|
limits.h
|
||||||
locale.h
|
locale.h
|
||||||
setjmp.h
|
setjmp.h
|
||||||
signall.h
|
signall.h
|
||||||
time.h
|
time.h - can use get_tick_count()/100 from kos32sys1.h
|
||||||
wchar.h
|
wchar.h
|
||||||
wctype.h
|
wctype.h
|
||||||
|
|
||||||
@ -82,14 +78,12 @@ modf
|
|||||||
fmod
|
fmod
|
||||||
|
|
||||||
HUGE_VAL
|
HUGE_VAL
|
||||||
NAN
|
|
||||||
|
|
||||||
|
|
||||||
stdio.h:
|
stdio.h:
|
||||||
FOPEN_MAX
|
remove
|
||||||
L_tmpnam
|
rename
|
||||||
TMP_MAX
|
tmpfile
|
||||||
Operations on files: none http://www.cplusplus.com/reference/cstdio/
|
tmpnam
|
||||||
freopen
|
freopen
|
||||||
setbuf
|
setbuf
|
||||||
setvbuf
|
setvbuf
|
||||||
@ -114,4 +108,3 @@ string.h
|
|||||||
strxfrm
|
strxfrm
|
||||||
|
|
||||||
|
|
||||||
-all files in libc/kolibrisys catalog are stdcall in header, but in asm cdecl
|
|
||||||
|
Loading…
Reference in New Issue
Block a user