tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] tinycc x86 platform fastcall bug


From: xzm2
Subject: [Tinycc-devel] tinycc x86 platform fastcall bug
Date: Wed, 15 Feb 2017 15:41:40 +0800

tinycc x86 platform __fastcall bug.
Example code:
///////////////////////////////////////////////
#include <stdio.h>

void __fastcall go(double d)
{
        printf("go fastcall: %f\n", d);
}
void __cdecl go2(double d)
{
        printf("go cdecl: %f\n", d);
}
void __fastcall gof(float d)
{
        printf("go fastcall float: %f\n", d);
}
void __fastcall golong(__int64 n)
{
        printf("go fastcall int64: 0x%016I64X\n", n);
}

int main(int argc, char * argv[])
{
        double pi = 3.14;
        go(pi);
        go2(pi);
        gof((float)pi);
        golong(0x1234567812345678UL);
        return 0;
}
///////////////////////////////////////////////////////////
tcc run the above code, output:
go fastcall: 0.000000
go cdecl: 3.140000
go fastcall float: 3.140000
go fastcall int64: 0x003AFACC12345678

reply via email to

[Prev in Thread] Current Thread [Next in Thread]