mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:17:07 +00:00
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:
parent
cf2f5bc3f5
commit
b2d9992127
2 changed files with 14 additions and 1 deletions
|
@ -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());
|
||||
|
|
13
tests/language/vm/regress_22693_vm_test.dart
Normal file
13
tests/language/vm/regress_22693_vm_test.dart
Normal 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);
|
||||
}
|
Loading…
Reference in a new issue