OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6308 } | 6308 } |
6309 | 6309 |
6310 | 6310 |
6311 void DirectCEntryStub::Generate(MacroAssembler* masm) { | 6311 void DirectCEntryStub::Generate(MacroAssembler* masm) { |
6312 __ ldr(pc, MemOperand(sp, 0)); | 6312 __ ldr(pc, MemOperand(sp, 0)); |
6313 } | 6313 } |
6314 | 6314 |
6315 | 6315 |
6316 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, | 6316 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, |
6317 ExternalReference function) { | 6317 ExternalReference function) { |
6318 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()), | |
6319 RelocInfo::CODE_TARGET)); | |
6320 __ mov(r2, Operand(function)); | 6318 __ mov(r2, Operand(function)); |
6321 // Push return address (accessible to GC through exit frame pc). | 6319 GenerateCall(masm, r2); |
6322 // Note that using pc with str is deprecated. | |
6323 __ add(ip, pc, Operand(4)); | |
6324 __ str(ip, MemOperand(sp, 0)); | |
6325 __ Jump(r2); // Call the api function. | |
6326 } | 6320 } |
6327 | 6321 |
6328 | 6322 |
6329 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, | 6323 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, |
6330 Register target) { | 6324 Register target) { |
6331 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()), | 6325 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()), |
6332 RelocInfo::CODE_TARGET)); | 6326 RelocInfo::CODE_TARGET)); |
6333 // Push return address (accessible to GC through exit frame pc). | 6327 // Push return address (accessible to GC through exit frame pc). |
6334 // Note that using pc with str is deprecated. | 6328 // Note that using pc with str is deprecated. |
6335 __ add(ip, pc, Operand(4)); | 6329 Label start; |
| 6330 __ bind(&start); |
| 6331 __ add(ip, pc, Operand(Assembler::kInstrSize)); |
6336 __ str(ip, MemOperand(sp, 0)); | 6332 __ str(ip, MemOperand(sp, 0)); |
6337 __ Jump(target); // Call the C++ function. | 6333 __ Jump(target); // Call the C++ function. |
| 6334 ASSERT_EQ(Assembler::kInstrSize + Assembler::kPcLoadDelta, |
| 6335 masm->SizeOfCodeGeneratedSince(&start)); |
6338 } | 6336 } |
6339 | 6337 |
6340 | 6338 |
6341 MaybeObject* StringDictionaryLookupStub::GenerateNegativeLookup( | 6339 MaybeObject* StringDictionaryLookupStub::GenerateNegativeLookup( |
6342 MacroAssembler* masm, | 6340 MacroAssembler* masm, |
6343 Label* miss, | 6341 Label* miss, |
6344 Label* done, | 6342 Label* done, |
6345 Register receiver, | 6343 Register receiver, |
6346 Register properties, | 6344 Register properties, |
6347 String* name, | 6345 String* name, |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6569 __ mov(result, Operand(0)); | 6567 __ mov(result, Operand(0)); |
6570 __ Ret(); | 6568 __ Ret(); |
6571 } | 6569 } |
6572 | 6570 |
6573 | 6571 |
6574 #undef __ | 6572 #undef __ |
6575 | 6573 |
6576 } } // namespace v8::internal | 6574 } } // namespace v8::internal |
6577 | 6575 |
6578 #endif // V8_TARGET_ARCH_ARM | 6576 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |