From c4a2c52411fea4db28fe69a1dc01c9ad1ffd542e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tyge=20L=C3=B8vset?= Date: Sun, 4 Jul 2021 13:32:55 +0200 Subject: [PATCH] Added __faststorefence() MSVC intrinsic (required e.g. by sqlite3). --- lib/libtcc1.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/libtcc1.c b/lib/libtcc1.c index d6d8dd28..ae94af17 100644 --- a/lib/libtcc1.c +++ b/lib/libtcc1.c @@ -631,3 +631,11 @@ long long __fixxfdi (long double a1) const float __mzerosf = -0.0; const double __mzerodf = -0.0; #endif + +#if defined _WIN64 +/* MSVC x64 intrinsic */ +void __faststorefence(void) +{ + __asm__("lock; orl $0,(%rsp)"); +} +#endif