From 1e4e00a1a79a29b5180c815f01298e600d419261 Mon Sep 17 00:00:00 2001 From: "ggaren@apple.com" Date: Tue, 2 Dec 2008 21:52:24 +0000 Subject: [PATCH] 2008-12-02 Geoffrey Garen Reviewed by Geoffrey Garen. (Patch by Cameron Zwarich .) Fixed https://bugs.webkit.org/show_bug.cgi?id=22482 REGRESSION (r37991): Occasionally see "Scene rendered incorrectly" message when running the V8 Raytrace benchmark Rolled out r37991. It didn't properly save xmm0, which is caller-save, before calling helper functions. SunSpider and v8 benchmarks show little change -- possibly a .2% SunSpider regression, possibly a .2% v8 benchmark speedup. * assembler/X86Assembler.h: (JSC::X86Assembler::): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): * bytecode/Instruction.h: (JSC::Instruction::): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitUnaryOp): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::emitToJSNumber): (JSC::BytecodeGenerator::emitTypeOf): (JSC::BytecodeGenerator::emitGetPropertyNames): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * interpreter/Interpreter.h: * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: * parser/Nodes.cpp: (JSC::UnaryOpNode::emitBytecode): (JSC::BinaryOpNode::emitBytecode): (JSC::EqualNode::emitBytecode): * parser/ResultType.h: (JSC::ResultType::isReusable): (JSC::ResultType::mightBeNumber): * runtime/JSNumberCell.h: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38917 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- JavaScriptCore/ChangeLog | 42 ++++++++++ JavaScriptCore/assembler/X86Assembler.h | 18 ----- JavaScriptCore/bytecode/CodeBlock.cpp | 1 - JavaScriptCore/bytecode/Instruction.h | 2 - JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 4 +- JavaScriptCore/bytecompiler/BytecodeGenerator.h | 8 +- JavaScriptCore/interpreter/Interpreter.cpp | 1 - JavaScriptCore/interpreter/Interpreter.h | 2 - JavaScriptCore/jit/JIT.cpp | 94 +---------------------- JavaScriptCore/jit/JIT.h | 12 --- JavaScriptCore/parser/Nodes.cpp | 6 +- JavaScriptCore/parser/ResultType.h | 10 --- JavaScriptCore/runtime/JSNumberCell.h | 5 -- 13 files changed, 53 insertions(+), 152 deletions(-) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index b8ccbb6..fbe8f5a 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,45 @@ +2008-12-02 Geoffrey Garen + + Reviewed by Geoffrey Garen. (Patch by Cameron Zwarich .) + + Fixed https://bugs.webkit.org/show_bug.cgi?id=22482 + REGRESSION (r37991): Occasionally see "Scene rendered incorrectly" + message when running the V8 Raytrace benchmark + + Rolled out r37991. It didn't properly save xmm0, which is caller-save, + before calling helper functions. + + SunSpider and v8 benchmarks show little change -- possibly a .2% + SunSpider regression, possibly a .2% v8 benchmark speedup. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Instruction.h: + (JSC::Instruction::): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitUnaryOp): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitToJSNumber): + (JSC::BytecodeGenerator::emitTypeOf): + (JSC::BytecodeGenerator::emitGetPropertyNames): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * parser/Nodes.cpp: + (JSC::UnaryOpNode::emitBytecode): + (JSC::BinaryOpNode::emitBytecode): + (JSC::EqualNode::emitBytecode): + * parser/ResultType.h: + (JSC::ResultType::isReusable): + (JSC::ResultType::mightBeNumber): + * runtime/JSNumberCell.h: + 2008-12-01 Gavin Barraclough Reviewed by Geoffrey Garen. diff --git a/JavaScriptCore/assembler/X86Assembler.h b/JavaScriptCore/assembler/X86Assembler.h index adfc27c..418d175 100644 --- a/JavaScriptCore/assembler/X86Assembler.h +++ b/JavaScriptCore/assembler/X86Assembler.h @@ -123,7 +123,6 @@ public: OP2_CVTSI2SD_VsdEd = 0x2A, OP2_CVTTSD2SI_GdWsd = 0x2C, OP2_UCOMISD_VsdWsd = 0x2E, - OP2_XORPD_VsdWsd = 0x57, OP2_ADDSD_VsdWsd = 0x58, OP2_MULSD_VsdWsd = 0x59, OP2_SUBSD_VsdWsd = 0x5C, @@ -159,7 +158,6 @@ public: GROUP2_OP_SAR = 7, GROUP3_OP_TEST = 0, - GROUP3_OP_NEG = 3, GROUP3_OP_IDIV = 7, GROUP5_OP_CALLN = 2, @@ -590,12 +588,6 @@ public: modRm_opr(GROUP3_OP_IDIV, dst); } - void negl_r(RegisterID dst) - { - m_buffer->putByte(OP_GROUP3_Ev); - modRm_opr(GROUP3_OP_NEG, dst); - } - void cdq() { m_buffer->putByte(OP_CDQ); @@ -770,16 +762,6 @@ public: modRm_rm((RegisterID)dst, base, offset); } -#if !PLATFORM(X86_64) - void xorpd_mr(void* addr, XMMRegisterID dst) - { - m_buffer->putByte(PRE_SSE_66); - m_buffer->putByte(OP_2BYTE_ESCAPE); - m_buffer->putByte(OP2_XORPD_VsdWsd); - modRm_rm((RegisterID)dst, addr); - } -#endif - void movsd_rm(XMMRegisterID src, int offset, RegisterID base) { m_buffer->putByte(PRE_SSE_F2); diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp index ad783e2..88707c7 100644 --- a/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/JavaScriptCore/bytecode/CodeBlock.cpp @@ -468,7 +468,6 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_negate: { printUnaryOp(location, it, "negate"); - ++it; break; } case op_add: { diff --git a/JavaScriptCore/bytecode/Instruction.h b/JavaScriptCore/bytecode/Instruction.h index 2ed42ab..774e855 100644 --- a/JavaScriptCore/bytecode/Instruction.h +++ b/JavaScriptCore/bytecode/Instruction.h @@ -30,7 +30,6 @@ #define Instruction_h #include "Opcode.h" -#include "ResultType.h" #include #define POLYMORPHIC_LIST_CACHE_SIZE 4 @@ -138,7 +137,6 @@ namespace JSC { Structure* structure; StructureChain* structureChain; JSCell* jsCell; - ResultType::Type resultType; PolymorphicAccessStructureList* polymorphicStructures; } u; }; diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 221860e..bcff627 100644 --- a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -749,13 +749,11 @@ RegisterID* BytecodeGenerator::emitMove(RegisterID* dst, RegisterID* src) return dst; } -RegisterID* BytecodeGenerator::emitUnaryOp(OpcodeID opcodeID, RegisterID* dst, RegisterID* src, ResultType type) +RegisterID* BytecodeGenerator::emitUnaryOp(OpcodeID opcodeID, RegisterID* dst, RegisterID* src) { emitOpcode(opcodeID); instructions().append(dst->index()); instructions().append(src->index()); - if (opcodeID == op_negate) - instructions().append(type.toInt()); return dst; } diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/JavaScriptCore/bytecompiler/BytecodeGenerator.h index 016352a..10d0d71 100644 --- a/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -231,7 +231,7 @@ namespace JSC { RegisterID* emitUnexpectedLoad(RegisterID* dst, bool); RegisterID* emitUnexpectedLoad(RegisterID* dst, double); - RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src, ResultType); + RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src); RegisterID* emitBinaryOp(OpcodeID, RegisterID* dst, RegisterID* src1, RegisterID* src2, OperandTypes); RegisterID* emitEqualityOp(OpcodeID, RegisterID* dst, RegisterID* src1, RegisterID* src2); RegisterID* emitUnaryNoDstOp(OpcodeID, RegisterID* src); @@ -245,14 +245,14 @@ namespace JSC { RegisterID* emitMove(RegisterID* dst, RegisterID* src); - RegisterID* emitToJSNumber(RegisterID* dst, RegisterID* src) { return emitUnaryOp(op_to_jsnumber, dst, src, ResultType::unknown()); } + RegisterID* emitToJSNumber(RegisterID* dst, RegisterID* src) { return emitUnaryOp(op_to_jsnumber, dst, src); } RegisterID* emitPreInc(RegisterID* srcDst); RegisterID* emitPreDec(RegisterID* srcDst); RegisterID* emitPostInc(RegisterID* dst, RegisterID* srcDst); RegisterID* emitPostDec(RegisterID* dst, RegisterID* srcDst); RegisterID* emitInstanceOf(RegisterID* dst, RegisterID* value, RegisterID* base, RegisterID* basePrototype); - RegisterID* emitTypeOf(RegisterID* dst, RegisterID* src) { return emitUnaryOp(op_typeof, dst, src, ResultType::unknown()); } + RegisterID* emitTypeOf(RegisterID* dst, RegisterID* src) { return emitUnaryOp(op_typeof, dst, src); } RegisterID* emitIn(RegisterID* dst, RegisterID* property, RegisterID* base) { return emitBinaryOp(op_in, dst, property, base, OperandTypes()); } RegisterID* emitResolve(RegisterID* dst, const Identifier& property); @@ -290,7 +290,7 @@ namespace JSC { PassRefPtr