Fix incorrect kNumTemps for BinaryUint32OpInstr on x64

R=johnmccutchan@google.com
BUG=http://dartbug.com/22693

Review URL: https://codereview.chromium.org//988743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44296 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
vegorov@google.com 2015-03-06 17:53:39 +00:00
parent cf2f5bc3f5
commit b2d9992127
2 changed files with 14 additions and 1 deletions

View file

@ -5873,7 +5873,7 @@ CompileType UnaryUint32OpInstr::ComputeType() const {
LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = (op_kind() == Token::kMUL) ? 1 : 0;
const intptr_t kNumTemps = 0;
LocationSummary* summary = new(zone) LocationSummary(
zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
summary->set_in(0, Location::RequiresRegister());

View file

@ -0,0 +1,13 @@
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Test location summary for Uint32 multiplication.
// VMOptions=--optimization-counter-threshold=10 --no-use-osr
const MASK = 0xFFFFFFFF;
uint32Mul(x, y) => (x * y) & MASK;
main() {
for (var i = 0; i < 20; i++) uint32Mul((1 << 63) - 1, 1);
}