Skip to content

Commit c7232c7

Browse files
committed
Fixing windows issues in CI dur to clang-cl
1 parent ab63a65 commit c7232c7

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

lib/libtcc1.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ typedef unsigned int USItype;
3737
typedef long long DWtype;
3838
typedef unsigned long long UDWtype;
3939

40-
#if defined(_WIN64) && defined(_MSC_VER)
41-
#include <intrin.h>
42-
#endif
43-
4440
struct DWstruct {
4541
Wtype low, high;
4642
};
@@ -652,15 +648,11 @@ long long __fixxfdi (long double a1)
652648
}
653649
#endif /* !ARM */
654650

655-
#if defined _WIN64
656-
/* MSVC x64 intrinsic */
651+
#if defined(_WIN64) && !defined(_MSC_VER)
652+
/* Fallback helper for GNU-like Windows compilers.
653+
MSVC/clang-cl provide __faststorefence as an intrinsic/builtin. */
657654
void __faststorefence(void)
658655
{
659-
#if defined(_MSC_VER)
660-
__declspec(align(16)) static volatile long _minicc_sfence_word;
661-
_InterlockedOr((volatile long *)&_minicc_sfence_word, 0);
662-
#else
663656
__asm__("lock; orl $0,(%rsp)");
664-
#endif
665657
}
666658
#endif

0 commit comments

Comments
 (0)