Skip to content

Commit

Permalink
guard os support
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Nov 29, 2023
1 parent 496cdeb commit 7ebf67c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static int detectisa(const void* some_inst)
#endif
#endif

#else // _WIN32
#elif defined __ANDROID__ || defined __linux__ || defined __APPLE__
static int g_sigill_caught = 0;
static sigjmp_buf g_jmpbuf;

Expand Down Expand Up @@ -293,8 +293,9 @@ static int detectisa(void (*some_inst)())
};
#endif

#endif // _WIN32
#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__

#if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
DEFINE_INSTCODE(some_mmx, 0x0f, 0xdb, 0xc0) // pand mm0,mm0
DEFINE_INSTCODE(some_sse, 0x0f, 0x54, 0xc0) // andps xmm0,xmm0
Expand Down Expand Up @@ -345,6 +346,7 @@ DEFINE_INSTCODE(some_neon, 0x0d40ef00) // vadd.f32 q0,q0,q0
DEFINE_INSTCODE(some_vfpv4, 0x0600ffb6) // vcvt.f16.f32 d0,q0

#endif
#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__

#if defined __ANDROID__ || defined __linux__

Expand Down

0 comments on commit 7ebf67c

Please sign in to comment.