Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/arm/code-stubs-arm.cc

Issue 18062006: Revert r15361 "Improved function entry hook coverage" because of ARM build error. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index e6292cd7da18ce3e97a8dc413754b3b64e18c88d..9cdaa120831a8cd1e6512e5cbf098e6f9b6e7b4f 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -3181,8 +3181,6 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// sp: stack pointer (restored as callee's sp after C call)
// cp: current context (C callee-saved)
- ProfileEntryHookStub::MaybeCallEntryHook(masm);
-
// Result returned in r0 or r0+r1 by default.
// NOTE: Invocations of builtins may return failure objects
@@ -3273,8 +3271,6 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
Label invoke, handler_entry, exit;
- ProfileEntryHookStub::MaybeCallEntryHook(masm);
-
// Called from C, so do not pop argc and args on exit (preserve sp)
// No need to save register-passed args
// Save callee-saved registers (incl. cp and fp), sp, and lr
@@ -7075,9 +7071,8 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
- if (masm->isolate()->function_entry_hook() != NULL) {
+ if (entry_hook_ != NULL) {
PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize);
- AllowStubCallsScope allow_stub_calls(masm, true);
ProfileEntryHookStub stub;
__ push(lr);
__ CallStub(&stub);
@@ -7091,21 +7086,9 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
const int32_t kReturnAddressDistanceFromFunctionStart =
3 * Assembler::kInstrSize;
- // This should contain all kCallerSaved registers.
- const RegList kSavedRegs =
- 1 << 0 | // r0
- 1 << 1 | // r1
- 1 << 2 | // r2
- 1 << 3 | // r3
- 1 << 5 | // r5
- 1 << 9; // r9
- // We also save lr, so the count here is one higher than the mask indicates.
- const int32_t kNumSavedRegs = 7;
-
- ASSERT((kCallerSaved & kSavedRegs) == kCallerSaved);
-
- // Save all caller-save registers as this may be called from anywhere.
- __ stm(db_w, sp, kSavedRegs | lr.bit());
+ // Save live volatile registers.
+ __ Push(lr, r5, r1);
+ const int32_t kNumSavedRegs = 3;
// Compute the function's address for the first argument.
__ sub(r0, lr, Operand(kReturnAddressDistanceFromFunctionStart));
@@ -7123,12 +7106,14 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
}
#if defined(V8_HOST_ARCH_ARM)
- __ mov(ip, FUNCTION_ADDR(masm->isolate()->function_entry_hook()),
- RelocInfo::NONE));
+ __ mov(ip, Operand(reinterpret_cast<int32_t>(&entry_hook_)));
+ __ ldr(ip, MemOperand(ip));
#else
// Under the simulator we need to indirect the entry hook through a
// trampoline function at a known address.
- ApiFunction dispatcher(FUNCTION_ADDR(EntryHookTrampoline));
+ Address trampoline_address = reinterpret_cast<Address>(
+ reinterpret_cast<intptr_t>(EntryHookTrampoline));
+ ApiFunction dispatcher(trampoline_address);
__ mov(ip, Operand(ExternalReference(&dispatcher,
ExternalReference::BUILTIN_CALL,
masm->isolate())));
@@ -7140,8 +7125,8 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
__ mov(sp, r5);
}
- // Also pop pc to get Ret(0).
- __ ldm(ia_w, sp, kSavedRegs | pc.bit());
+ __ Pop(lr, r5, r1);
+ __ Ret();
}
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698