diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/jit/JITArithmetic.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/jit/JITArithmetic.cpp')
-rw-r--r-- | Source/JavaScriptCore/jit/JITArithmetic.cpp | 69 |
1 files changed, 8 insertions, 61 deletions
diff --git a/Source/JavaScriptCore/jit/JITArithmetic.cpp b/Source/JavaScriptCore/jit/JITArithmetic.cpp index bcb3dd74a..713d05e3b 100644 --- a/Source/JavaScriptCore/jit/JITArithmetic.cpp +++ b/Source/JavaScriptCore/jit/JITArithmetic.cpp @@ -35,6 +35,7 @@ #include "JSArray.h" #include "JSFunction.h" #include "Interpreter.h" +#include "Operations.h" #include "ResultType.h" #include "SamplingTool.h" @@ -628,61 +629,7 @@ void JIT::emitSlow_op_bitand(Instruction* currentInstruction, Vector<SlowCaseEnt } } -void JIT::emit_op_post_inc(Instruction* currentInstruction) -{ - unsigned result = currentInstruction[1].u.operand; - unsigned srcDst = currentInstruction[2].u.operand; - - emitGetVirtualRegister(srcDst, regT0); - move(regT0, regT1); - emitJumpSlowCaseIfNotImmediateInteger(regT0); - addSlowCase(branchAdd32(Overflow, TrustedImm32(1), regT1)); - emitFastArithIntToImmNoCheck(regT1, regT1); - emitPutVirtualRegister(srcDst, regT1); - emitPutVirtualRegister(result); -} - -void JIT::emitSlow_op_post_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - unsigned result = currentInstruction[1].u.operand; - unsigned srcDst = currentInstruction[2].u.operand; - - linkSlowCase(iter); - linkSlowCase(iter); - JITStubCall stubCall(this, cti_op_post_inc); - stubCall.addArgument(regT0); - stubCall.addArgument(Imm32(srcDst)); - stubCall.call(result); -} - -void JIT::emit_op_post_dec(Instruction* currentInstruction) -{ - unsigned result = currentInstruction[1].u.operand; - unsigned srcDst = currentInstruction[2].u.operand; - - emitGetVirtualRegister(srcDst, regT0); - move(regT0, regT1); - emitJumpSlowCaseIfNotImmediateInteger(regT0); - addSlowCase(branchSub32(Overflow, TrustedImm32(1), regT1)); - emitFastArithIntToImmNoCheck(regT1, regT1); - emitPutVirtualRegister(srcDst, regT1); - emitPutVirtualRegister(result); -} - -void JIT::emitSlow_op_post_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - unsigned result = currentInstruction[1].u.operand; - unsigned srcDst = currentInstruction[2].u.operand; - - linkSlowCase(iter); - linkSlowCase(iter); - JITStubCall stubCall(this, cti_op_post_dec); - stubCall.addArgument(regT0); - stubCall.addArgument(Imm32(srcDst)); - stubCall.call(result); -} - -void JIT::emit_op_pre_inc(Instruction* currentInstruction) +void JIT::emit_op_inc(Instruction* currentInstruction) { unsigned srcDst = currentInstruction[1].u.operand; @@ -693,7 +640,7 @@ void JIT::emit_op_pre_inc(Instruction* currentInstruction) emitPutVirtualRegister(srcDst); } -void JIT::emitSlow_op_pre_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) { unsigned srcDst = currentInstruction[1].u.operand; @@ -701,12 +648,12 @@ void JIT::emitSlow_op_pre_inc(Instruction* currentInstruction, Vector<SlowCaseEn linkSlowCase(iter); emitGetVirtualRegister(srcDst, regT0); notImm.link(this); - JITStubCall stubCall(this, cti_op_pre_inc); + JITStubCall stubCall(this, cti_op_inc); stubCall.addArgument(regT0); stubCall.call(srcDst); } -void JIT::emit_op_pre_dec(Instruction* currentInstruction) +void JIT::emit_op_dec(Instruction* currentInstruction) { unsigned srcDst = currentInstruction[1].u.operand; @@ -717,7 +664,7 @@ void JIT::emit_op_pre_dec(Instruction* currentInstruction) emitPutVirtualRegister(srcDst); } -void JIT::emitSlow_op_pre_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) { unsigned srcDst = currentInstruction[1].u.operand; @@ -725,7 +672,7 @@ void JIT::emitSlow_op_pre_dec(Instruction* currentInstruction, Vector<SlowCaseEn linkSlowCase(iter); emitGetVirtualRegister(srcDst, regT0); notImm.link(this); - JITStubCall stubCall(this, cti_op_pre_dec); + JITStubCall stubCall(this, cti_op_dec); stubCall.addArgument(regT0); stubCall.call(srcDst); } @@ -794,7 +741,7 @@ void JIT::emit_op_mod(Instruction* currentInstruction) void JIT::emitSlow_op_mod(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } #endif // CPU(X86) || CPU(X86_64) |