Use __GNUC__ to handle GCC specific code

This commit is contained in:
scribam 2019-08-25 18:41:42 +02:00
parent 51d181a46c
commit 1b002ae0da
4 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@
#include "build.h"
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
#define __fastcall BALLZZ!!
#endif

View File

@ -650,7 +650,7 @@ void armv_prof(OpType opt,u32 op,u32 flg);
extern "C" void arm_dispatch();
extern "C" void arm_exit();
extern "C" void DYNACALL
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
// Avoid inlining / duplicating / whatever
__attribute__ ((optimize(0)))
#endif
@ -690,7 +690,7 @@ u32 DYNACALL DoMemOp(u32 addr,u32 data)
}
//findfirstset -- used in LDM/STM handling
#if HOST_CPU==CPU_X86 && BUILD_COMPILER != COMPILER_GCC
#if HOST_CPU==CPU_X86 && !defined(__GNUC__)
#include <intrin.h>
u32 findfirstset(u32 v)

View File

@ -15,7 +15,7 @@ void WriteSample(s16 right, s16 left);
u32 static INLINE bitscanrev(u32 v)
{
#if (BUILD_COMPILER==COMPILER_GCC)
#ifdef __GNUC__
return 31-__builtin_clz(v);
#else
unsigned long rv;

View File

@ -14,7 +14,7 @@
void ngen_opcode(RuntimeBlockInfo* block, shil_opcode* op,x86_block* x86e, bool staging, bool optimise);
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
extern "C"
{
#endif
@ -29,7 +29,7 @@ void ngen_mainloop(void* cntx);
void DYNACALL ngen_blockcheckfail(u32 addr);
void DYNACALL ngen_blockcheckfail2(u32 addr);
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
}
#endif