Chromium Code Reviews| 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 7495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7506 __ Ret(); | 7506 __ Ret(); |
| 7507 | 7507 |
| 7508 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. | 7508 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
| 7509 __ bind(&double_elements); | 7509 __ bind(&double_elements); |
| 7510 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7510 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
| 7511 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, | 7511 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, |
| 7512 &slow_elements); | 7512 &slow_elements); |
| 7513 __ Ret(); | 7513 __ Ret(); |
| 7514 } | 7514 } |
| 7515 | 7515 |
| 7516 | |
| 7517 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { | |
| 7518 __ stop("foo"); | |
| 7519 | |
| 7520 // Save volatile registers, note that lr is already saved by the caller, | |
| 7521 // so we need to save an odd number here to keep the stack aligned. | |
| 7522 __ Push(lr, r1, r0); | |
|
danno
2012/07/10 09:37:13
In general, you can't make guarantees about stack
Sigurður Ásgeirsson
2012/07/11 14:50:34
Done.
| |
| 7523 | |
| 7524 // TODO(siggi): Grab a timer somehow into r2/r3. | |
| 7525 | |
| 7526 // Our return address, lr, points three instructions (12 bytes) into the | |
| 7527 // function. Grab that for the first argument to the hook. | |
| 7528 __ sub(r0, lr, Operand(0xC)); | |
|
danno
2012/07/10 09:37:13
Define constants for this.
Sigurður Ásgeirsson
2012/07/11 14:50:34
Done.
| |
| 7529 // The caller's return address is 12 bytes up on the stack. Grab that | |
| 7530 // for the second argument to the hook. | |
| 7531 __ add(r1, sp, Operand(0x0C)); | |
|
danno
2012/07/10 09:37:13
Is it possible to use an existing constant in fram
Sigurður Ásgeirsson
2012/07/11 14:50:34
This stub is called pre-frame generation, and does
| |
| 7532 | |
| 7533 ApiFunction dispatcher( | |
| 7534 reinterpret_cast<Address>(V8::GetFunctionEntryHookDispatcher())); | |
|
danno
2012/07/10 09:37:13
If you really need the dispatcher for ARM only, th
Sigurður Ásgeirsson
2012/07/11 14:50:34
This is for the simulator.
The simulator only forw
| |
| 7535 __ mov(ip, Operand(ExternalReference(&dispatcher, | |
| 7536 ExternalReference::BUILTIN_CALL, | |
| 7537 masm->isolate()))); | |
| 7538 __ Call(ip); | |
| 7539 __ Pop(lr, r1, r0); | |
| 7540 | |
| 7541 __ Ret(); | |
| 7542 } | |
| 7543 | |
| 7516 #undef __ | 7544 #undef __ |
| 7517 | 7545 |
| 7518 } } // namespace v8::internal | 7546 } } // namespace v8::internal |
| 7519 | 7547 |
| 7520 #endif // V8_TARGET_ARCH_ARM | 7548 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |