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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4014 SmiCheckType smi_check_type) { | 4014 SmiCheckType smi_check_type) { |
4015 if (smi_check_type == DO_SMI_CHECK) { | 4015 if (smi_check_type == DO_SMI_CHECK) { |
4016 JumpIfSmi(obj, fail); | 4016 JumpIfSmi(obj, fail); |
4017 } | 4017 } |
4018 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 4018 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
4019 LoadRoot(at, index); | 4019 LoadRoot(at, index); |
4020 Branch(fail, ne, scratch, Operand(at)); | 4020 Branch(fail, ne, scratch, Operand(at)); |
4021 } | 4021 } |
4022 | 4022 |
4023 | 4023 |
4024 void MacroAssembler::CmpWeakValue(Register match, Register value, | |
4025 Handle<WeakCell> cell) { | |
4026 li(match, Operand(cell)); | |
4027 lw(match, FieldMemOperand(match, WeakCell::kValueOffset)); | |
4028 Subu(match, value, match); | |
4029 } | |
4030 | |
4031 | |
4032 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, | |
4033 Label* miss) { | |
4034 li(value, Operand(cell)); | |
4035 lw(value, FieldMemOperand(value, WeakCell::kValueOffset)); | |
4036 JumpIfNotSmi(value, miss); | |
4037 } | |
4038 | |
4039 | |
4040 void MacroAssembler::MovFromFloatResult(DoubleRegister dst) { | 4024 void MacroAssembler::MovFromFloatResult(DoubleRegister dst) { |
4041 if (IsMipsSoftFloatABI) { | 4025 if (IsMipsSoftFloatABI) { |
4042 if (kArchEndian == kLittle) { | 4026 if (kArchEndian == kLittle) { |
4043 Move(dst, v0, v1); | 4027 Move(dst, v0, v1); |
4044 } else { | 4028 } else { |
4045 Move(dst, v1, v0); | 4029 Move(dst, v1, v0); |
4046 } | 4030 } |
4047 } else { | 4031 } else { |
4048 Move(dst, f0); // Reg f0 is o32 ABI FP return value. | 4032 Move(dst, f0); // Reg f0 is o32 ABI FP return value. |
4049 } | 4033 } |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6279 } | 6263 } |
6280 if (mag.shift > 0) sra(result, result, mag.shift); | 6264 if (mag.shift > 0) sra(result, result, mag.shift); |
6281 srl(at, dividend, 31); | 6265 srl(at, dividend, 31); |
6282 Addu(result, result, Operand(at)); | 6266 Addu(result, result, Operand(at)); |
6283 } | 6267 } |
6284 | 6268 |
6285 | 6269 |
6286 } } // namespace v8::internal | 6270 } } // namespace v8::internal |
6287 | 6271 |
6288 #endif // V8_TARGET_ARCH_MIPS | 6272 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |