| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | 270 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } |
| 271 | 271 |
| 272 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 272 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
| 273 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 273 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
| 274 | 274 |
| 275 // Interface to the register allocator and iterators. | 275 // Interface to the register allocator and iterators. |
| 276 bool ClobbersTemps() const { return IsCall(); } | 276 bool ClobbersTemps() const { return IsCall(); } |
| 277 bool ClobbersRegisters() const { return IsCall(); } | 277 bool ClobbersRegisters() const { return IsCall(); } |
| 278 virtual bool ClobbersDoubleRegisters() const { | 278 virtual bool ClobbersDoubleRegisters() const { |
| 279 return IsCall() || | 279 return IsCall() || |
| 280 (!CpuFeatures::IsSupported(SSE2) && | 280 // We only have rudimentary X87Stack tracking, thus in general |
| 281 // We only have rudimentary X87Stack tracking, thus in general | 281 // cannot handle phi-nodes. |
| 282 // cannot handle deoptimization nor phi-nodes. | 282 (!CpuFeatures::IsSafeForSnapshot(SSE2) && IsControl()); |
| 283 (HasEnvironment() || IsControl())); | |
| 284 } | 283 } |
| 285 | 284 |
| 286 virtual bool HasResult() const = 0; | 285 virtual bool HasResult() const = 0; |
| 287 virtual LOperand* result() const = 0; | 286 virtual LOperand* result() const = 0; |
| 288 | 287 |
| 289 bool HasDoubleRegisterResult(); | 288 bool HasDoubleRegisterResult(); |
| 290 bool HasDoubleRegisterInput(); | 289 bool HasDoubleRegisterInput(); |
| 291 bool IsDoubleInput(X87Register reg, LCodeGen* cgen); | 290 bool IsDoubleInput(X87Register reg, LCodeGen* cgen); |
| 292 | 291 |
| 293 LOperand* FirstInput() { return InputAt(0); } | 292 LOperand* FirstInput() { return InputAt(0); } |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 DECLARE_HYDROGEN_ACCESSOR(Return) | 1534 DECLARE_HYDROGEN_ACCESSOR(Return) |
| 1536 }; | 1535 }; |
| 1537 | 1536 |
| 1538 | 1537 |
| 1539 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1538 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1540 public: | 1539 public: |
| 1541 explicit LLoadNamedField(LOperand* object) { | 1540 explicit LLoadNamedField(LOperand* object) { |
| 1542 inputs_[0] = object; | 1541 inputs_[0] = object; |
| 1543 } | 1542 } |
| 1544 | 1543 |
| 1545 virtual bool ClobbersDoubleRegisters() const { | |
| 1546 return !CpuFeatures::IsSupported(SSE2) && | |
| 1547 !hydrogen()->representation().IsDouble(); | |
| 1548 } | |
| 1549 | |
| 1550 LOperand* object() { return inputs_[0]; } | 1544 LOperand* object() { return inputs_[0]; } |
| 1551 | 1545 |
| 1552 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1546 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
| 1553 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1547 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
| 1554 }; | 1548 }; |
| 1555 | 1549 |
| 1556 | 1550 |
| 1557 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1551 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1558 public: | 1552 public: |
| 1559 LLoadNamedGeneric(LOperand* context, LOperand* object) { | 1553 LLoadNamedGeneric(LOperand* context, LOperand* object) { |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 2193 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 2200 public: | 2194 public: |
| 2201 explicit LNumberUntagD(LOperand* value, LOperand* temp) { | 2195 explicit LNumberUntagD(LOperand* value, LOperand* temp) { |
| 2202 inputs_[0] = value; | 2196 inputs_[0] = value; |
| 2203 temps_[0] = temp; | 2197 temps_[0] = temp; |
| 2204 } | 2198 } |
| 2205 | 2199 |
| 2206 LOperand* value() { return inputs_[0]; } | 2200 LOperand* value() { return inputs_[0]; } |
| 2207 LOperand* temp() { return temps_[0]; } | 2201 LOperand* temp() { return temps_[0]; } |
| 2208 | 2202 |
| 2209 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { return false; } | |
| 2210 | |
| 2211 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") | 2203 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") |
| 2212 DECLARE_HYDROGEN_ACCESSOR(Change); | 2204 DECLARE_HYDROGEN_ACCESSOR(Change); |
| 2213 }; | 2205 }; |
| 2214 | 2206 |
| 2215 | 2207 |
| 2216 class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2208 class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2217 public: | 2209 public: |
| 2218 LSmiUntag(LOperand* value, bool needs_check) | 2210 LSmiUntag(LOperand* value, bool needs_check) |
| 2219 : needs_check_(needs_check) { | 2211 : needs_check_(needs_check) { |
| 2220 inputs_[0] = value; | 2212 inputs_[0] = value; |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2918 | 2910 |
| 2919 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2911 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2920 }; | 2912 }; |
| 2921 | 2913 |
| 2922 #undef DECLARE_HYDROGEN_ACCESSOR | 2914 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2923 #undef DECLARE_CONCRETE_INSTRUCTION | 2915 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2924 | 2916 |
| 2925 } } // namespace v8::internal | 2917 } } // namespace v8::internal |
| 2926 | 2918 |
| 2927 #endif // V8_IA32_LITHIUM_IA32_H_ | 2919 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |