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

Side by Side Diff: src/arm64/lithium-arm64.cc

Issue 873703002: Fixed Hydrogen environment handling for mul-i on ARM and ARM64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed ARM64, too. Created 5 years, 11 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/arm/lithium-arm.cc ('k') | test/mjsunit/regress/regress-451322.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/arm64/lithium-codegen-arm64.h" 9 #include "src/arm64/lithium-codegen-arm64.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 (small_constant || (base::bits::IsPowerOfTwo32(constant_abs)) || 1956 (small_constant || (base::bits::IsPowerOfTwo32(constant_abs)) ||
1957 (!can_overflow && (base::bits::IsPowerOfTwo32(constant_abs + 1) || 1957 (!can_overflow && (base::bits::IsPowerOfTwo32(constant_abs + 1) ||
1958 base::bits::IsPowerOfTwo32(constant_abs - 1))))) { 1958 base::bits::IsPowerOfTwo32(constant_abs - 1))))) {
1959 LConstantOperand* right = UseConstant(most_const); 1959 LConstantOperand* right = UseConstant(most_const);
1960 bool need_register = 1960 bool need_register =
1961 base::bits::IsPowerOfTwo32(constant_abs) && !small_constant; 1961 base::bits::IsPowerOfTwo32(constant_abs) && !small_constant;
1962 LOperand* left = need_register ? UseRegister(least_const) 1962 LOperand* left = need_register ? UseRegister(least_const)
1963 : UseRegisterAtStart(least_const); 1963 : UseRegisterAtStart(least_const);
1964 LInstruction* result = 1964 LInstruction* result =
1965 DefineAsRegister(new(zone()) LMulConstIS(left, right)); 1965 DefineAsRegister(new(zone()) LMulConstIS(left, right));
1966 if ((bailout_on_minus_zero && constant <= 0) || can_overflow) { 1966 if ((bailout_on_minus_zero && constant <= 0) ||
1967 (can_overflow && constant != 1 &&
1968 base::bits::IsPowerOfTwo32(constant_abs))) {
1967 result = AssignEnvironment(result); 1969 result = AssignEnvironment(result);
1968 } 1970 }
1969 return result; 1971 return result;
1970 } 1972 }
1971 } 1973 }
1972 1974
1973 // LMulI/S can handle all cases, but it requires that a register is 1975 // LMulI/S can handle all cases, but it requires that a register is
1974 // allocated for the second operand. 1976 // allocated for the second operand.
1975 LOperand* left = UseRegisterAtStart(least_const); 1977 LOperand* left = UseRegisterAtStart(least_const);
1976 LOperand* right = UseRegisterAtStart(most_const); 1978 LOperand* right = UseRegisterAtStart(most_const);
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 HAllocateBlockContext* instr) { 2754 HAllocateBlockContext* instr) {
2753 LOperand* context = UseFixed(instr->context(), cp); 2755 LOperand* context = UseFixed(instr->context(), cp);
2754 LOperand* function = UseRegisterAtStart(instr->function()); 2756 LOperand* function = UseRegisterAtStart(instr->function());
2755 LAllocateBlockContext* result = 2757 LAllocateBlockContext* result =
2756 new(zone()) LAllocateBlockContext(context, function); 2758 new(zone()) LAllocateBlockContext(context, function);
2757 return MarkAsCall(DefineFixed(result, cp), instr); 2759 return MarkAsCall(DefineFixed(result, cp), instr);
2758 } 2760 }
2759 2761
2760 2762
2761 } } // namespace v8::internal 2763 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | test/mjsunit/regress/regress-451322.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698