OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 __ sub_d(double_scratch1, double_scratch1, input); | 1138 __ sub_d(double_scratch1, double_scratch1, input); |
1139 __ sub_d(result, result, double_scratch1); | 1139 __ sub_d(result, result, double_scratch1); |
1140 __ mul_d(double_scratch2, double_scratch1, double_scratch1); | 1140 __ mul_d(double_scratch2, double_scratch1, double_scratch1); |
1141 __ mul_d(result, result, double_scratch2); | 1141 __ mul_d(result, result, double_scratch2); |
1142 __ ldc1(double_scratch2, ExpConstant(7, temp3)); | 1142 __ ldc1(double_scratch2, ExpConstant(7, temp3)); |
1143 __ mul_d(result, result, double_scratch2); | 1143 __ mul_d(result, result, double_scratch2); |
1144 __ sub_d(result, result, double_scratch1); | 1144 __ sub_d(result, result, double_scratch1); |
1145 // Mov 1 in double_scratch2 as math_exp_constants_array[8] == 1. | 1145 // Mov 1 in double_scratch2 as math_exp_constants_array[8] == 1. |
1146 DCHECK(*reinterpret_cast<double*> | 1146 DCHECK(*reinterpret_cast<double*> |
1147 (ExternalReference::math_exp_constants(8).address()) == 1); | 1147 (ExternalReference::math_exp_constants(8).address()) == 1); |
1148 __ Move(double_scratch2, 1); | 1148 __ Move(double_scratch2, 1.); |
1149 __ add_d(result, result, double_scratch2); | 1149 __ add_d(result, result, double_scratch2); |
1150 __ srl(temp1, temp2, 11); | 1150 __ srl(temp1, temp2, 11); |
1151 __ Ext(temp2, temp2, 0, 11); | 1151 __ Ext(temp2, temp2, 0, 11); |
1152 __ Addu(temp1, temp1, Operand(0x3ff)); | 1152 __ Addu(temp1, temp1, Operand(0x3ff)); |
1153 | 1153 |
1154 // Must not call ExpConstant() after overwriting temp3! | 1154 // Must not call ExpConstant() after overwriting temp3! |
1155 __ li(temp3, Operand(ExternalReference::math_exp_log_table())); | 1155 __ li(temp3, Operand(ExternalReference::math_exp_log_table())); |
1156 __ sll(at, temp2, 3); | 1156 __ sll(at, temp2, 3); |
1157 __ Addu(temp3, temp3, Operand(at)); | 1157 __ Addu(temp3, temp3, Operand(at)); |
1158 __ lw(temp2, MemOperand(temp3, Register::kMantissaOffset)); | 1158 __ lw(temp2, MemOperand(temp3, Register::kMantissaOffset)); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 patcher.masm()->nop(); // Pad the empty space. | 1257 patcher.masm()->nop(); // Pad the empty space. |
1258 } | 1258 } |
1259 } | 1259 } |
1260 | 1260 |
1261 | 1261 |
1262 #undef __ | 1262 #undef __ |
1263 | 1263 |
1264 } } // namespace v8::internal | 1264 } } // namespace v8::internal |
1265 | 1265 |
1266 #endif // V8_TARGET_ARCH_MIPS | 1266 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |