OLD | NEW |
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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4056 } | 4056 } |
4057 | 4057 |
4058 | 4058 |
4059 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4059 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4060 UNIMPLEMENTED(); | 4060 UNIMPLEMENTED(); |
4061 } | 4061 } |
4062 | 4062 |
4063 | 4063 |
4064 LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone, | 4064 LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone, |
4065 bool opt) const { | 4065 bool opt) const { |
4066 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { | |
4067 const intptr_t kNumInputs = 1; | |
4068 const intptr_t kNumTemps = 0; | |
4069 LocationSummary* summary = new(zone) LocationSummary( | |
4070 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | |
4071 summary->set_in(0, Location::FpuRegisterLocation(D6)); | |
4072 summary->set_out(0, Location::FpuRegisterLocation(D0)); | |
4073 return summary; | |
4074 } | |
4075 ASSERT((kind() == MathUnaryInstr::kSqrt) || | 4066 ASSERT((kind() == MathUnaryInstr::kSqrt) || |
4076 (kind() == MathUnaryInstr::kDoubleSquare)); | 4067 (kind() == MathUnaryInstr::kDoubleSquare)); |
4077 const intptr_t kNumInputs = 1; | 4068 const intptr_t kNumInputs = 1; |
4078 const intptr_t kNumTemps = 0; | 4069 const intptr_t kNumTemps = 0; |
4079 LocationSummary* summary = new(zone) LocationSummary( | 4070 LocationSummary* summary = new(zone) LocationSummary( |
4080 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4071 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4081 summary->set_in(0, Location::RequiresFpuRegister()); | 4072 summary->set_in(0, Location::RequiresFpuRegister()); |
4082 summary->set_out(0, Location::RequiresFpuRegister()); | 4073 summary->set_out(0, Location::RequiresFpuRegister()); |
4083 return summary; | 4074 return summary; |
4084 } | 4075 } |
4085 | 4076 |
4086 | 4077 |
4087 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4078 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4088 if (kind() == MathUnaryInstr::kSqrt) { | 4079 if (kind() == MathUnaryInstr::kSqrt) { |
4089 __ sqrtd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); | 4080 __ sqrtd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); |
4090 } else if (kind() == MathUnaryInstr::kDoubleSquare) { | 4081 } else if (kind() == MathUnaryInstr::kDoubleSquare) { |
4091 DRegister val = locs()->in(0).fpu_reg(); | 4082 DRegister val = locs()->in(0).fpu_reg(); |
4092 DRegister result = locs()->out(0).fpu_reg(); | 4083 DRegister result = locs()->out(0).fpu_reg(); |
4093 __ muld(result, val, val); | 4084 __ muld(result, val, val); |
4094 } else { | 4085 } else { |
4095 __ CallRuntime(TargetFunction(), InputCount()); | 4086 UNREACHABLE(); |
4096 } | 4087 } |
4097 } | 4088 } |
4098 | 4089 |
4099 | 4090 |
4100 LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( | 4091 LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( |
4101 Zone* zone, bool opt) const { | 4092 Zone* zone, bool opt) const { |
4102 const intptr_t kNumTemps = 0; | 4093 const intptr_t kNumTemps = 0; |
4103 LocationSummary* summary = new(zone) LocationSummary( | 4094 LocationSummary* summary = new(zone) LocationSummary( |
4104 zone, InputCount(), kNumTemps, LocationSummary::kCall); | 4095 zone, InputCount(), kNumTemps, LocationSummary::kCall); |
4105 summary->set_in(0, Location::RegisterLocation(A0)); | 4096 summary->set_in(0, Location::RegisterLocation(A0)); |
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5791 1, | 5782 1, |
5792 locs()); | 5783 locs()); |
5793 __ lw(result, Address(SP, 1 * kWordSize)); | 5784 __ lw(result, Address(SP, 1 * kWordSize)); |
5794 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5785 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5795 } | 5786 } |
5796 | 5787 |
5797 | 5788 |
5798 } // namespace dart | 5789 } // namespace dart |
5799 | 5790 |
5800 #endif // defined TARGET_ARCH_MIPS | 5791 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |