Commit Graph

41 Commits

Author SHA1 Message Date
Shinichiro Hamaji
39a4b859d4 x86-64: Fix cast from integers to pointers.
Now,

./tcc -run -DTCC_TARGET_X86_64 tcc.c -run tcctest.c

works!
2009-04-18 15:08:02 +02:00
Shinichiro Hamaji
83fd36333a Fixes for issues I've just found/introduced to x86 TCC.
- Cast from pointer to long long makes TCC output an error. Use cast to int before we apply shift operation for a pointer value.
- Removed test cases for casts from pointer to char/short because they produce warning.
2009-04-18 15:08:01 +02:00
Shinichiro Hamaji
be43c8e0ed x86-64: Cast from 64bit pointer to long long must not generate movslq. 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji
9fe28b610e x86-64: Make ABI for long double compatible with GCC.
- Now we use x87's stack top the long double return values.
- Add rc_fret and reg_fret, wrapper functions for RC_FRET and REG_FRET.
- Add a test case to check if strto* works OK.
2009-04-18 15:08:01 +02:00
Shinichiro Hamaji
0e239e2ba5 Improve the test coverage: !val for float/double/long long f. 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji
4f056031f4 Support long long bitfields for all architectures.
- Modified gv() and vstore(), added vpushll().
- Added a test case for long long bitfields.
- Tested on x86 and x86-64.
2009-04-18 15:07:09 +02:00
Shinichiro Hamaji
62e73da612 A uint64 bug fix on x86-64
64bit unsigned literal was handled as 32bit integer.
Added a unittest to catch this.
2009-04-18 15:07:08 +02:00
Kirill Smelkov
6213d4b4b6 string_test: we should always use 'unsigned int' for b
As recently shown in fb0ac2 (s/int/unsigned/ since GCC 4.3.2 produces
code which doesn't stop)

comparing (signed) int variable to 0x80000000 is not idea for x86_64.

This is not a good idea for x86_32 either, because GCC 4.3.2 (the one in
Debian Lenny) rightly assumes that a signed int could be never
0x80000000, and thus removes the check from

    while (b != 0x80000000) {
        ...

completely.

If we want this check, we need b to be always 'unsigned'

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
2009-04-18 15:07:08 +02:00
Shinichiro Hamaji
aa8d22e38e Add several test cases. 2008-12-02 02:32:52 +01:00
Shinichiro Hamaji
fb0ac27691 s/int/unsigned/ since GCC 4.3.2 produces code which doesn't stop. 2008-12-02 02:26:42 +01:00
grischka
f22e961f80 update manual, changelog 2008-03-31 19:50:58 +00:00
bellard
65b974e396 conversion test 2006-10-28 14:47:14 +00:00
bellard
365d0ad545 multiple typedef test 2006-10-28 14:28:33 +00:00
bellard
aee0da0b17 avoid jumping into statement expression 2005-09-04 09:27:53 +00:00
bellard
4386b4566b macro function test 2005-06-17 22:06:18 +00:00
bellard
c2ec76a41f gcc 3.3 compatibility fix for multi-line string literals 2004-10-28 21:13:47 +00:00
bellard
bb07bf31aa update 2004-10-23 22:52:58 +00:00
bellard
807321efba update 2004-10-18 00:20:41 +00:00
bellard
277e01cd64 const warning test 2003-06-02 20:31:46 +00:00
bellard
638e666c42 fixed zero arg macro parse 2003-05-18 18:48:33 +00:00
bellard
5908725ad5 test macro substitution inside macro args 2003-05-18 17:08:55 +00:00
bellard
a901c5f204 update 2003-04-27 11:45:54 +00:00
bellard
60efcfe27c update 2003-04-26 20:52:38 +00:00
bellard
0d6f8021ee update 2003-04-14 22:23:55 +00:00
bellard
d579dc4dbf gcc 3 tests activated - new tests for 0.9.17 2003-04-13 19:48:52 +00:00
bellard
75e743d23e update 2003-01-06 20:19:20 +00:00
bellard
7808b4046e fixes for buggy GCC compilers 2002-12-08 14:37:00 +00:00
bellard
122198a8c2 update 2002-11-24 15:58:28 +00:00
bellard
923627f030 computed goto test 2002-11-03 00:44:07 +00:00
bellard
b31d34fa0b sizeof/alignof/typeof tests 2002-11-02 20:46:36 +00:00
bellard
973eb60e01 more long long tests - more ## tests 2002-11-02 14:14:50 +00:00
bellard
1cb355747a update 2002-09-08 21:56:11 +00:00
bellard
f1418e836f more tests 2002-08-31 12:45:26 +00:00
bellard
acba7d10a2 better #line and #include tests 2002-08-18 13:18:20 +00:00
bellard
8264c257e7 more tests 2002-07-27 14:06:23 +00:00
bellard
9a8976d5eb update 2002-07-14 14:39:27 +00:00
bellard
7ab1ac48bb more tests 2002-07-13 17:24:30 +00:00
bellard
9a69c067c3 negative float const 2002-03-17 11:41:27 +00:00
bellard
d2c9157388 added more #elif tests 2002-01-26 17:24:07 +00:00
bellard
cc10b240cb add c99 macros 2002-01-05 20:21:43 +00:00
bellard
04ae07f03e changed tcc tests name 2002-01-05 17:03:02 +00:00