From de4f791e30be4e4239b381c11745ffa4d87ddb8b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 9 Nov 2012 12:15:52 +0100 Subject: Imported WebKit commit e2c32e2f53e02d388e70b9db88b91d8d9d28fc84 (http://svn.webkit.org/repository/webkit/trunk@133952) Revert back to an older snapshot that should build on ARM --- Source/JavaScriptCore/jit/JITArithmetic.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Source/JavaScriptCore/jit/JITArithmetic.cpp') diff --git a/Source/JavaScriptCore/jit/JITArithmetic.cpp b/Source/JavaScriptCore/jit/JITArithmetic.cpp index bcb3dd74a..21d59bc33 100644 --- a/Source/JavaScriptCore/jit/JITArithmetic.cpp +++ b/Source/JavaScriptCore/jit/JITArithmetic.cpp @@ -29,7 +29,7 @@ #include "JIT.h" #include "CodeBlock.h" -#include "JITInlines.h" +#include "JITInlineMethods.h" #include "JITStubCall.h" #include "JITStubs.h" #include "JSArray.h" @@ -1090,20 +1090,18 @@ void JIT::emit_op_div(Instruction* currentInstruction) // access). So if we are DFG compiling anything in the program, we want this code to // ensure that it produces integers whenever possible. + // FIXME: This will fail to convert to integer if the result is zero. We should + // distinguish between positive zero and negative zero here. + JumpList notInteger; branchConvertDoubleToInt32(fpRegT0, regT0, notInteger, fpRegT1); // If we've got an integer, we might as well make that the result of the division. emitFastArithReTagImmediate(regT0, regT0); Jump isInteger = jump(); notInteger.link(this); - moveDoubleTo64(fpRegT0, regT0); - Jump doubleZero = branchTest64(Zero, regT0); add32(TrustedImm32(1), AbsoluteAddress(&m_codeBlock->addSpecialFastCaseProfile(m_bytecodeOffset)->m_counter)); + moveDoubleTo64(fpRegT0, regT0); sub64(tagTypeNumberRegister, regT0); - Jump trueDouble = jump(); - doubleZero.link(this); - move(tagTypeNumberRegister, regT0); - trueDouble.link(this); isInteger.link(this); #else // Double result. -- cgit v1.2.1