| 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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 b(ne, fail); | 1224 b(ne, fail); |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 | 1227 |
| 1228 #ifdef ENABLE_DEBUGGER_SUPPORT | 1228 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1229 void MacroAssembler::DebugBreak() { | 1229 void MacroAssembler::DebugBreak() { |
| 1230 mov(r0, Operand::Zero()); | 1230 mov(r0, Operand::Zero()); |
| 1231 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); | 1231 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); |
| 1232 CEntryStub ces(1); | 1232 CEntryStub ces(1); |
| 1233 ASSERT(AllowThisStubCall(&ces)); | 1233 ASSERT(AllowThisStubCall(&ces)); |
| 1234 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); | 1234 Call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK); |
| 1235 } | 1235 } |
| 1236 #endif | 1236 #endif |
| 1237 | 1237 |
| 1238 | 1238 |
| 1239 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, | 1239 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, |
| 1240 int handler_index) { | 1240 int handler_index) { |
| 1241 // Adjust this code if not the case. | 1241 // Adjust this code if not the case. |
| 1242 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); | 1242 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); |
| 1243 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 1243 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
| 1244 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); | 1244 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 | 2216 |
| 2217 // All done. | 2217 // All done. |
| 2218 bind(&done); | 2218 bind(&done); |
| 2219 } | 2219 } |
| 2220 | 2220 |
| 2221 | 2221 |
| 2222 void MacroAssembler::CallStub(CodeStub* stub, | 2222 void MacroAssembler::CallStub(CodeStub* stub, |
| 2223 TypeFeedbackId ast_id, | 2223 TypeFeedbackId ast_id, |
| 2224 Condition cond) { | 2224 Condition cond) { |
| 2225 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. | 2225 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |
| 2226 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond); | 2226 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond); |
| 2227 } | 2227 } |
| 2228 | 2228 |
| 2229 | 2229 |
| 2230 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { | 2230 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { |
| 2231 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); | 2231 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); |
| 2232 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); | 2232 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond); |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 | 2235 |
| 2236 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { | 2236 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
| 2237 return ref0.address() - ref1.address(); | 2237 return ref0.address() - ref1.address(); |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 | 2240 |
| 2241 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, | 2241 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, |
| 2242 int stack_space) { | 2242 int stack_space) { |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 } | 2817 } |
| 2818 | 2818 |
| 2819 | 2819 |
| 2820 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { | 2820 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { |
| 2821 #if defined(__thumb__) | 2821 #if defined(__thumb__) |
| 2822 // Thumb mode builtin. | 2822 // Thumb mode builtin. |
| 2823 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); | 2823 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); |
| 2824 #endif | 2824 #endif |
| 2825 mov(r1, Operand(builtin)); | 2825 mov(r1, Operand(builtin)); |
| 2826 CEntryStub stub(1); | 2826 CEntryStub stub(1); |
| 2827 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 2827 Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
| 2828 } | 2828 } |
| 2829 | 2829 |
| 2830 | 2830 |
| 2831 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, | 2831 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, |
| 2832 InvokeFlag flag, | 2832 InvokeFlag flag, |
| 2833 const CallWrapper& call_wrapper) { | 2833 const CallWrapper& call_wrapper) { |
| 2834 // You can't call a builtin without a valid frame. | 2834 // You can't call a builtin without a valid frame. |
| 2835 ASSERT(flag == JUMP_FUNCTION || has_frame()); | 2835 ASSERT(flag == JUMP_FUNCTION || has_frame()); |
| 2836 | 2836 |
| 2837 GetBuiltinEntry(r2, id); | 2837 GetBuiltinEntry(r2, id); |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3990 void CodePatcher::EmitCondition(Condition cond) { | 3990 void CodePatcher::EmitCondition(Condition cond) { |
| 3991 Instr instr = Assembler::instr_at(masm_.pc_); | 3991 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3992 instr = (instr & ~kCondMask) | cond; | 3992 instr = (instr & ~kCondMask) | cond; |
| 3993 masm_.emit(instr); | 3993 masm_.emit(instr); |
| 3994 } | 3994 } |
| 3995 | 3995 |
| 3996 | 3996 |
| 3997 } } // namespace v8::internal | 3997 } } // namespace v8::internal |
| 3998 | 3998 |
| 3999 #endif // V8_TARGET_ARCH_ARM | 3999 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |