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

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 136563002: Landing: Write protect executable pages in the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 region.Store<int32_t>(position, patched_movw); 1701 region.Store<int32_t>(position, patched_movw);
1702 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt); 1702 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt);
1703 return; 1703 return;
1704 } 1704 }
1705 1705
1706 // If the offset loading instructions aren't there, we must have replaced 1706 // If the offset loading instructions aren't there, we must have replaced
1707 // the far branch with a near one, and so these instructions should be NOPs. 1707 // the far branch with a near one, and so these instructions should be NOPs.
1708 ASSERT((movt == Instr::kNopInstruction) && 1708 ASSERT((movt == Instr::kNopInstruction) &&
1709 (bx == Instr::kNopInstruction)); 1709 (bx == Instr::kNopInstruction));
1710 } 1710 }
1711
1712 virtual bool IsPointerOffset() const { return false; }
1711 }; 1713 };
1712 1714
1713 1715
1714 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) { 1716 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) {
1715 const uint16_t low = Utils::Low16Bits(offset); 1717 const uint16_t low = Utils::Low16Bits(offset);
1716 const uint16_t high = Utils::High16Bits(offset); 1718 const uint16_t high = Utils::High16Bits(offset);
1717 buffer_.EmitFixup(new PatchFarBranch()); 1719 buffer_.EmitFixup(new PatchFarBranch());
1718 movw(IP, low); 1720 movw(IP, low);
1719 movt(IP, high); 1721 movt(IP, high);
1720 if (link) { 1722 if (link) {
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 2754
2753 2755
2754 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2756 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2755 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2757 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2756 return fpu_reg_names[reg]; 2758 return fpu_reg_names[reg];
2757 } 2759 }
2758 2760
2759 } // namespace dart 2761 } // namespace dart
2760 2762
2761 #endif // defined TARGET_ARCH_ARM 2763 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698