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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 Heap::RootListIndex index, | 76 Heap::RootListIndex index, |
77 Condition cond, | 77 Condition cond, |
78 Register src1, const Operand& src2) { | 78 Register src1, const Operand& src2) { |
79 Branch(2, NegateCondition(cond), src1, src2); | 79 Branch(2, NegateCondition(cond), src1, src2); |
80 sw(source, MemOperand(s6, index << kPointerSizeLog2)); | 80 sw(source, MemOperand(s6, index << kPointerSizeLog2)); |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 void MacroAssembler::LoadHeapObject(Register result, | 84 void MacroAssembler::LoadHeapObject(Register result, |
85 Handle<HeapObject> object) { | 85 Handle<HeapObject> object) { |
86 ALLOW_HANDLE_DEREF(isolate(), "using raw address"); | 86 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "using raw address"); |
87 if (isolate()->heap()->InNewSpace(*object)) { | 87 if (isolate()->heap()->InNewSpace(*object)) { |
88 Handle<JSGlobalPropertyCell> cell = | 88 Handle<JSGlobalPropertyCell> cell = |
89 isolate()->factory()->NewJSGlobalPropertyCell(object); | 89 isolate()->factory()->NewJSGlobalPropertyCell(object); |
90 li(result, Operand(cell)); | 90 li(result, Operand(cell)); |
91 lw(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset)); | 91 lw(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset)); |
92 } else { | 92 } else { |
93 li(result, Operand(object)); | 93 li(result, Operand(object)); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2451 } | 2451 } |
2452 | 2452 |
2453 | 2453 |
2454 void MacroAssembler::Jump(Handle<Code> code, | 2454 void MacroAssembler::Jump(Handle<Code> code, |
2455 RelocInfo::Mode rmode, | 2455 RelocInfo::Mode rmode, |
2456 Condition cond, | 2456 Condition cond, |
2457 Register rs, | 2457 Register rs, |
2458 const Operand& rt, | 2458 const Operand& rt, |
2459 BranchDelaySlot bd) { | 2459 BranchDelaySlot bd) { |
2460 ASSERT(RelocInfo::IsCodeTarget(rmode)); | 2460 ASSERT(RelocInfo::IsCodeTarget(rmode)); |
2461 ALLOW_HANDLE_DEREF(isolate(), "embedding raw address"); | 2461 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "embedding raw address"); |
2462 Jump(reinterpret_cast<intptr_t>(code.location()), rmode, cond, rs, rt, bd); | 2462 Jump(reinterpret_cast<intptr_t>(code.location()), rmode, cond, rs, rt, bd); |
2463 } | 2463 } |
2464 | 2464 |
2465 | 2465 |
2466 int MacroAssembler::CallSize(Register target, | 2466 int MacroAssembler::CallSize(Register target, |
2467 Condition cond, | 2467 Condition cond, |
2468 Register rs, | 2468 Register rs, |
2469 const Operand& rt, | 2469 const Operand& rt, |
2470 BranchDelaySlot bd) { | 2470 BranchDelaySlot bd) { |
2471 int size = 0; | 2471 int size = 0; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2539 } | 2539 } |
2540 | 2540 |
2541 | 2541 |
2542 int MacroAssembler::CallSize(Handle<Code> code, | 2542 int MacroAssembler::CallSize(Handle<Code> code, |
2543 RelocInfo::Mode rmode, | 2543 RelocInfo::Mode rmode, |
2544 TypeFeedbackId ast_id, | 2544 TypeFeedbackId ast_id, |
2545 Condition cond, | 2545 Condition cond, |
2546 Register rs, | 2546 Register rs, |
2547 const Operand& rt, | 2547 const Operand& rt, |
2548 BranchDelaySlot bd) { | 2548 BranchDelaySlot bd) { |
2549 ALLOW_HANDLE_DEREF(isolate(), "using raw address"); | 2549 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "using raw address"); |
2550 return CallSize(reinterpret_cast<Address>(code.location()), | 2550 return CallSize(reinterpret_cast<Address>(code.location()), |
2551 rmode, cond, rs, rt, bd); | 2551 rmode, cond, rs, rt, bd); |
2552 } | 2552 } |
2553 | 2553 |
2554 | 2554 |
2555 void MacroAssembler::Call(Handle<Code> code, | 2555 void MacroAssembler::Call(Handle<Code> code, |
2556 RelocInfo::Mode rmode, | 2556 RelocInfo::Mode rmode, |
2557 TypeFeedbackId ast_id, | 2557 TypeFeedbackId ast_id, |
2558 Condition cond, | 2558 Condition cond, |
2559 Register rs, | 2559 Register rs, |
2560 const Operand& rt, | 2560 const Operand& rt, |
2561 BranchDelaySlot bd) { | 2561 BranchDelaySlot bd) { |
2562 BlockTrampolinePoolScope block_trampoline_pool(this); | 2562 BlockTrampolinePoolScope block_trampoline_pool(this); |
2563 Label start; | 2563 Label start; |
2564 bind(&start); | 2564 bind(&start); |
2565 ASSERT(RelocInfo::IsCodeTarget(rmode)); | 2565 ASSERT(RelocInfo::IsCodeTarget(rmode)); |
2566 if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) { | 2566 if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) { |
2567 SetRecordedAstId(ast_id); | 2567 SetRecordedAstId(ast_id); |
2568 rmode = RelocInfo::CODE_TARGET_WITH_ID; | 2568 rmode = RelocInfo::CODE_TARGET_WITH_ID; |
2569 } | 2569 } |
2570 ALLOW_HANDLE_DEREF(isolate(), "embedding raw address"); | 2570 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "embedding raw address"); |
2571 Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd); | 2571 Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd); |
2572 ASSERT_EQ(CallSize(code, rmode, ast_id, cond, rs, rt, bd), | 2572 ASSERT_EQ(CallSize(code, rmode, ast_id, cond, rs, rt, bd), |
2573 SizeOfCodeGeneratedSince(&start)); | 2573 SizeOfCodeGeneratedSince(&start)); |
2574 } | 2574 } |
2575 | 2575 |
2576 | 2576 |
2577 void MacroAssembler::Ret(Condition cond, | 2577 void MacroAssembler::Ret(Condition cond, |
2578 Register rs, | 2578 Register rs, |
2579 const Operand& rt, | 2579 const Operand& rt, |
2580 BranchDelaySlot bd) { | 2580 BranchDelaySlot bd) { |
(...skipping 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5527 opcode == BGTZL); | 5527 opcode == BGTZL); |
5528 opcode = (cond == eq) ? BEQ : BNE; | 5528 opcode = (cond == eq) ? BEQ : BNE; |
5529 instr = (instr & ~kOpcodeMask) | opcode; | 5529 instr = (instr & ~kOpcodeMask) | opcode; |
5530 masm_.emit(instr); | 5530 masm_.emit(instr); |
5531 } | 5531 } |
5532 | 5532 |
5533 | 5533 |
5534 } } // namespace v8::internal | 5534 } } // namespace v8::internal |
5535 | 5535 |
5536 #endif // V8_TARGET_ARCH_MIPS | 5536 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |