Skip to content

Commit

Permalink
Fix addition and subtraction of 64 bit ints in 32 bit builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThyReaper committed Oct 30, 2014
1 parent 92747e9 commit 7ca458a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions as_jit.cpp
Expand Up @@ -2503,10 +2503,9 @@ int asCJITCompiler::CompileFunction(asIScriptFunction *function, asJITFunction *
eax = *edi-offset1;
eax += *edi-offset2;
*edi-offset0 = eax;
eax = *edi-offset1+4;
auto p = cpu.prep_short_jump(NotOverflow);
++eax;
cpu.end_short_jump(p);
eax.setIf(Carry);
eax.copy_zeroing(eax);
eax += *edi-offset1+4;
eax += *edi-offset2+4;
*edi-offset0+4 = eax;
#endif
Expand All @@ -2522,7 +2521,7 @@ int asCJITCompiler::CompileFunction(asIScriptFunction *function, asJITFunction *
eax -= *edi-offset2;
*edi-offset0 = eax;
eax = *edi-offset1+4;
auto p = cpu.prep_short_jump(NotOverflow);
auto p = cpu.prep_short_jump(NotCarry);
--eax;
cpu.end_short_jump(p);
eax -= *edi-offset2+4;
Expand Down

0 comments on commit 7ca458a

Please sign in to comment.