aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2011-10-05 00:36:03 +0300
committernotaz2011-10-08 03:29:24 +0300
commit4600ba0381ea86bdfdcba8f4f762c89f5c51af5b (patch)
tree672ed203e5d3f4aaf7450fcaaab9658b6583d2ec /libpcsxcore
parentb96d3df7d4272503a287d243c09173eb6c842609 (diff)
downloadpcsx_rearmed-4600ba0381ea86bdfdcba8f4f762c89f5c51af5b.tar.gz
pcsx_rearmed-4600ba0381ea86bdfdcba8f4f762c89f5c51af5b.tar.bz2
pcsx_rearmed-4600ba0381ea86bdfdcba8f4f762c89f5c51af5b.zip
try to support more compilers
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/new_dynarec/assem_arm.c4
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c27
-rw-r--r--libpcsxcore/psxinterpreter.c8
3 files changed, 24 insertions, 15 deletions
diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c
index 3447874..71c397c 100644
--- a/libpcsxcore/new_dynarec/assem_arm.c
+++ b/libpcsxcore/new_dynarec/assem_arm.c
@@ -4890,6 +4890,7 @@ void multdiv_assemble_arm(int i,struct regstat *i_regs)
}
}
else // 64-bit
+#ifndef FORCE32
{
if(opcode2[i]==0x1C) // DMULT
{
@@ -5063,6 +5064,9 @@ void multdiv_assemble_arm(int i,struct regstat *i_regs)
if(lol>=0) emit_loadreg(LOREG,lol);
}
}
+#else
+ assert(0);
+#endif
}
else
{
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 <stdlib.h>
#include <stdint.h> //include for uint64_t
#include <assert.h>
+#include <sys/mman.h>
#include "emu_if.h" //emulator interface
-#include <sys/mman.h>
+//#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<slen;i++)
{
printf("U:");
@@ -11112,6 +11116,7 @@ int new_recompile_block(int addr)
#endif
}
}
+#endif // DISASM
/* Pass 8 - Assembly */
linkcount=0;stubcount=0;
@@ -11144,7 +11149,7 @@ int new_recompile_block(int addr)
for(i=0;i<slen;i++)
{
//if(ds) printf("ds: ");
- if((void*)assem_debug==(void*)printf) disassemble_inst(i);
+ disassemble_inst(i);
if(ds) {
ds=0; // Skip delay slot
if(bt[i]) assem_debug("OOPS - branch into delay slot\n");
diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c
index 33616e5..84e1da5 100644
--- a/libpcsxcore/psxinterpreter.c
+++ b/libpcsxcore/psxinterpreter.c
@@ -39,7 +39,7 @@ static u32 branchPC;
#define debugI()
#endif
-inline void execI();
+void execI();
// Subsets
void (*psxBSC[64])();
@@ -408,7 +408,7 @@ static int psxDelayBranchTest(u32 tar1) {
return psxDelayBranchExec(tmp2);
}
-__inline void doBranch(u32 tar) {
+static void doBranch(u32 tar) {
u32 *code;
u32 tmp;
@@ -788,7 +788,7 @@ void psxTestSWInts() {
}
}
-__inline void MTC0(int reg, u32 val) {
+void MTC0(int reg, u32 val) {
// SysPrintf("MTC0 %d: %x\n", reg, val);
switch (reg) {
case 12: // Status
@@ -928,7 +928,7 @@ static void intShutdown() {
}
// interpreter execution
-inline void execI() {
+void execI() {
u32 *code = (u32 *)PSXM(psxRegs.pc);
psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code));