Skip to content

Commit

Permalink
(Backport commit r4574) - JIT: - fix timings broke in r4561
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jan 2, 2014
1 parent 4222a40 commit 9923bf9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile.libretro
Expand Up @@ -220,7 +220,7 @@ SOURCES += \
utils/AsmJit/x86/x86func.cpp \
utils/AsmJit/x86/x86operand.cpp \
utils/AsmJit/x86/x86util.cpp
CPPFLAGS += -DHAVE_JIT
CPPFLAGS += -DHAVE_JIT -DASMJIT_POSIX
endif

DEBUG=0
Expand Down
20 changes: 13 additions & 7 deletions src/arm_jit.cpp
Expand Up @@ -700,7 +700,7 @@ static void emit_MMU_aluMemCycles(int alu_cycles, GpVar mem_cycles, int populati
if(REG_POS(i,12)==15) \
{ \
S_DST_R15; \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
return 1; \
} \
SET_NZCV(!symmetric); \
Expand All @@ -712,7 +712,7 @@ static void emit_MMU_aluMemCycles(int alu_cycles, GpVar mem_cycles, int populati
GpVar tmp = c.newGpVar(kX86VarTypeGpd); \
c.mov(tmp, reg_ptr(15)); \
c.mov(cpu_ptr(next_instruction), tmp); \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
} \
} \
return 1;
Expand All @@ -728,7 +728,7 @@ static void emit_MMU_aluMemCycles(int alu_cycles, GpVar mem_cycles, int populati
if(REG_POS(i,12)==15) \
{ \
S_DST_R15; \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
return 1; \
} \
SET_NZCV(1); \
Expand All @@ -739,7 +739,7 @@ static void emit_MMU_aluMemCycles(int alu_cycles, GpVar mem_cycles, int populati
{ \
GpVar tmp = c.newGpVar(kX86VarTypeGpd); \
c.mov(cpu_ptr(next_instruction), lhs); \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
} \
} \
return 1;
Expand All @@ -763,7 +763,7 @@ static void emit_MMU_aluMemCycles(int alu_cycles, GpVar mem_cycles, int populati
if(REG_POS(i,12)==15) \
{ \
S_DST_R15; \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
return 1; \
} \
SET_NZC; \
Expand Down Expand Up @@ -1097,7 +1097,7 @@ static int OP_MOV_IMM_VAL(const u32 i) { OP_MOV(IMM_VAL); }
if(REG_POS(i,12)==15) \
{ \
S_DST_R15; \
bb_constant_cycles += 2; \
c.add(bb_total_cycles, 2); \
return 1; \
} \
if(!rhs_is_imm) \
Expand Down Expand Up @@ -4116,8 +4116,14 @@ static u32 compile_basicblock()
if(cycles == 0)
{
JIT_COMMENT("variable cycles");
c.lea(bb_total_cycles, ptr(bb_total_cycles.r64(), bb_cycles.r64(), kScaleNone));
c.lea(bb_total_cycles, ptr(bb_total_cycles.r64(), bb_cycles.r64(), kScaleNone, -1));
}
else
if (cycles > 1)
{
JIT_COMMENT("cycles (%d)", cycles);
c.lea(bb_total_cycles, ptr(bb_total_cycles.r64(), -1));
}
c.bind(skip);
}
else
Expand Down

0 comments on commit 9923bf9

Please sign in to comment.