OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3432 jmp(&done); | 3432 jmp(&done); |
3433 | 3433 |
3434 bind(&maybe_nan); | 3434 bind(&maybe_nan); |
3435 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise | 3435 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise |
3436 // it's an Infinity, and the non-NaN code path applies. | 3436 // it's an Infinity, and the non-NaN code path applies. |
3437 Branch(&is_nan, gt, exponent_reg, Operand(scratch1)); | 3437 Branch(&is_nan, gt, exponent_reg, Operand(scratch1)); |
3438 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); | 3438 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); |
3439 Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg)); | 3439 Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg)); |
3440 bind(&is_nan); | 3440 bind(&is_nan); |
3441 // Load canonical NaN for storing into the double array. | 3441 // Load canonical NaN for storing into the double array. |
3442 uint64_t nan_int64 = BitCast<uint64_t>( | 3442 LoadRoot(at, Heap::kNanValueRootIndex); |
3443 FixedDoubleArray::canonical_not_the_hole_nan_as_double()); | 3443 lw(mantissa_reg, FieldMemOperand(at, HeapNumber::kValueOffset)); |
3444 li(mantissa_reg, Operand(static_cast<uint32_t>(nan_int64))); | 3444 lw(exponent_reg, FieldMemOperand(at, HeapNumber::kValueOffset + 4)); |
3445 li(exponent_reg, Operand(static_cast<uint32_t>(nan_int64 >> 32))); | |
3446 jmp(&have_double_value); | 3445 jmp(&have_double_value); |
3447 | 3446 |
3448 bind(&smi_value); | 3447 bind(&smi_value); |
3449 Addu(scratch1, elements_reg, | 3448 Addu(scratch1, elements_reg, |
3450 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag - | 3449 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag - |
3451 elements_offset)); | 3450 elements_offset)); |
3452 sll(scratch2, key_reg, kDoubleSizeLog2 - kSmiTagSize); | 3451 sll(scratch2, key_reg, kDoubleSizeLog2 - kSmiTagSize); |
3453 Addu(scratch1, scratch1, scratch2); | 3452 Addu(scratch1, scratch1, scratch2); |
3454 // scratch1 is now effective address of the double element | 3453 // scratch1 is now effective address of the double element |
3455 | 3454 |
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5751 opcode == BGTZL); | 5750 opcode == BGTZL); |
5752 opcode = (cond == eq) ? BEQ : BNE; | 5751 opcode = (cond == eq) ? BEQ : BNE; |
5753 instr = (instr & ~kOpcodeMask) | opcode; | 5752 instr = (instr & ~kOpcodeMask) | opcode; |
5754 masm_.emit(instr); | 5753 masm_.emit(instr); |
5755 } | 5754 } |
5756 | 5755 |
5757 | 5756 |
5758 } } // namespace v8::internal | 5757 } } // namespace v8::internal |
5759 | 5758 |
5760 #endif // V8_TARGET_ARCH_MIPS | 5759 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |