From 4600ba0381ea86bdfdcba8f4f762c89f5c51af5b Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 5 Oct 2011 00:36:03 +0300 Subject: try to support more compilers --- libpcsxcore/new_dynarec/new_dynarec.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'libpcsxcore/new_dynarec/new_dynarec.c') diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 362e3c6..0128758 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -21,10 +21,15 @@ #include #include //include for uint64_t #include +#include #include "emu_if.h" //emulator interface -#include +//#define DISASM +//#define assem_debug printf +//#define inv_debug printf +#define assem_debug(...) +#define inv_debug(...) #ifdef __i386__ #include "assem_x86.h" @@ -265,12 +270,6 @@ int tracedebug=0; //#define DEBUG_CYCLE_COUNT 1 -void nullf() {} -//#define assem_debug printf -//#define inv_debug printf -#define assem_debug nullf -#define inv_debug nullf - static void tlb_hacks() { #ifndef DISABLE_TLB @@ -848,7 +847,7 @@ void alloc_all(struct regstat *cur,int i) } } - +#ifndef FORCE32 void div64(int64_t dividend,int64_t divisor) { lo=dividend/divisor; @@ -959,6 +958,7 @@ uint64_t ldr_merge(uint64_t original,uint64_t loaded,u_int bits) else original=loaded; return original; } +#endif #ifdef __i386__ #include "assem_x86.c" @@ -7787,6 +7787,7 @@ void clean_registers(int istart,int iend,int wr) } } +#ifdef DISASM /* disassembly */ void disassemble_inst(int i) { @@ -7875,6 +7876,9 @@ void disassemble_inst(int i) printf (" %x: %s\n",start+i*4,insn[i]); } } +#else +static void disassemble_inst(int i) {} +#endif // DISASM // clear the state completely, instead of just marking // things invalid like invalidate_all_pages() does @@ -10894,9 +10898,9 @@ int new_recompile_block(int addr) if(itype[slen-1]==SPAN) { bt[slen-1]=1; // Mark as a branch target so instruction can restart after exception } - + +#ifdef DISASM /* Debug/disassembly */ - if((void*)assem_debug==(void*)printf) for(i=0;i