Hi Tyge,

 

With your last commit I no longer need -DSQLITE_MEMORY_BARRIER="0"  
-DSQLITE_THREADSAFE=0 to compile SQLite with tcc on Windows x64.

 

Thank you!

 

C.

 

From: Tinycc-devel [mailto:[email protected]] On 
Behalf Of Tyge Løvset
Sent: Sunday, June 20, 2021 20:31
To: [email protected]
Subject: [Tinycc-devel] sqlite on windows

 

Hi,

It works on Linux: tcc insert_data.c sqlite.c -pthread -ldl, but on win64 I get 
an undefined intrinsic symbol   __faststorefence(). It can be implemented as an 
mfence instruction, but I think microsoft implements it with xchgl or similar, 
as below. Should we add this?

 

#ifdef _WIN64

void __faststorefence(void) {

    long __fence;

    __asm__ __volatile__( "xchgl %%eax, %0" :"=m"(__fence));

    //__asm__ __volatile__("mfence":::"memory");

}

#endif

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to