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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 712993005: Infer range for BIT_XOR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 ASSERT(destination.IsDoubleStackSlot()); 1643 ASSERT(destination.IsDoubleStackSlot());
1644 const intptr_t source_offset = source.ToStackSlotOffset(); 1644 const intptr_t source_offset = source.ToStackSlotOffset();
1645 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1645 const intptr_t dest_offset = destination.ToStackSlotOffset();
1646 __ LoadDFromOffset(DTMP, source.base_reg(), source_offset); 1646 __ LoadDFromOffset(DTMP, source.base_reg(), source_offset);
1647 __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset); 1647 __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset);
1648 } 1648 }
1649 } else { 1649 } else {
1650 ASSERT(source.IsConstant()); 1650 ASSERT(source.IsConstant());
1651 const Object& constant = source.constant(); 1651 const Object& constant = source.constant();
1652 if (destination.IsRegister()) { 1652 if (destination.IsRegister()) {
1653 __ LoadObject(destination.reg(), constant); 1653 if (constant.IsSmi() &&
1654 (source.constant_instruction()->representation() == kUnboxedInt32)) {
1655 __ LoadImmediate(destination.reg(), Smi::Cast(constant).Value());
1656 } else {
1657 __ LoadObject(destination.reg(), constant);
1658 }
1654 } else if (destination.IsFpuRegister()) { 1659 } else if (destination.IsFpuRegister()) {
1655 __ LoadObject(TMP, constant); 1660 __ LoadObject(TMP, constant);
1656 __ LoadDFromOffset(destination.fpu_reg(), TMP, 1661 __ LoadDFromOffset(destination.fpu_reg(), TMP,
1657 Double::value_offset() - kHeapObjectTag); 1662 Double::value_offset() - kHeapObjectTag);
1658 } else if (destination.IsDoubleStackSlot()) { 1663 } else if (destination.IsDoubleStackSlot()) {
1659 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1664 const intptr_t dest_offset = destination.ToStackSlotOffset();
1660 __ LoadObject(TMP, constant); 1665 __ LoadObject(TMP, constant);
1661 __ LoadDFromOffset(DTMP, TMP, Double::value_offset() - kHeapObjectTag); 1666 __ LoadDFromOffset(DTMP, TMP, Double::value_offset() - kHeapObjectTag);
1662 __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset); 1667 __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset);
1663 } else { 1668 } else {
1664 ASSERT(destination.IsStackSlot()); 1669 ASSERT(destination.IsStackSlot());
1665 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1670 const intptr_t dest_offset = destination.ToStackSlotOffset();
1666 ScratchRegisterScope tmp(this, kNoRegister); 1671 ScratchRegisterScope tmp(this, kNoRegister);
1667 __ LoadObject(tmp.reg(), constant); 1672 if (constant.IsSmi() &&
1673 (source.constant_instruction()->representation() == kUnboxedInt32)) {
1674 __ LoadImmediate(tmp.reg(), Smi::Cast(constant).Value());
1675 } else {
1676 __ LoadObject(tmp.reg(), constant);
1677 }
1668 __ StoreToOffset(tmp.reg(), destination.base_reg(), dest_offset); 1678 __ StoreToOffset(tmp.reg(), destination.base_reg(), dest_offset);
1669 } 1679 }
1670 } 1680 }
1671 1681
1672 move->Eliminate(); 1682 move->Eliminate();
1673 } 1683 }
1674 1684
1675 1685
1676 void ParallelMoveResolver::EmitSwap(int index) { 1686 void ParallelMoveResolver::EmitSwap(int index) {
1677 MoveOperands* move = moves_[index]; 1687 MoveOperands* move = moves_[index];
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 __ AddImmediate(SP, kDoubleSize); 1831 __ AddImmediate(SP, kDoubleSize);
1822 } 1832 }
1823 1833
1824 1834
1825 #undef __ 1835 #undef __
1826 1836
1827 1837
1828 } // namespace dart 1838 } // namespace dart
1829 1839
1830 #endif // defined TARGET_ARCH_MIPS 1840 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698