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

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

Issue 12726011: Enables cross-compilation of the VM for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
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/simulator.h" 9 #include "vm/simulator.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 #endif 34 #endif
35 35
36 36
37 #define __ assembler. 37 #define __ assembler.
38 38
39 void CPUFeatures::InitOnce() { 39 void CPUFeatures::InitOnce() {
40 #if defined(USING_SIMULATOR) 40 #if defined(USING_SIMULATOR)
41 integer_division_supported_ = true; 41 integer_division_supported_ = true;
42 #else 42 #else
43 Assembler assembler; 43 integer_division_supported_ = false;
44 __ mrc(R0, 15, 0, 0, 2, 0);
45 __ Lsr(R0, R0, 24);
46 __ and_(R0, R0, ShifterOperand(0xf));
47 __ Ret();
48
49 const Code& code =
50 Code::Handle(Code::FinalizeCode("DetectCPUFeatures", &assembler));
51 Instructions& instructions = Instructions::Handle(code.instructions());
52 typedef int32_t (*DetectCPUFeatures)();
53 int32_t features =
54 reinterpret_cast<DetectCPUFeatures>(instructions.EntryPoint())();
55 integer_division_supported_ = features != 0;
56 #endif // defined(USING_SIMULATOR) 44 #endif // defined(USING_SIMULATOR)
57 #if defined(DEBUG) 45 #if defined(DEBUG)
58 initialized_ = true; 46 initialized_ = true;
59 #endif 47 #endif
60 } 48 }
61 49
62 #undef __ 50 #undef __
63 51
64 52
65 // Instruction encoding bits. 53 // Instruction encoding bits.
(...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 // Do not reuse an existing entry, since each reference may be patched 1990 // Do not reuse an existing entry, since each reference may be patched
2003 // independently. 1991 // independently.
2004 object_pool_.Add(smi, Heap::kOld); 1992 object_pool_.Add(smi, Heap::kOld);
2005 return object_pool_.Length() - 1; 1993 return object_pool_.Length() - 1;
2006 } 1994 }
2007 1995
2008 } // namespace dart 1996 } // namespace dart
2009 1997
2010 #endif // defined TARGET_ARCH_ARM 1998 #endif // defined TARGET_ARCH_ARM
2011 1999
OLDNEW
« no previous file with comments | « runtime/third_party/jscre/jscre.gypi ('k') | runtime/vm/object.cc » ('j') | tools/build.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698