Index: src/debug/arm/debug-arm.cc |
diff --git a/src/debug/arm/debug-arm.cc b/src/debug/arm/debug-arm.cc |
index 16fdc8f456e00b77dd34b03332991f7be57a38b7..2f3fe03fd8b6bd67549d6b4b1a343659638f0014 100644 |
--- a/src/debug/arm/debug-arm.cc |
+++ b/src/debug/arm/debug-arm.cc |
@@ -16,17 +16,17 @@ namespace internal { |
#define __ ACCESS_MASM(masm) |
- |
-void EmitDebugBreakSlot(MacroAssembler* masm) { |
+namespace { |
+void EmitDebugBreakSlot(Assembler* assembler) { |
Label check_size; |
- __ bind(&check_size); |
+ assembler->bind(&check_size); |
for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
- __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
+ assembler->nop(MacroAssembler::DEBUG_BREAK_NOP); |
} |
DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, |
- masm->InstructionsGeneratedSince(&check_size)); |
+ assembler->InstructionsGeneratedSince(&check_size)); |
} |
- |
+} // anonymous namespace |
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { |
// Generate enough nop's to make space for a call instruction. Avoid emitting |
@@ -38,15 +38,18 @@ void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { |
void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
- CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
- EmitDebugBreakSlot(patcher.masm()); |
+ PatchingAssembler patcher(Assembler::IsolateData(isolate), pc, |
+ Assembler::kDebugBreakSlotInstructions); |
+ EmitDebugBreakSlot(&patcher); |
+ patcher.FlushICache(isolate); |
} |
void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
Handle<Code> code) { |
DCHECK(code->is_debug_stub()); |
- CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
+ PatchingAssembler patcher(Assembler::IsolateData(isolate), pc, |
+ Assembler::kDebugBreakSlotInstructions); |
// Patch the code changing the debug break slot code from |
// mov r2, r2 |
// mov r2, r2 |
@@ -59,11 +62,12 @@ void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
// skip: |
// blx ip |
Label skip_constant; |
- patcher.masm()->ldr(ip, MemOperand(v8::internal::pc, 0)); |
- patcher.masm()->b(&skip_constant); |
+ patcher.ldr(ip, MemOperand(v8::internal::pc, 0)); |
+ patcher.b(&skip_constant); |
patcher.Emit(code->entry()); |
- patcher.masm()->bind(&skip_constant); |
- patcher.masm()->blx(ip); |
+ patcher.bind(&skip_constant); |
+ patcher.blx(ip); |
+ patcher.FlushICache(isolate); |
} |
bool DebugCodegen::DebugBreakSlotIsPatched(Address pc) { |