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 3942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3953 Register r1, | 3953 Register r1, |
3954 const Operand& r2, | 3954 const Operand& r2, |
3955 BranchDelaySlot bd) { | 3955 BranchDelaySlot bd) { |
3956 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. | 3956 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |
3957 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, | 3957 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, |
3958 cond, r1, r2, bd); | 3958 cond, r1, r2, bd); |
3959 } | 3959 } |
3960 | 3960 |
3961 | 3961 |
3962 void MacroAssembler::TailCallStub(CodeStub* stub) { | 3962 void MacroAssembler::TailCallStub(CodeStub* stub) { |
3963 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); | 3963 ASSERT(allow_stub_calls_ || |
| 3964 stub->CompilingCallsToThisStubIsGCSafe(isolate())); |
3964 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); | 3965 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); |
3965 } | 3966 } |
3966 | 3967 |
3967 | 3968 |
3968 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { | 3969 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
3969 return ref0.address() - ref1.address(); | 3970 return ref0.address() - ref1.address(); |
3970 } | 3971 } |
3971 | 3972 |
3972 | 3973 |
3973 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, | 3974 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4071 li(a0, Operand(ExternalReference::isolate_address())); | 4072 li(a0, Operand(ExternalReference::isolate_address())); |
4072 CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate()), | 4073 CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate()), |
4073 1); | 4074 1); |
4074 mov(v0, s0); | 4075 mov(v0, s0); |
4075 jmp(&leave_exit_frame); | 4076 jmp(&leave_exit_frame); |
4076 } | 4077 } |
4077 | 4078 |
4078 | 4079 |
4079 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 4080 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
4080 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; | 4081 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; |
4081 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); | 4082 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate()); |
4082 } | 4083 } |
4083 | 4084 |
4084 | 4085 |
4085 void MacroAssembler::IllegalOperation(int num_arguments) { | 4086 void MacroAssembler::IllegalOperation(int num_arguments) { |
4086 if (num_arguments > 0) { | 4087 if (num_arguments > 0) { |
4087 addiu(sp, sp, num_arguments * kPointerSize); | 4088 addiu(sp, sp, num_arguments * kPointerSize); |
4088 } | 4089 } |
4089 LoadRoot(v0, Heap::kUndefinedValueRootIndex); | 4090 LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
4090 } | 4091 } |
4091 | 4092 |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5571 opcode == BGTZL); | 5572 opcode == BGTZL); |
5572 opcode = (cond == eq) ? BEQ : BNE; | 5573 opcode = (cond == eq) ? BEQ : BNE; |
5573 instr = (instr & ~kOpcodeMask) | opcode; | 5574 instr = (instr & ~kOpcodeMask) | opcode; |
5574 masm_.emit(instr); | 5575 masm_.emit(instr); |
5575 } | 5576 } |
5576 | 5577 |
5577 | 5578 |
5578 } } // namespace v8::internal | 5579 } } // namespace v8::internal |
5579 | 5580 |
5580 #endif // V8_TARGET_ARCH_MIPS | 5581 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |