tinycc/tests
seyko 4e04f67c94 fix-mixed-struct (patch by Pip Cet)
Jsut for testing. It works for me (don't break anything)
    Small fixes for x86_64-gen.c in "tccpp: fix issues, add tests"
    are dropped in flavor of this patch.

    Pip Cet:

    Okay, here's a first patch that fixes the problem (but I've found
    another bug, yet unfixed, in the process), though it's not
    particularly pretty code (I tried hard to keep the changes to the
    minimum necessary). If we decide to actually get rid of VT_QLONG and
    VT_QFLOAT (please, can we?), there are some further simplifications in
    tccgen.c that might offset some of the cost of this patch.

    The idea is that an integer is no longer enough to describe how an
    argument is stored in registers. There are a number of possibilities
    (none, integer register, two integer registers, float register, two
    float registers, integer register plus float register, float register
    plus integer register), and instead of enumerating them I've
    introduced a RegArgs type that stores the offsets for each of our
    registers (for the other architectures, it's simply an int specifying
    the number of registers). If someone strongly prefers an enum, we
    could do that instead, but I believe this is a place where keeping
    things general is worth it, because this way it should be doable to
    add SSE or AVX support.

    There is one line in the patch that looks suspicious:

             } else {
                 addr = (addr + align - 1) & -align;
                 param_addr = addr;
                 addr += size;
    -            sse_param_index += reg_count;
             }
             break;

    However, this actually fixes one half of a bug we have when calling a
    function with eight double arguments "interrupted" by a two-double
    structure after the seventh double argument:

    f(double,double,double,double,double,double,double,struct { double
    x,y; },double);

    In this case, the last argument should be passed in %xmm7. This patch
    fixes the problem in gfunc_prolog, but not the corresponding problem
    in gfunc_call, which I'll try tackling next.
2015-05-14 07:32:24 +03:00
..
pp tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
tests2 tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
abitest.c fix-mixed-struct (patch by Pip Cet) 2015-05-14 07:32:24 +03:00
asmtest.S Allow tcc to understand a setob,... opcodes as alias to seto,... 2015-01-06 22:59:19 +03:00
boundtest.c a bounds checking code for the ARCH=x86_64 2015-04-10 15:17:22 +03:00
CMakeLists.txt Improved variable length array support. 2013-04-27 22:58:52 +01:00
gcctestsuite.sh Fix bashims in configure and gcctestsuite.sh. 2010-05-26 14:08:29 +02:00
libtcc_test.c tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
Makefile tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
tcctest.c tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
tcctest.py Added cross compilation to CMake build system. 2013-04-25 01:08:18 +01:00
vla_test.c Improved variable length array support. 2013-04-27 22:58:52 +01:00