mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-26 12:04:59 +08:00
update
This commit is contained in:
parent
c5ab452d64
commit
0d6f8021ee
@ -1,3 +1,11 @@
|
|||||||
|
version 0.9.18:
|
||||||
|
|
||||||
|
- header fix (time.h)
|
||||||
|
- fixed inline asm without operand case
|
||||||
|
- fixed 'default:' or 'case x:' with '}' after (incorrect C construct accepted
|
||||||
|
by gcc)
|
||||||
|
- added 'A' inline asm constraint.
|
||||||
|
|
||||||
version 0.9.17:
|
version 0.9.17:
|
||||||
|
|
||||||
- PLT generation fix
|
- PLT generation fix
|
||||||
|
3
TODO
3
TODO
@ -3,8 +3,6 @@ TODO list:
|
|||||||
- '-b' bug.
|
- '-b' bug.
|
||||||
- atexit (Nigel Horne)
|
- atexit (Nigel Horne)
|
||||||
- see -lxxx bug (Michael Charity).
|
- see -lxxx bug (Michael Charity).
|
||||||
- empty 'default:' in switch.
|
|
||||||
- fix asm without input/output (no % preprocessing)
|
|
||||||
- handle inline functions as macros.
|
- handle inline functions as macros.
|
||||||
- see transparent union pb in /urs/include/sys/socket.h
|
- see transparent union pb in /urs/include/sys/socket.h
|
||||||
- precise behaviour of typeof with arrays ? (__put_user macro)
|
- precise behaviour of typeof with arrays ? (__put_user macro)
|
||||||
@ -14,7 +12,6 @@ TODO list:
|
|||||||
variable initialization (',' is considered incorrectly as separator
|
variable initialization (',' is considered incorrectly as separator
|
||||||
in preparser) : change func argument code generator ?
|
in preparser) : change func argument code generator ?
|
||||||
- function pointers/lvalues in ? : (linux kernel net/core/dev.c)
|
- function pointers/lvalues in ? : (linux kernel net/core/dev.c)
|
||||||
- add A x86 asm constraint (linux asm-i386/div64.h)
|
|
||||||
- transform functions to function pointers in function parameters (net/ipv4/ip_output.c)
|
- transform functions to function pointers in function parameters (net/ipv4/ip_output.c)
|
||||||
- fix function pointer type display
|
- fix function pointer type display
|
||||||
- fix bound exit on RedHat 7.3
|
- fix bound exit on RedHat 7.3
|
||||||
|
21
tcctest.c
21
tcctest.c
@ -1841,6 +1841,20 @@ static __inline__ __const__ unsigned int swab32(unsigned int x)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long mul64(unsigned int a, unsigned int b)
|
||||||
|
{
|
||||||
|
unsigned long long res;
|
||||||
|
__asm__("mull %2" : "=A" (res) : "a" (a), "r" (b));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long inc64(unsigned long long a)
|
||||||
|
{
|
||||||
|
unsigned long long res;
|
||||||
|
__asm__("addl $1, %%eax ; adcl $0, %%edx" : "=A" (res) : "A" (a));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int set;
|
unsigned int set;
|
||||||
|
|
||||||
void asm_test(void)
|
void asm_test(void)
|
||||||
@ -1849,10 +1863,17 @@ void asm_test(void)
|
|||||||
unsigned int val;
|
unsigned int val;
|
||||||
|
|
||||||
printf("inline asm:\n");
|
printf("inline asm:\n");
|
||||||
|
/* test the no operand case */
|
||||||
|
asm volatile ("xorl %eax, %eax");
|
||||||
|
|
||||||
memcpy1(buf, "hello", 6);
|
memcpy1(buf, "hello", 6);
|
||||||
strncat1(buf, " worldXXXXX", 3);
|
strncat1(buf, " worldXXXXX", 3);
|
||||||
printf("%s\n", buf);
|
printf("%s\n", buf);
|
||||||
|
|
||||||
|
/* 'A' constraint test */
|
||||||
|
printf("mul64=0x%Lx\n", mul64(0x12345678, 0xabcd1234));
|
||||||
|
printf("inc64=0x%Lx\n", inc64(0x12345678ffffffff));
|
||||||
|
|
||||||
set = 0xff;
|
set = 0xff;
|
||||||
sigdelset1(&set, 2);
|
sigdelset1(&set, 2);
|
||||||
sigaddset1(&set, 16);
|
sigaddset1(&set, 16);
|
||||||
|
Loading…
Reference in New Issue
Block a user