Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mips/lithium-mips.h

Issue 25567002: MIPS: Lazily save double registers for HCallRuntime instructions within Hydrogen code stubs. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 HValue* hydrogen_value() const { return hydrogen_value_; } 267 HValue* hydrogen_value() const { return hydrogen_value_; }
268 268
269 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 269 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
270 270
271 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 271 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
272 bool IsCall() const { return IsCallBits::decode(bit_field_); } 272 bool IsCall() const { return IsCallBits::decode(bit_field_); }
273 273
274 // Interface to the register allocator and iterators. 274 // Interface to the register allocator and iterators.
275 bool ClobbersTemps() const { return IsCall(); } 275 bool ClobbersTemps() const { return IsCall(); }
276 bool ClobbersRegisters() const { return IsCall(); } 276 bool ClobbersRegisters() const { return IsCall(); }
277 bool ClobbersDoubleRegisters() const { return IsCall(); } 277 virtual bool ClobbersDoubleRegisters() const { return IsCall(); }
278 278
279 // Interface to the register allocator and iterators. 279 // Interface to the register allocator and iterators.
280 bool IsMarkedAsCall() const { return IsCall(); } 280 bool IsMarkedAsCall() const { return IsCall(); }
281 281
282 virtual bool HasResult() const = 0; 282 virtual bool HasResult() const = 0;
283 virtual LOperand* result() const = 0; 283 virtual LOperand* result() const = 0;
284 284
285 LOperand* FirstInput() { return InputAt(0); } 285 LOperand* FirstInput() { return InputAt(0); }
286 LOperand* Output() { return HasResult() ? result() : NULL; } 286 LOperand* Output() { return HasResult() ? result() : NULL; }
287 287
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 1956
1957 int arity() const { return hydrogen()->argument_count() - 1; } 1957 int arity() const { return hydrogen()->argument_count() - 1; }
1958 }; 1958 };
1959 1959
1960 1960
1961 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1961 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1962 public: 1962 public:
1963 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1963 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1964 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1964 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1965 1965
1966 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE {
1967 return save_doubles() == kDontSaveFPRegs;
1968 }
1969
1966 const Runtime::Function* function() const { return hydrogen()->function(); } 1970 const Runtime::Function* function() const { return hydrogen()->function(); }
1967 int arity() const { return hydrogen()->argument_count(); } 1971 int arity() const { return hydrogen()->argument_count(); }
1972 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
1968 }; 1973 };
1969 1974
1970 1975
1971 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1976 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1972 public: 1977 public:
1973 explicit LInteger32ToDouble(LOperand* value) { 1978 explicit LInteger32ToDouble(LOperand* value) {
1974 inputs_[0] = value; 1979 inputs_[0] = value;
1975 } 1980 }
1976 1981
1977 LOperand* value() { return inputs_[0]; } 1982 LOperand* value() { return inputs_[0]; }
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 2772
2768 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2773 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2769 }; 2774 };
2770 2775
2771 #undef DECLARE_HYDROGEN_ACCESSOR 2776 #undef DECLARE_HYDROGEN_ACCESSOR
2772 #undef DECLARE_CONCRETE_INSTRUCTION 2777 #undef DECLARE_CONCRETE_INSTRUCTION
2773 2778
2774 } } // namespace v8::internal 2779 } } // namespace v8::internal
2775 2780
2776 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2781 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698