| 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 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 masm, BinaryOpIC::UNINITIALIZED, BinaryOpIC::UNINITIALIZED, true, | 2319 masm, BinaryOpIC::UNINITIALIZED, BinaryOpIC::UNINITIALIZED, true, |
| 2320 use_runtime, gc_required, ¬_smis, op, mode); | 2320 use_runtime, gc_required, ¬_smis, op, mode); |
| 2321 } | 2321 } |
| 2322 __ bind(¬_smis); | 2322 __ bind(¬_smis); |
| 2323 } | 2323 } |
| 2324 | 2324 |
| 2325 | 2325 |
| 2326 void BinaryOpStub::GenerateSmiStub(MacroAssembler* masm) { | 2326 void BinaryOpStub::GenerateSmiStub(MacroAssembler* masm) { |
| 2327 Label right_arg_changed, call_runtime; | 2327 Label right_arg_changed, call_runtime; |
| 2328 | 2328 |
| 2329 if (op_ == Token::MOD && has_fixed_right_arg_) { | 2329 if (op_ == Token::MOD && encoded_right_arg_.has_value) { |
| 2330 // It is guaranteed that the value will fit into a Smi, because if it | 2330 // It is guaranteed that the value will fit into a Smi, because if it |
| 2331 // didn't, we wouldn't be here, see BinaryOp_Patch. | 2331 // didn't, we wouldn't be here, see BinaryOp_Patch. |
| 2332 __ Branch(&right_arg_changed, | 2332 __ Branch(&right_arg_changed, |
| 2333 ne, | 2333 ne, |
| 2334 a0, | 2334 a0, |
| 2335 Operand(Smi::FromInt(fixed_right_arg_value()))); | 2335 Operand(Smi::FromInt(fixed_right_arg_value()))); |
| 2336 } | 2336 } |
| 2337 | 2337 |
| 2338 if (result_type_ == BinaryOpIC::UNINITIALIZED || | 2338 if (result_type_ == BinaryOpIC::UNINITIALIZED || |
| 2339 result_type_ == BinaryOpIC::SMI) { | 2339 result_type_ == BinaryOpIC::SMI) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 mode_); | 2534 mode_); |
| 2535 __ sdc1(f10, | 2535 __ sdc1(f10, |
| 2536 FieldMemOperand(heap_number_result, HeapNumber::kValueOffset)); | 2536 FieldMemOperand(heap_number_result, HeapNumber::kValueOffset)); |
| 2537 __ Ret(USE_DELAY_SLOT); | 2537 __ Ret(USE_DELAY_SLOT); |
| 2538 __ mov(v0, heap_number_result); | 2538 __ mov(v0, heap_number_result); |
| 2539 | 2539 |
| 2540 // A DIV operation expecting an integer result falls through | 2540 // A DIV operation expecting an integer result falls through |
| 2541 // to type transition. | 2541 // to type transition. |
| 2542 | 2542 |
| 2543 } else { | 2543 } else { |
| 2544 if (has_fixed_right_arg_) { | 2544 if (encoded_right_arg_.has_value) { |
| 2545 __ Move(f16, fixed_right_arg_value()); | 2545 __ Move(f16, fixed_right_arg_value()); |
| 2546 __ BranchF(&transition, NULL, ne, f14, f16); | 2546 __ BranchF(&transition, NULL, ne, f14, f16); |
| 2547 } | 2547 } |
| 2548 | 2548 |
| 2549 // We preserved a0 and a1 to be able to call runtime. | 2549 // We preserved a0 and a1 to be able to call runtime. |
| 2550 // Save the left value on the stack. | 2550 // Save the left value on the stack. |
| 2551 __ Push(t1, t0); | 2551 __ Push(t1, t0); |
| 2552 | 2552 |
| 2553 Label pop_and_call_runtime; | 2553 Label pop_and_call_runtime; |
| 2554 | 2554 |
| (...skipping 5360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7915 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7915 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7916 } | 7916 } |
| 7917 } | 7917 } |
| 7918 | 7918 |
| 7919 | 7919 |
| 7920 #undef __ | 7920 #undef __ |
| 7921 | 7921 |
| 7922 } } // namespace v8::internal | 7922 } } // namespace v8::internal |
| 7923 | 7923 |
| 7924 #endif // V8_TARGET_ARCH_MIPS | 7924 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |