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

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

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool FlowGraphCompiler::SupportsUnboxedSimd128() { 52 bool FlowGraphCompiler::SupportsUnboxedSimd128() {
53 return FLAG_enable_simd_inline; 53 return FLAG_enable_simd_inline;
54 } 54 }
55 55
56 56
57 bool FlowGraphCompiler::SupportsSinCos() { 57 bool FlowGraphCompiler::SupportsSinCos() {
58 return true; 58 return true;
59 } 59 }
60 60
61 61
62 void FlowGraphCompiler::EnterIntrinsicMode() {
63 ASSERT(!intrinsic_mode());
64 intrinsic_mode_ = true;
65 }
66
67
68 void FlowGraphCompiler::ExitIntrinsicMode() {
69 ASSERT(intrinsic_mode());
70 intrinsic_mode_ = false;
71 }
72
73
62 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, 74 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
63 DeoptInfoBuilder* builder, 75 DeoptInfoBuilder* builder,
64 const Array& deopt_table) { 76 const Array& deopt_table) {
65 if (deopt_env_ == NULL) { 77 if (deopt_env_ == NULL) {
66 return DeoptInfo::null(); 78 return DeoptInfo::null();
67 } 79 }
68 80
69 intptr_t stack_height = compiler->StackSize(); 81 intptr_t stack_height = compiler->StackSize();
70 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); 82 AllocateIncomingParametersRecursive(deopt_env_, &stack_height);
71 83
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1746 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1735 ScratchRegisterScope ensure_scratch1(this, kNoRegister); 1747 ScratchRegisterScope ensure_scratch1(this, kNoRegister);
1736 ScratchRegisterScope ensure_scratch2(this, ensure_scratch1.reg()); 1748 ScratchRegisterScope ensure_scratch2(this, ensure_scratch1.reg());
1737 __ movl(ensure_scratch1.reg(), mem1); 1749 __ movl(ensure_scratch1.reg(), mem1);
1738 __ movl(ensure_scratch2.reg(), mem2); 1750 __ movl(ensure_scratch2.reg(), mem2);
1739 __ movl(mem2, ensure_scratch1.reg()); 1751 __ movl(mem2, ensure_scratch1.reg());
1740 __ movl(mem1, ensure_scratch2.reg()); 1752 __ movl(mem1, ensure_scratch2.reg());
1741 } 1753 }
1742 1754
1743 1755
1744 void ParallelMoveResolver::Exchange(Register reg, intptr_t stack_offset) { 1756 void ParallelMoveResolver::Exchange(Register reg,
1757 Register base_reg,
1758 intptr_t stack_offset) {
1745 UNREACHABLE(); 1759 UNREACHABLE();
1746 } 1760 }
1747 1761
1748 1762
1749 void ParallelMoveResolver::Exchange(intptr_t stack_offset1, 1763 void ParallelMoveResolver::Exchange(Register base_reg1,
1764 intptr_t stack_offset1,
1765 Register base_reg2,
1750 intptr_t stack_offset2) { 1766 intptr_t stack_offset2) {
1751 UNREACHABLE(); 1767 UNREACHABLE();
1752 } 1768 }
1753 1769
1754 1770
1755 void ParallelMoveResolver::SpillScratch(Register reg) { 1771 void ParallelMoveResolver::SpillScratch(Register reg) {
1756 __ pushl(reg); 1772 __ pushl(reg);
1757 } 1773 }
1758 1774
1759 1775
(...skipping 12 matching lines...) Expand all
1772 __ movups(reg, Address(ESP, 0)); 1788 __ movups(reg, Address(ESP, 0));
1773 __ addl(ESP, Immediate(kFpuRegisterSize)); 1789 __ addl(ESP, Immediate(kFpuRegisterSize));
1774 } 1790 }
1775 1791
1776 1792
1777 #undef __ 1793 #undef __
1778 1794
1779 } // namespace dart 1795 } // namespace dart
1780 1796
1781 #endif // defined TARGET_ARCH_IA32 1797 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698