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

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

Issue 106593002: Write protect executable pages in the VM. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 region.Store<int32_t>(position, patched_movw); 1791 region.Store<int32_t>(position, patched_movw);
1792 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt); 1792 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt);
1793 return; 1793 return;
1794 } 1794 }
1795 1795
1796 // If the offset loading instructions aren't there, we must have replaced 1796 // If the offset loading instructions aren't there, we must have replaced
1797 // the far branch with a near one, and so these instructions should be NOPs. 1797 // the far branch with a near one, and so these instructions should be NOPs.
1798 ASSERT((movt == Instr::kNopInstruction) && 1798 ASSERT((movt == Instr::kNopInstruction) &&
1799 (bx == Instr::kNopInstruction)); 1799 (bx == Instr::kNopInstruction));
1800 } 1800 }
1801
1802 virtual bool IsPointerOffset() const { return false; }
1801 }; 1803 };
1802 1804
1803 1805
1804 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) { 1806 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) {
1805 const uint16_t low = Utils::Low16Bits(offset); 1807 const uint16_t low = Utils::Low16Bits(offset);
1806 const uint16_t high = Utils::High16Bits(offset); 1808 const uint16_t high = Utils::High16Bits(offset);
1807 buffer_.EmitFixup(new PatchFarBranch()); 1809 buffer_.EmitFixup(new PatchFarBranch());
1808 movw(IP, low); 1810 movw(IP, low);
1809 movt(IP, high); 1811 movt(IP, high);
1810 if (link) { 1812 if (link) {
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2754 2756
2755 2757
2756 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2758 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2757 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2759 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2758 return fpu_reg_names[reg]; 2760 return fpu_reg_names[reg];
2759 } 2761 }
2760 2762
2761 } // namespace dart 2763 } // namespace dart
2762 2764
2763 #endif // defined TARGET_ARCH_ARM 2765 #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