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

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

Issue 23530066: Lazily save double registers for HCallRuntime instructions within Hydrogen code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 266 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
267 HValue* hydrogen_value() const { return hydrogen_value_; } 267 HValue* hydrogen_value() const { return hydrogen_value_; }
268 268
269 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 269 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
270 bool IsCall() const { return IsCallBits::decode(bit_field_); } 270 bool IsCall() const { return IsCallBits::decode(bit_field_); }
271 271
272 // Interface to the register allocator and iterators. 272 // Interface to the register allocator and iterators.
273 bool ClobbersTemps() const { return IsCall(); } 273 bool ClobbersTemps() const { return IsCall(); }
274 bool ClobbersRegisters() const { return IsCall(); } 274 bool ClobbersRegisters() const { return IsCall(); }
275 bool ClobbersDoubleRegisters() const { return IsCall(); } 275 virtual bool ClobbersDoubleRegisters() const { return IsCall(); }
276 276
277 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 277 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
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); }
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 1912
1913 int arity() const { return hydrogen()->argument_count() - 1; } 1913 int arity() const { return hydrogen()->argument_count() - 1; }
1914 }; 1914 };
1915 1915
1916 1916
1917 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1917 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1918 public: 1918 public:
1919 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1919 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1920 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1920 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1921 1921
1922 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE {
1923 return save_doubles() == kDontSaveFPRegs;
1924 }
1925
1922 const Runtime::Function* function() const { return hydrogen()->function(); } 1926 const Runtime::Function* function() const { return hydrogen()->function(); }
1923 int arity() const { return hydrogen()->argument_count(); } 1927 int arity() const { return hydrogen()->argument_count(); }
1928 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
1924 }; 1929 };
1925 1930
1926 1931
1927 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1932 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1928 public: 1933 public:
1929 explicit LInteger32ToDouble(LOperand* value) { 1934 explicit LInteger32ToDouble(LOperand* value) {
1930 inputs_[0] = value; 1935 inputs_[0] = value;
1931 } 1936 }
1932 1937
1933 LOperand* value() { return inputs_[0]; } 1938 LOperand* value() { return inputs_[0]; }
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 2720
2716 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2721 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2717 }; 2722 };
2718 2723
2719 #undef DECLARE_HYDROGEN_ACCESSOR 2724 #undef DECLARE_HYDROGEN_ACCESSOR
2720 #undef DECLARE_CONCRETE_INSTRUCTION 2725 #undef DECLARE_CONCRETE_INSTRUCTION
2721 2726
2722 } } // namespace v8::int 2727 } } // namespace v8::int
2723 2728
2724 #endif // V8_X64_LITHIUM_X64_H_ 2729 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698