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

Side by Side Diff: src/interpreter/bytecodes.cc

Issue 1908033002: [Interpreter] Fix incorrect Register OperandSize calculation for ExtraWide. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | test/mjsunit/regress/regress-605470.js » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/frames.h" 9 #include "src/frames.h"
10 #include "src/interpreter/bytecode-traits.h" 10 #include "src/interpreter/bytecode-traits.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } 717 }
718 718
719 bool Register::is_bytecode_offset() const { 719 bool Register::is_bytecode_offset() const {
720 return index() == kBytecodeOffsetRegisterIndex; 720 return index() == kBytecodeOffsetRegisterIndex;
721 } 721 }
722 722
723 OperandSize Register::SizeOfOperand() const { 723 OperandSize Register::SizeOfOperand() const {
724 int32_t operand = ToOperand(); 724 int32_t operand = ToOperand();
725 if (operand >= kMinInt8 && operand <= kMaxInt8) { 725 if (operand >= kMinInt8 && operand <= kMaxInt8) {
726 return OperandSize::kByte; 726 return OperandSize::kByte;
727 } else if (index_ >= kMinInt16 && index_ <= kMaxInt16) { 727 } else if (operand >= kMinInt16 && operand <= kMaxInt16) {
728 return OperandSize::kShort; 728 return OperandSize::kShort;
729 } else { 729 } else {
730 return OperandSize::kQuad; 730 return OperandSize::kQuad;
731 } 731 }
732 } 732 }
733 733
734 bool Register::AreContiguous(Register reg1, Register reg2, Register reg3, 734 bool Register::AreContiguous(Register reg1, Register reg2, Register reg3,
735 Register reg4, Register reg5) { 735 Register reg4, Register reg5) {
736 if (reg1.index() + 1 != reg2.index()) { 736 if (reg1.index() + 1 != reg2.index()) {
737 return false; 737 return false;
(...skipping 29 matching lines...) Expand all
767 } else { 767 } else {
768 std::ostringstream s; 768 std::ostringstream s;
769 s << "r" << index(); 769 s << "r" << index();
770 return s.str(); 770 return s.str();
771 } 771 }
772 } 772 }
773 773
774 } // namespace interpreter 774 } // namespace interpreter
775 } // namespace internal 775 } // namespace internal
776 } // namespace v8 776 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-605470.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698