Chromium Code Reviews| Index: src/ia32/lithium-ia32.h |
| diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
| index 2067c62d1bd7c49cbaefbfa133ee367ad49f78e0..bec2f81a61d32d12868f20c42562f7c1b9175311 100644 |
| --- a/src/ia32/lithium-ia32.h |
| +++ b/src/ia32/lithium-ia32.h |
| @@ -249,7 +249,11 @@ class LInstruction: public ZoneObject { |
| void MarkAsCall() { is_call_ = true; } |
| // Interface to the register allocator and iterators. |
| - bool IsMarkedAsCall() const { return is_call_; } |
| + bool ClobbersTemps() const { return is_call_; } |
| + bool ClobbersRegisters() const { return is_call_; } |
| + virtual bool ClobbersDoubleRegisters() const { |
| + return is_call_ || !CpuFeatures::IsSupported(SSE2); |
| + } |
| virtual bool HasResult() const = 0; |
| virtual LOperand* result() = 0; |
| @@ -355,6 +359,7 @@ class LGap: public LTemplateInstruction<0, 0, 0> { |
| class LInstructionGap: public LGap { |
| public: |
| explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } |
| + virtual bool ClobbersDoubleRegisters() const { return false; } |
| DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") |
| }; |
| @@ -1413,7 +1418,6 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { |
| inputs_[0] = elements; |
| inputs_[1] = key; |
| } |
| - |
| LOperand* elements() { return inputs_[0]; } |
| LOperand* key() { return inputs_[1]; } |
| ElementsKind elements_kind() const { |
| @@ -1423,11 +1427,18 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { |
| return hydrogen()->is_external(); |
| } |
| + virtual bool ClobbersDoubleRegisters() const { |
| + return !IsDoubleOrFloatElementsKind(hydrogen()->elements_kind()); |
|
Jakob Kummerow
2012/11/28 16:28:22
Why the "!"? Doesn't it clobber the x87tos registe
danno
2012/11/30 16:23:24
Everything but double types clobber, but a double
|
| + } |
| + |
| DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| virtual void PrintDataTo(StringStream* stream); |
| uint32_t additional_index() const { return hydrogen()->index_offset(); } |
| + bool key_is_smi() { |
| + return hydrogen()->key()->representation().IsTagged(); |
| + } |
| }; |
| @@ -2408,8 +2419,9 @@ class LOsrEntry: public LTemplateInstruction<0, 0, 0> { |
| // slot, i.e., that must also be restored to the spill slot on OSR entry. |
| // NULL if the register has no assigned spill slot. Indexed by allocation |
| // index. |
| - LOperand* register_spills_[Register::kNumAllocatableRegisters]; |
| - LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters]; |
| + LOperand* register_spills_[Register::kMaxNumAllocatableRegisters]; |
| + LOperand* double_register_spills_[ |
| + DoubleRegister::kMaxNumAllocatableRegisters]; |
| }; |
| @@ -2573,6 +2585,7 @@ class LChunkBuilder BASE_EMBEDDED { |
| // Methods for getting operands for Use / Define / Temp. |
| LUnallocated* ToUnallocated(Register reg); |
| LUnallocated* ToUnallocated(XMMRegister reg); |
| + LUnallocated* ToUnallocated(X87TopOfStackRegister reg); |
| // Methods for setting up define-use relationships. |
| MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); |
| @@ -2633,6 +2646,8 @@ class LChunkBuilder BASE_EMBEDDED { |
| template<int I, int T> |
| LInstruction* DefineFixedDouble(LTemplateInstruction<1, I, T>* instr, |
| XMMRegister reg); |
| + template<int I, int T> |
| + LInstruction* DefineX87TOS(LTemplateInstruction<1, I, T>* instr); |
| // Assigns an environment to an instruction. An instruction which can |
| // deoptimize must have an environment. |
| LInstruction* AssignEnvironment(LInstruction* instr); |