Move assembler out of runtime into compiler/utils.

Other directory layout bits of clean up. There is still work to separate quick
and portable in some files (e.g. argument visitor, proxy..).

Change-Id: If8fecffda8ba5c4c47a035f0c622c538c6b58351
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index ad33365..994d43e 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -17,6 +17,11 @@
 LOCAL_PATH := art
 
 TEST_COMMON_SRC_FILES := \
+	compiler/driver/compiler_driver_test.cc \
+	compiler/elf_writer_test.cc \
+	compiler/jni/jni_compiler_test.cc \
+	compiler/utils/arm/managed_register_arm_test.cc \
+	compiler/utils/x86/managed_register_x86_test.cc \
 	runtime/barrier_test.cc \
 	runtime/base/histogram_test.cc \
 	runtime/base/mutex_test.cc \
@@ -41,8 +46,6 @@
 	runtime/jni_internal_test.cc \
 	runtime/mirror/dex_cache_test.cc \
 	runtime/mirror/object_test.cc \
-	runtime/oat/utils/arm/managed_register_arm_test.cc \
-	runtime/oat/utils/x86/managed_register_x86_test.cc \
 	runtime/oat_test.cc \
 	runtime/output_stream_test.cc \
 	runtime/reference_table_test.cc \
@@ -52,10 +55,7 @@
 	runtime/utils_test.cc \
 	runtime/verifier/method_verifier_test.cc \
 	runtime/verifier/reg_type_test.cc \
-	runtime/zip_archive_test.cc \
-	compiler/driver/compiler_driver_test.cc \
-	compiler/elf_writer_test.cc \
-	compiler/jni/jni_compiler_test.cc
+	runtime/zip_archive_test.cc
 
 ifeq ($(ART_SEA_IR_MODE),true)
 TEST_COMMON_SRC_FILES += \
@@ -67,7 +67,7 @@
 
 TEST_HOST_SRC_FILES := \
 	$(TEST_COMMON_SRC_FILES) \
-	runtime/oat/utils/x86/assembler_x86_test.cc
+	compiler/utils/x86/assembler_x86_test.cc
 
 ART_HOST_TEST_EXECUTABLES :=
 ART_TARGET_TEST_EXECUTABLES :=
diff --git a/compiler/Android.mk b/compiler/Android.mk
index 68223a2..c0f6181 100644
--- a/compiler/Android.mk
+++ b/compiler/Android.mk
@@ -76,6 +76,13 @@
 	llvm/runtime_support_builder_x86.cc \
 	stubs/portable/stubs.cc \
 	stubs/quick/stubs.cc \
+	utils/arm/assembler_arm.cc \
+	utils/arm/managed_register_arm.cc \
+	utils/assembler.cc \
+	utils/mips/assembler_mips.cc \
+	utils/mips/managed_register_mips.cc \
+	utils/x86/assembler_x86.cc \
+	utils/x86/managed_register_x86.cc \
 	elf_fixup.cc \
 	elf_stripper.cc \
 	elf_writer.cc \
diff --git a/compiler/dex/quick/arm/call_arm.cc b/compiler/dex/quick/arm/call_arm.cc
index 64ebb6a..7c3ec14 100644
--- a/compiler/dex/quick/arm/call_arm.cc
+++ b/compiler/dex/quick/arm/call_arm.cc
@@ -19,7 +19,7 @@
 #include "arm_lir.h"
 #include "codegen_arm.h"
 #include "dex/quick/mir_to_lir-inl.h"
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 
 namespace art {
 
diff --git a/compiler/dex/quick/arm/int_arm.cc b/compiler/dex/quick/arm/int_arm.cc
index e1a77da..4bb507b 100644
--- a/compiler/dex/quick/arm/int_arm.cc
+++ b/compiler/dex/quick/arm/int_arm.cc
@@ -19,8 +19,8 @@
 #include "arm_lir.h"
 #include "codegen_arm.h"
 #include "dex/quick/mir_to_lir-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "mirror/array.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
 
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
index 40db2c6..8934340 100644
--- a/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -17,8 +17,8 @@
 #include "dex/compiler_ir.h"
 #include "dex/compiler_internals.h"
 #include "dex/quick/mir_to_lir-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "mirror/array.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 #include "verifier/method_verifier.h"
 
 namespace art {
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
index cae1319..91f2500 100644
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -16,11 +16,11 @@
 
 #include "dex/compiler_ir.h"
 #include "dex_file-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "invoke_type.h"
 #include "mirror/array.h"
 #include "mirror/string.h"
 #include "mir_to_lir-inl.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 #include "x86/codegen_x86.h"
 
 namespace art {
diff --git a/compiler/dex/quick/mips/call_mips.cc b/compiler/dex/quick/mips/call_mips.cc
index 8b375ea..b6c200c 100644
--- a/compiler/dex/quick/mips/call_mips.cc
+++ b/compiler/dex/quick/mips/call_mips.cc
@@ -18,8 +18,8 @@
 
 #include "codegen_mips.h"
 #include "dex/quick/mir_to_lir-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "mips_lir.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
 
diff --git a/compiler/dex/quick/mips/fp_mips.cc b/compiler/dex/quick/mips/fp_mips.cc
index 6cd9acc..620527e 100644
--- a/compiler/dex/quick/mips/fp_mips.cc
+++ b/compiler/dex/quick/mips/fp_mips.cc
@@ -16,8 +16,8 @@
 
 #include "codegen_mips.h"
 #include "dex/quick/mir_to_lir-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "mips_lir.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
 
diff --git a/compiler/dex/quick/mips/int_mips.cc b/compiler/dex/quick/mips/int_mips.cc
index ea7da60..7c8214b 100644
--- a/compiler/dex/quick/mips/int_mips.cc
+++ b/compiler/dex/quick/mips/int_mips.cc
@@ -18,9 +18,9 @@
 
 #include "codegen_mips.h"
 #include "dex/quick/mir_to_lir-inl.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "mips_lir.h"
 #include "mirror/array.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
 
diff --git a/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc
index e9b09c5..9778293 100644
--- a/compiler/jni/quick/arm/calling_convention_arm.cc
+++ b/compiler/jni/quick/arm/calling_convention_arm.cc
@@ -16,7 +16,7 @@
 
 #include "base/logging.h"
 #include "calling_convention_arm.h"
-#include "oat/utils/arm/managed_register_arm.h"
+#include "utils/arm/managed_register_arm.h"
 
 namespace art {
 namespace arm {
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index d492b42..f2b7fd9 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -18,9 +18,9 @@
 #define ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
 
 #include <vector>
-#include "oat/utils/managed_register.h"
 #include "stack_indirect_reference_table.h"
 #include "thread.h"
+#include "utils/managed_register.h"
 
 namespace art {
 
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index fa227f7..aeadb54 100644
--- a/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -25,13 +25,13 @@
 #include "dex_file-inl.h"
 #include "driver/compiler_driver.h"
 #include "disassembler.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "jni_internal.h"
-#include "oat/runtime/oat_support_entrypoints.h"
-#include "oat/utils/assembler.h"
-#include "oat/utils/managed_register.h"
-#include "oat/utils/arm/managed_register_arm.h"
-#include "oat/utils/mips/managed_register_mips.h"
-#include "oat/utils/x86/managed_register_x86.h"
+#include "utils/assembler.h"
+#include "utils/managed_register.h"
+#include "utils/arm/managed_register_arm.h"
+#include "utils/mips/managed_register_mips.h"
+#include "utils/x86/managed_register_x86.h"
 #include "thread.h"
 #include "UniquePtr.h"
 
diff --git a/compiler/jni/quick/mips/calling_convention_mips.cc b/compiler/jni/quick/mips/calling_convention_mips.cc
index 053ab44..0a48500 100644
--- a/compiler/jni/quick/mips/calling_convention_mips.cc
+++ b/compiler/jni/quick/mips/calling_convention_mips.cc
@@ -17,7 +17,7 @@
 #include "calling_convention_mips.h"
 
 #include "base/logging.h"
-#include "oat/utils/mips/managed_register_mips.h"
+#include "utils/mips/managed_register_mips.h"
 
 namespace art {
 namespace mips {
diff --git a/compiler/jni/quick/x86/calling_convention_x86.cc b/compiler/jni/quick/x86/calling_convention_x86.cc
index 45dd429..8b5c86d 100644
--- a/compiler/jni/quick/x86/calling_convention_x86.cc
+++ b/compiler/jni/quick/x86/calling_convention_x86.cc
@@ -17,7 +17,7 @@
 #include "calling_convention_x86.h"
 
 #include "base/logging.h"
-#include "oat/utils/x86/managed_register_x86.h"
+#include "utils/x86/managed_register_x86.h"
 #include "utils.h"
 
 namespace art {
diff --git a/compiler/llvm/runtime_support_builder.cc b/compiler/llvm/runtime_support_builder.cc
index 7299803..24e283d 100644
--- a/compiler/llvm/runtime_support_builder.cc
+++ b/compiler/llvm/runtime_support_builder.cc
@@ -20,6 +20,7 @@
 #include "ir_builder.h"
 #include "monitor.h"
 #include "mirror/object.h"
+#include "runtime_support_llvm_func_list.h"
 #include "thread.h"
 
 #include <llvm/IR/DerivedTypes.h>
@@ -47,10 +48,7 @@
     runtime_support_func_decls_[runtime_support::ID] = fn; \
   } while (0);
 
-#include "runtime_support_llvm_func_list.h"
   RUNTIME_SUPPORT_FUNC_LIST(GET_RUNTIME_SUPPORT_FUNC_DECL)
-#undef RUNTIME_SUPPORT_FUNC_LIST
-#undef GET_RUNTIME_SUPPORT_FUNC_DECL
 }
 
 
diff --git a/compiler/llvm/runtime_support_llvm_func.h b/compiler/llvm/runtime_support_llvm_func.h
index 2634c68..a5ad852 100644
--- a/compiler/llvm/runtime_support_llvm_func.h
+++ b/compiler/llvm/runtime_support_llvm_func.h
@@ -17,16 +17,15 @@
 #ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_H_
 #define ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_H_
 
+#include "runtime_support_llvm_func_list.h"
+
 namespace art {
 namespace llvm {
 namespace runtime_support {
 
   enum RuntimeId {
 #define DEFINE_RUNTIME_SUPPORT_FUNC_ID(ID, NAME) ID,
-#include "runtime_support_llvm_func_list.h"
     RUNTIME_SUPPORT_FUNC_LIST(DEFINE_RUNTIME_SUPPORT_FUNC_ID)
-#undef RUNTIME_SUPPORT_FUNC_LIST
-#undef DEFINE_RUNTIME_SUPPORT_FUNC_ID
 
     MAX_ID
   };
diff --git a/runtime/runtime_support_llvm_func_list.h b/compiler/llvm/runtime_support_llvm_func_list.h
similarity index 94%
rename from runtime/runtime_support_llvm_func_list.h
rename to compiler/llvm/runtime_support_llvm_func_list.h
index 8b635cb..b5ac1ff 100644
--- a/runtime/runtime_support_llvm_func_list.h
+++ b/compiler/llvm/runtime_support_llvm_func_list.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
-#define ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
 
 #define RUNTIME_SUPPORT_FUNC_LIST(V) \
   V(LockObject, art_portable_lock_object_from_code) \
@@ -78,5 +78,4 @@
   V(JniMethodEndWithReference,             art_portable_jni_method_end_with_reference) \
   V(JniMethodEndWithReferenceSynchronized, art_portable_jni_method_end_with_reference_synchronized)
 
-#endif  // ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
-#undef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_  // the guard in this file is just for cpplint
+#endif  // ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
diff --git a/compiler/stubs/portable/stubs.cc b/compiler/stubs/portable/stubs.cc
index 69568d7..cee6847 100644
--- a/compiler/stubs/portable/stubs.cc
+++ b/compiler/stubs/portable/stubs.cc
@@ -16,11 +16,11 @@
 
 #include "stubs/stubs.h"
 
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "jni_internal.h"
-#include "oat/utils/arm/assembler_arm.h"
-#include "oat/utils/mips/assembler_mips.h"
-#include "oat/utils/x86/assembler_x86.h"
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "utils/arm/assembler_arm.h"
+#include "utils/mips/assembler_mips.h"
+#include "utils/x86/assembler_x86.h"
 #include "stack_indirect_reference_table.h"
 #include "sirt_ref.h"
 
diff --git a/compiler/stubs/quick/stubs.cc b/compiler/stubs/quick/stubs.cc
index 8fc2a81..598481f 100644
--- a/compiler/stubs/quick/stubs.cc
+++ b/compiler/stubs/quick/stubs.cc
@@ -16,11 +16,11 @@
 
 #include "stubs/stubs.h"
 
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "jni_internal.h"
-#include "oat/runtime/oat_support_entrypoints.h"
-#include "oat/utils/arm/assembler_arm.h"
-#include "oat/utils/mips/assembler_mips.h"
-#include "oat/utils/x86/assembler_x86.h"
+#include "utils/arm/assembler_arm.h"
+#include "utils/mips/assembler_mips.h"
+#include "utils/x86/assembler_x86.h"
 #include "sirt_ref.h"
 #include "stack_indirect_reference_table.h"
 
diff --git a/runtime/oat/utils/arm/assembler_arm.cc b/compiler/utils/arm/assembler_arm.cc
similarity index 99%
rename from runtime/oat/utils/arm/assembler_arm.cc
rename to compiler/utils/arm/assembler_arm.cc
index 960a60d..0778cd3 100644
--- a/runtime/oat/utils/arm/assembler_arm.cc
+++ b/compiler/utils/arm/assembler_arm.cc
@@ -17,7 +17,7 @@
 #include "assembler_arm.h"
 
 #include "base/logging.h"
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "offsets.h"
 #include "thread.h"
 #include "utils.h"
diff --git a/runtime/oat/utils/arm/assembler_arm.h b/compiler/utils/arm/assembler_arm.h
similarity index 98%
rename from runtime/oat/utils/arm/assembler_arm.h
rename to compiler/utils/arm/assembler_arm.h
index b8c79d2..757a8a2 100644
--- a/runtime/oat/utils/arm/assembler_arm.h
+++ b/compiler/utils/arm/assembler_arm.h
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
-#define ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
+#ifndef ART_COMPILER_UTILS_ARM_ASSEMBLER_ARM_H_
+#define ART_COMPILER_UTILS_ARM_ASSEMBLER_ARM_H_
 
 #include <vector>
 
 #include "base/logging.h"
 #include "constants_arm.h"
-#include "oat/utils/arm/managed_register_arm.h"
-#include "oat/utils/assembler.h"
+#include "utils/arm/managed_register_arm.h"
+#include "utils/assembler.h"
 #include "offsets.h"
 #include "utils.h"
 
@@ -656,4 +656,4 @@
 }  // namespace arm
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
+#endif  // ART_COMPILER_UTILS_ARM_ASSEMBLER_ARM_H_
diff --git a/runtime/constants_arm.h b/compiler/utils/arm/constants_arm.h
similarity index 91%
rename from runtime/constants_arm.h
rename to compiler/utils/arm/constants_arm.h
index bbb9242..cc795b1 100644
--- a/runtime/constants_arm.h
+++ b/compiler/utils/arm/constants_arm.h
@@ -14,13 +14,14 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_CONSTANTS_ARM_H_
-#define ART_RUNTIME_CONSTANTS_ARM_H_
+#ifndef ART_COMPILER_UTILS_ARM_CONSTANTS_ARM_H_
+#define ART_COMPILER_UTILS_ARM_CONSTANTS_ARM_H_
 
 #include <stdint.h>
 
 #include <iosfwd>
 
+#include "arch/arm/registers_arm.h"
 #include "base/casts.h"
 #include "base/logging.h"
 #include "globals.h"
@@ -47,36 +48,6 @@
 #endif
 
 
-// Values for registers.
-enum Register {
-  R0  =  0,
-  R1  =  1,
-  R2  =  2,
-  R3  =  3,
-  R4  =  4,
-  R5  =  5,
-  R6  =  6,
-  R7  =  7,
-  R8  =  8,
-  R9  =  9,
-  R10 = 10,
-  R11 = 11,
-  R12 = 12,
-  R13 = 13,
-  R14 = 14,
-  R15 = 15,
-  TR  = 9,  // thread register
-  FP  = 11,
-  IP  = 12,
-  SP  = 13,
-  LR  = 14,
-  PC  = 15,
-  kNumberOfCoreRegisters = 16,
-  kNoRegister = -1,
-};
-std::ostream& operator<<(std::ostream& os, const Register& rhs);
-
-
 enum ScaleFactor {
   TIMES_1 = 0,
   TIMES_2 = 1,
@@ -84,47 +55,6 @@
   TIMES_8 = 3
 };
 
-
-// Values for single-precision floating point registers.
-enum SRegister {
-  S0  =  0,
-  S1  =  1,
-  S2  =  2,
-  S3  =  3,
-  S4  =  4,
-  S5  =  5,
-  S6  =  6,
-  S7  =  7,
-  S8  =  8,
-  S9  =  9,
-  S10 = 10,
-  S11 = 11,
-  S12 = 12,
-  S13 = 13,
-  S14 = 14,
-  S15 = 15,
-  S16 = 16,
-  S17 = 17,
-  S18 = 18,
-  S19 = 19,
-  S20 = 20,
-  S21 = 21,
-  S22 = 22,
-  S23 = 23,
-  S24 = 24,
-  S25 = 25,
-  S26 = 26,
-  S27 = 27,
-  S28 = 28,
-  S29 = 29,
-  S30 = 30,
-  S31 = 31,
-  kNumberOfSRegisters = 32,
-  kNoSRegister = -1,
-};
-std::ostream& operator<<(std::ostream& os, const SRegister& rhs);
-
-
 // Values for double-precision floating point registers.
 enum DRegister {
   D0  =  0,
@@ -516,4 +446,4 @@
 }  // namespace arm
 }  // namespace art
 
-#endif  // ART_RUNTIME_CONSTANTS_ARM_H_
+#endif  // ART_COMPILER_UTILS_ARM_CONSTANTS_ARM_H_
diff --git a/runtime/oat/utils/arm/managed_register_arm.cc b/compiler/utils/arm/managed_register_arm.cc
similarity index 100%
rename from runtime/oat/utils/arm/managed_register_arm.cc
rename to compiler/utils/arm/managed_register_arm.cc
diff --git a/runtime/oat/utils/arm/managed_register_arm.h b/compiler/utils/arm/managed_register_arm.h
similarity index 97%
rename from runtime/oat/utils/arm/managed_register_arm.h
rename to compiler/utils/arm/managed_register_arm.h
index 01596bb..a496c87 100644
--- a/runtime/oat/utils/arm/managed_register_arm.h
+++ b/compiler/utils/arm/managed_register_arm.h
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
-#define ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#ifndef ART_COMPILER_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#define ART_COMPILER_UTILS_ARM_MANAGED_REGISTER_ARM_H_
 
 #include "base/logging.h"
 #include "constants_arm.h"
-#include "oat/utils/managed_register.h"
+#include "utils/managed_register.h"
 
 namespace art {
 namespace arm {
@@ -271,4 +271,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#endif  // ART_COMPILER_UTILS_ARM_MANAGED_REGISTER_ARM_H_
diff --git a/runtime/oat/utils/arm/managed_register_arm_test.cc b/compiler/utils/arm/managed_register_arm_test.cc
similarity index 100%
rename from runtime/oat/utils/arm/managed_register_arm_test.cc
rename to compiler/utils/arm/managed_register_arm_test.cc
diff --git a/runtime/oat/utils/assembler.cc b/compiler/utils/assembler.cc
similarity index 100%
rename from runtime/oat/utils/assembler.cc
rename to compiler/utils/assembler.cc
diff --git a/runtime/oat/utils/assembler.h b/compiler/utils/assembler.h
similarity index 98%
rename from runtime/oat/utils/assembler.h
rename to compiler/utils/assembler.h
index 05e2732..9d79002 100644
--- a/runtime/oat/utils/assembler.h
+++ b/compiler/utils/assembler.h
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
-#define ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
+#ifndef ART_COMPILER_UTILS_ASSEMBLER_H_
+#define ART_COMPILER_UTILS_ASSEMBLER_H_
 
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "constants_arm.h"
-#include "constants_mips.h"
-#include "constants_x86.h"
+#include "arm/constants_arm.h"
+#include "mips/constants_mips.h"
+#include "x86/constants_x86.h"
 #include "instruction_set.h"
 #include "managed_register.h"
 #include "memory_region.h"
@@ -456,4 +456,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
+#endif  // ART_COMPILER_UTILS_ASSEMBLER_H_
diff --git a/runtime/oat/utils/managed_register.h b/compiler/utils/managed_register.h
similarity index 91%
rename from runtime/oat/utils/managed_register.h
rename to compiler/utils/managed_register.h
index 4dd2acd..4ad1763 100644
--- a/runtime/oat/utils/managed_register.h
+++ b/compiler/utils/managed_register.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
-#define ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
+#ifndef ART_COMPILER_UTILS_MANAGED_REGISTER_H_
+#define ART_COMPILER_UTILS_MANAGED_REGISTER_H_
 
 namespace art {
 
@@ -69,4 +69,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
+#endif  // ART_COMPILER_UTILS_MANAGED_REGISTER_H_
diff --git a/runtime/oat/utils/mips/assembler_mips.cc b/compiler/utils/mips/assembler_mips.cc
similarity index 97%
rename from runtime/oat/utils/mips/assembler_mips.cc
rename to compiler/utils/mips/assembler_mips.cc
index 25ba9b2..58815da 100644
--- a/runtime/oat/utils/mips/assembler_mips.cc
+++ b/compiler/utils/mips/assembler_mips.cc
@@ -17,8 +17,8 @@
 #include "assembler_mips.h"
 
 #include "base/casts.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "memory_region.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 #include "thread.h"
 
 namespace art {
@@ -36,30 +36,6 @@
 };
 #endif
 
-static const char* kRegisterNames[] = {
-  "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
-  "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
-  "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
-  "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra",
-};
-std::ostream& operator<<(std::ostream& os, const Register& rhs) {
-  if (rhs >= ZERO && rhs <= RA) {
-    os << kRegisterNames[rhs];
-  } else {
-    os << "Register[" << static_cast<int>(rhs) << "]";
-  }
-  return os;
-}
-
-std::ostream& operator<<(std::ostream& os, const FRegister& rhs) {
-  if (rhs >= F0 && rhs < kNumberOfFRegisters) {
-    os << "f" << static_cast<int>(rhs);
-  } else {
-    os << "FRegister[" << static_cast<int>(rhs) << "]";
-  }
-  return os;
-}
-
 std::ostream& operator<<(std::ostream& os, const DRegister& rhs) {
   if (rhs >= D0 && rhs < kNumberOfDRegisters) {
     os << "d" << static_cast<int>(rhs);
diff --git a/runtime/oat/utils/mips/assembler_mips.h b/compiler/utils/mips/assembler_mips.h
similarity index 98%
rename from runtime/oat/utils/mips/assembler_mips.h
rename to compiler/utils/mips/assembler_mips.h
index 8f4a33a..0f5f2fe 100644
--- a/runtime/oat/utils/mips/assembler_mips.h
+++ b/compiler/utils/mips/assembler_mips.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
-#define ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#ifndef ART_COMPILER_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#define ART_COMPILER_UTILS_MIPS_ASSEMBLER_MIPS_H_
 
 #include <vector>
 
@@ -23,7 +23,7 @@
 #include "constants_mips.h"
 #include "globals.h"
 #include "managed_register_mips.h"
-#include "oat/utils/assembler.h"
+#include "utils/assembler.h"
 #include "offsets.h"
 #include "utils.h"
 
@@ -504,4 +504,4 @@
 }  // namespace mips
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#endif  // ART_COMPILER_UTILS_MIPS_ASSEMBLER_MIPS_H_
diff --git a/runtime/constants_mips.h b/compiler/utils/mips/constants_mips.h
similarity index 61%
rename from runtime/constants_mips.h
rename to compiler/utils/mips/constants_mips.h
index fb56493..44ed5cc 100644
--- a/runtime/constants_mips.h
+++ b/compiler/utils/mips/constants_mips.h
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_CONSTANTS_MIPS_H_
-#define ART_RUNTIME_CONSTANTS_MIPS_H_
+#ifndef ART_COMPILER_UTILS_MIPS_CONSTANTS_MIPS_H_
+#define ART_COMPILER_UTILS_MIPS_CONSTANTS_MIPS_H_
 
 #include <iosfwd>
 
+#include "arch/mips/registers_mips.h"
 #include "base/logging.h"
 #include "base/macros.h"
 #include "globals.h"
@@ -26,83 +27,6 @@
 namespace art {
 namespace mips {
 
-enum Register {
-  ZERO =  0,
-  AT   =  1,  // Assembler temporary.
-  V0   =  2,  // Values.
-  V1   =  3,
-  A0   =  4,  // Arguments.
-  A1   =  5,
-  A2   =  6,
-  A3   =  7,
-  T0   =  8,  // Temporaries.
-  T1   =  9,
-  T2   = 10,
-  T3   = 11,
-  T4   = 12,
-  T5   = 13,
-  T6   = 14,
-  T7   = 15,
-  S0   = 16,  // Saved values.
-  S1   = 17,
-  S2   = 18,
-  S3   = 19,
-  S4   = 20,
-  S5   = 21,
-  S6   = 22,
-  S7   = 23,
-  T8   = 24,  // More temporaries.
-  T9   = 25,
-  K0   = 26,  // Reserved for trap handler.
-  K1   = 27,
-  GP   = 28,  // Global pointer.
-  SP   = 29,  // Stack pointer.
-  FP   = 30,  // Saved value/frame pointer.
-  RA   = 31,  // Return address.
-  kNumberOfCoreRegisters = 32,
-  kNoRegister = -1  // Signals an illegal register.
-};
-std::ostream& operator<<(std::ostream& os, const Register& rhs);
-
-// Values for single-precision floating point registers.
-enum FRegister {
-  F0  =  0,
-  F1  =  1,
-  F2  =  2,
-  F3  =  3,
-  F4  =  4,
-  F5  =  5,
-  F6  =  6,
-  F7  =  7,
-  F8  =  8,
-  F9  =  9,
-  F10 = 10,
-  F11 = 11,
-  F12 = 12,
-  F13 = 13,
-  F14 = 14,
-  F15 = 15,
-  F16 = 16,
-  F17 = 17,
-  F18 = 18,
-  F19 = 19,
-  F20 = 20,
-  F21 = 21,
-  F22 = 22,
-  F23 = 23,
-  F24 = 24,
-  F25 = 25,
-  F26 = 26,
-  F27 = 27,
-  F28 = 28,
-  F29 = 29,
-  F30 = 30,
-  F31 = 31,
-  kNumberOfFRegisters = 32,
-  kNoFRegister = -1,
-};
-std::ostream& operator<<(std::ostream& os, const FRegister& rhs);
-
 // Values for double-precision floating point registers.
 enum DRegister {
   D0  =  0,
@@ -183,4 +107,4 @@
 }  // namespace mips
 }  // namespace art
 
-#endif  // ART_RUNTIME_CONSTANTS_MIPS_H_
+#endif  // ART_COMPILER_UTILS_MIPS_CONSTANTS_MIPS_H_
diff --git a/runtime/oat/utils/mips/managed_register_mips.cc b/compiler/utils/mips/managed_register_mips.cc
similarity index 100%
rename from runtime/oat/utils/mips/managed_register_mips.cc
rename to compiler/utils/mips/managed_register_mips.cc
diff --git a/runtime/oat/utils/mips/managed_register_mips.h b/compiler/utils/mips/managed_register_mips.h
similarity index 96%
rename from runtime/oat/utils/mips/managed_register_mips.h
rename to compiler/utils/mips/managed_register_mips.h
index b335ff9..dd55cc4 100644
--- a/runtime/oat/utils/mips/managed_register_mips.h
+++ b/compiler/utils/mips/managed_register_mips.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
-#define ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#ifndef ART_COMPILER_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#define ART_COMPILER_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
 
 #include "constants_mips.h"
-#include "oat/utils/managed_register.h"
+#include "utils/managed_register.h"
 
 namespace art {
 namespace mips {
@@ -225,4 +225,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#endif  // ART_COMPILER_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
diff --git a/runtime/oat/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc
similarity index 98%
rename from runtime/oat/utils/x86/assembler_x86.cc
rename to compiler/utils/x86/assembler_x86.cc
index fd8f152..89bfeb5 100644
--- a/runtime/oat/utils/x86/assembler_x86.cc
+++ b/compiler/utils/x86/assembler_x86.cc
@@ -17,8 +17,8 @@
 #include "assembler_x86.h"
 
 #include "base/casts.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "memory_region.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 #include "thread.h"
 
 namespace art {
@@ -35,18 +35,6 @@
   }
 };
 
-static const char* kRegisterNames[] = {
-  "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
-};
-std::ostream& operator<<(std::ostream& os, const Register& rhs) {
-  if (rhs >= EAX && rhs <= EDI) {
-    os << kRegisterNames[rhs];
-  } else {
-    os << "Register[" << static_cast<int>(rhs) << "]";
-  }
-  return os;
-}
-
 std::ostream& operator<<(std::ostream& os, const XmmRegister& reg) {
   return os << "XMM" << static_cast<int>(reg);
 }
diff --git a/runtime/oat/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h
similarity index 98%
rename from runtime/oat/utils/x86/assembler_x86.h
rename to compiler/utils/x86/assembler_x86.h
index e0fbe0e..4ba03d1 100644
--- a/runtime/oat/utils/x86/assembler_x86.h
+++ b/compiler/utils/x86/assembler_x86.h
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
-#define ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
+#ifndef ART_COMPILER_UTILS_X86_ASSEMBLER_X86_H_
+#define ART_COMPILER_UTILS_X86_ASSEMBLER_X86_H_
 
 #include <vector>
 #include "base/macros.h"
 #include "constants_x86.h"
 #include "globals.h"
 #include "managed_register_x86.h"
-#include "oat/utils/assembler.h"
 #include "offsets.h"
+#include "utils/assembler.h"
 #include "utils.h"
 
 namespace art {
@@ -643,4 +643,4 @@
 }  // namespace x86
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
+#endif  // ART_COMPILER_UTILS_X86_ASSEMBLER_X86_H_
diff --git a/runtime/oat/utils/x86/assembler_x86_test.cc b/compiler/utils/x86/assembler_x86_test.cc
similarity index 100%
rename from runtime/oat/utils/x86/assembler_x86_test.cc
rename to compiler/utils/x86/assembler_x86_test.cc
diff --git a/runtime/constants_x86.h b/compiler/utils/x86/constants_x86.h
similarity index 86%
rename from runtime/constants_x86.h
rename to compiler/utils/x86/constants_x86.h
index bb18b6b..45c3834 100644
--- a/runtime/constants_x86.h
+++ b/compiler/utils/x86/constants_x86.h
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_CONSTANTS_X86_H_
-#define ART_RUNTIME_CONSTANTS_X86_H_
+#ifndef ART_COMPILER_UTILS_X86_CONSTANTS_X86_H_
+#define ART_COMPILER_UTILS_X86_CONSTANTS_X86_H_
 
 #include <iosfwd>
 
+#include "arch/x86/registers_x86.h"
 #include "base/logging.h"
 #include "base/macros.h"
 #include "globals.h"
@@ -26,21 +27,6 @@
 namespace art {
 namespace x86 {
 
-enum Register {
-  EAX = 0,
-  ECX = 1,
-  EDX = 2,
-  EBX = 3,
-  ESP = 4,
-  EBP = 5,
-  ESI = 6,
-  EDI = 7,
-  kNumberOfCpuRegisters = 8,
-  kFirstByteUnsafeRegister = 4,
-  kNoRegister = -1  // Signals an illegal register.
-};
-std::ostream& operator<<(std::ostream& os, const Register& rhs);
-
 enum ByteRegister {
   AL = 0,
   CL = 1,
@@ -137,4 +123,4 @@
 }  // namespace x86
 }  // namespace art
 
-#endif  // ART_RUNTIME_CONSTANTS_X86_H_
+#endif  // ART_COMPILER_UTILS_X86_CONSTANTS_X86_H_
diff --git a/runtime/oat/utils/x86/managed_register_x86.cc b/compiler/utils/x86/managed_register_x86.cc
similarity index 100%
rename from runtime/oat/utils/x86/managed_register_x86.cc
rename to compiler/utils/x86/managed_register_x86.cc
diff --git a/runtime/oat/utils/x86/managed_register_x86.h b/compiler/utils/x86/managed_register_x86.h
similarity index 96%
rename from runtime/oat/utils/x86/managed_register_x86.h
rename to compiler/utils/x86/managed_register_x86.h
index b564a83..0201a96 100644
--- a/runtime/oat/utils/x86/managed_register_x86.h
+++ b/compiler/utils/x86/managed_register_x86.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
-#define ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
+#ifndef ART_COMPILER_UTILS_X86_MANAGED_REGISTER_X86_H_
+#define ART_COMPILER_UTILS_X86_MANAGED_REGISTER_X86_H_
 
 #include "constants_x86.h"
-#include "oat/utils/managed_register.h"
+#include "utils/managed_register.h"
 
 namespace art {
 namespace x86 {
@@ -215,4 +215,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
+#endif  // ART_COMPILER_UTILS_X86_MANAGED_REGISTER_X86_H_
diff --git a/runtime/oat/utils/x86/managed_register_x86_test.cc b/compiler/utils/x86/managed_register_x86_test.cc
similarity index 100%
rename from runtime/oat/utils/x86/managed_register_x86_test.cc
rename to compiler/utils/x86/managed_register_x86_test.cc
diff --git a/runtime/Android.mk b/runtime/Android.mk
index 4638e78..8867d40 100644
--- a/runtime/Android.mk
+++ b/runtime/Android.mk
@@ -111,13 +111,6 @@
 	native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
 	native/sun_misc_Unsafe.cc \
 	oat.cc \
-	oat/utils/arm/assembler_arm.cc \
-	oat/utils/arm/managed_register_arm.cc \
-	oat/utils/assembler.cc \
-	oat/utils/mips/assembler_mips.cc \
-	oat/utils/mips/managed_register_mips.cc \
-	oat/utils/x86/assembler_x86.cc \
-	oat/utils/x86/managed_register_x86.cc \
 	oat_file.cc \
 	offsets.cc \
 	os_linux.cc \
@@ -147,23 +140,26 @@
 	zip_archive.cc
 
 LIBART_COMMON_SRC_FILES += \
-	oat/runtime/context.cc \
-	oat/runtime/support_alloc.cc \
-	oat/runtime/support_cast.cc \
-	oat/runtime/support_deoptimize.cc \
-	oat/runtime/support_dexcache.cc \
-	oat/runtime/support_field.cc \
-	oat/runtime/support_fillarray.cc \
-	oat/runtime/support_instrumentation.cc \
-	oat/runtime/support_invoke.cc \
-	oat/runtime/support_jni.cc \
-	oat/runtime/support_locks.cc \
-	oat/runtime/support_math.cc \
-	oat/runtime/support_proxy.cc \
-	oat/runtime/support_stubs.cc \
-	oat/runtime/support_thread.cc \
-	oat/runtime/support_throw.cc \
-	oat/runtime/support_interpreter.cc
+	arch/context.cc \
+	arch/arm/registers_arm.cc \
+	arch/x86/registers_x86.cc \
+	arch/mips/registers_mips.cc \
+	entrypoints/quick/quick_alloc_entrypoints.cc \
+	entrypoints/quick/quick_cast_entrypoints.cc \
+	entrypoints/quick/quick_deoptimization_entrypoints.cc \
+	entrypoints/quick/quick_dexcache_entrypoints.cc \
+	entrypoints/quick/quick_field_entrypoints.cc \
+	entrypoints/quick/quick_fillarray_entrypoints.cc \
+	entrypoints/quick/quick_instrumentation_entrypoints.cc \
+	entrypoints/quick/quick_interpreter_entrypoints.cc \
+	entrypoints/quick/quick_invoke_entrypoints.cc \
+	entrypoints/quick/quick_jni_entrypoints.cc \
+	entrypoints/quick/quick_lock_entrypoints.cc \
+	entrypoints/quick/quick_math_entrypoints.cc \
+	entrypoints/quick/quick_proxy_entrypoints.cc \
+	entrypoints/quick/quick_stub_entrypoints.cc \
+	entrypoints/quick/quick_thread_entrypoints.cc \
+	entrypoints/quick/quick_throw_entrypoints.cc
 
 LIBART_TARGET_SRC_FILES := \
 	$(LIBART_COMMON_SRC_FILES) \
@@ -175,21 +171,21 @@
 
 ifeq ($(TARGET_ARCH),arm)
 LIBART_TARGET_SRC_FILES += \
-	oat/runtime/arm/context_arm.cc.arm \
-	oat/runtime/arm/oat_support_entrypoints_arm.cc \
-	oat/runtime/arm/runtime_support_arm.S
+	arch/arm/context_arm.cc.arm \
+	arch/arm/quick_entrypoints_arm.S \
+	arch/arm/quick_entrypoints_init_arm.cc
 else # TARGET_ARCH != arm
 ifeq ($(TARGET_ARCH),x86)
 LIBART_TARGET_SRC_FILES += \
-	oat/runtime/x86/context_x86.cc \
-	oat/runtime/x86/oat_support_entrypoints_x86.cc \
-	oat/runtime/x86/runtime_support_x86.S
+	arch/x86/context_x86.cc \
+	arch/x86/quick_entrypoints_init_x86.cc \
+	arch/x86/quick_entrypoints_x86.S
 else # TARGET_ARCH != x86
 ifeq ($(TARGET_ARCH),mips)
 LIBART_TARGET_SRC_FILES += \
-	oat/runtime/mips/context_mips.cc \
-	oat/runtime/mips/oat_support_entrypoints_mips.cc \
-	oat/runtime/mips/runtime_support_mips.S
+	arch/mips/context_mips.cc \
+	arch/mips/quick_entrypoints_init_mips.cc \
+	arch/mips/quick_entrypoints_mips.S
 else # TARGET_ARCH != mips
 $(error unsupported TARGET_ARCH=$(TARGET_ARCH))
 endif # TARGET_ARCH != mips
@@ -219,9 +215,9 @@
 
 ifeq ($(HOST_ARCH),x86)
 LIBART_HOST_SRC_FILES += \
-	oat/runtime/x86/context_x86.cc \
-	oat/runtime/x86/oat_support_entrypoints_x86.cc \
-	oat/runtime/x86/runtime_support_x86.S
+	arch/x86/context_x86.cc \
+	arch/x86/quick_entrypoints_init_x86.cc \
+	arch/x86/quick_entrypoints_x86.S
 else # HOST_ARCH != x86
 $(error unsupported HOST_ARCH=$(HOST_ARCH))
 endif # HOST_ARCH != x86
diff --git a/runtime/oat/runtime/arm/context_arm.cc b/runtime/arch/arm/context_arm.cc
similarity index 100%
rename from runtime/oat/runtime/arm/context_arm.cc
rename to runtime/arch/arm/context_arm.cc
diff --git a/runtime/oat/runtime/arm/context_arm.h b/runtime/arch/arm/context_arm.h
similarity index 84%
rename from runtime/oat/runtime/arm/context_arm.h
rename to runtime/arch/arm/context_arm.h
index 0be85e3..00651ff 100644
--- a/runtime/oat/runtime/arm/context_arm.h
+++ b/runtime/arch/arm/context_arm.h
@@ -14,12 +14,13 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
-#define ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
+#ifndef ART_RUNTIME_ARCH_ARM_CONTEXT_ARM_H_
+#define ART_RUNTIME_ARCH_ARM_CONTEXT_ARM_H_
 
 #include "locks.h"
-#include "constants_arm.h"
-#include "oat/runtime/context.h"
+#include "arch/context.h"
+#include "base/logging.h"
+#include "registers_arm.h"
 
 namespace art {
 namespace arm {
@@ -45,7 +46,7 @@
   }
 
   virtual uintptr_t GetGPR(uint32_t reg) {
-    CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
+    DCHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
     return *gprs_[reg];
   }
 
@@ -64,4 +65,4 @@
 }  // namespace arm
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
+#endif  // ART_RUNTIME_ARCH_ARM_CONTEXT_ARM_H_
diff --git a/runtime/oat/runtime/arm/runtime_support_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S
similarity index 100%
rename from runtime/oat/runtime/arm/runtime_support_arm.S
rename to runtime/arch/arm/quick_entrypoints_arm.S
diff --git a/runtime/oat/runtime/arm/oat_support_entrypoints_arm.cc b/runtime/arch/arm/quick_entrypoints_init_arm.cc
similarity index 98%
rename from runtime/oat/runtime/arm/oat_support_entrypoints_arm.cc
rename to runtime/arch/arm/quick_entrypoints_init_arm.cc
index 2e9453c..2f66b36 100644
--- a/runtime/oat/runtime/arm/oat_support_entrypoints_arm.cc
+++ b/runtime/arch/arm/quick_entrypoints_init_arm.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "runtime_support.h"
 
 namespace art {
@@ -130,7 +130,7 @@
 extern "C" void art_quick_throw_null_pointer_exception_from_code();
 extern "C" void art_quick_throw_stack_overflow_from_code(void*);
 
-void InitEntryPoints(EntryPoints* points) {
+void InitEntryPoints(QuickEntryPoints* points) {
   // Alloc
   points->pAllocArrayFromCode = art_quick_alloc_array_from_code;
   points->pAllocArrayFromCodeWithAccessCheck = art_quick_alloc_array_from_code_with_access_check;
diff --git a/runtime/arch/arm/registers_arm.cc b/runtime/arch/arm/registers_arm.cc
new file mode 100644
index 0000000..4f04647
--- /dev/null
+++ b/runtime/arch/arm/registers_arm.cc
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "registers_arm.h"
+
+#include <ostream>
+
+namespace art {
+namespace arm {
+
+static const char* kRegisterNames[] = {
+  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+  "fp", "ip", "sp", "lr", "pc"
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs) {
+  if (rhs >= R0 && rhs <= PC) {
+    os << kRegisterNames[rhs];
+  } else {
+    os << "Register[" << static_cast<int>(rhs) << "]";
+  }
+  return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const SRegister& rhs) {
+  if (rhs >= S0 && rhs < kNumberOfSRegisters) {
+    os << "s" << static_cast<int>(rhs);
+  } else {
+    os << "SRegister[" << static_cast<int>(rhs) << "]";
+  }
+  return os;
+}
+
+}  // namespace arm
+}  // namespace art
diff --git a/runtime/arch/arm/registers_arm.h b/runtime/arch/arm/registers_arm.h
new file mode 100644
index 0000000..932095d
--- /dev/null
+++ b/runtime/arch/arm/registers_arm.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
+#define ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
+
+#include <iosfwd>
+
+namespace art {
+namespace arm {
+
+// Values for registers.
+enum Register {
+  R0  =  0,
+  R1  =  1,
+  R2  =  2,
+  R3  =  3,
+  R4  =  4,
+  R5  =  5,
+  R6  =  6,
+  R7  =  7,
+  R8  =  8,
+  R9  =  9,
+  R10 = 10,
+  R11 = 11,
+  R12 = 12,
+  R13 = 13,
+  R14 = 14,
+  R15 = 15,
+  TR  = 9,  // thread register
+  FP  = 11,
+  IP  = 12,
+  SP  = 13,
+  LR  = 14,
+  PC  = 15,
+  kNumberOfCoreRegisters = 16,
+  kNoRegister = -1,
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs);
+
+
+// Values for single-precision floating point registers.
+enum SRegister {
+  S0  =  0,
+  S1  =  1,
+  S2  =  2,
+  S3  =  3,
+  S4  =  4,
+  S5  =  5,
+  S6  =  6,
+  S7  =  7,
+  S8  =  8,
+  S9  =  9,
+  S10 = 10,
+  S11 = 11,
+  S12 = 12,
+  S13 = 13,
+  S14 = 14,
+  S15 = 15,
+  S16 = 16,
+  S17 = 17,
+  S18 = 18,
+  S19 = 19,
+  S20 = 20,
+  S21 = 21,
+  S22 = 22,
+  S23 = 23,
+  S24 = 24,
+  S25 = 25,
+  S26 = 26,
+  S27 = 27,
+  S28 = 28,
+  S29 = 29,
+  S30 = 30,
+  S31 = 31,
+  kNumberOfSRegisters = 32,
+  kNoSRegister = -1,
+};
+std::ostream& operator<<(std::ostream& os, const SRegister& rhs);
+
+}  // namespace arm
+}  // namespace art
+
+#endif  // ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
diff --git a/runtime/oat/runtime/context.cc b/runtime/arch/context.cc
similarity index 100%
rename from runtime/oat/runtime/context.cc
rename to runtime/arch/context.cc
diff --git a/runtime/oat/runtime/context.h b/runtime/arch/context.h
similarity index 93%
rename from runtime/oat/runtime/context.h
rename to runtime/arch/context.h
index ac43e9a..91e0cd6 100644
--- a/runtime/oat/runtime/context.h
+++ b/runtime/arch/context.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
-#define ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
+#ifndef ART_RUNTIME_ARCH_CONTEXT_H_
+#define ART_RUNTIME_ARCH_CONTEXT_H_
 
 #include <stddef.h>
 #include <stdint.h>
@@ -67,4 +67,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
+#endif  // ART_RUNTIME_ARCH_CONTEXT_H_
diff --git a/runtime/oat/runtime/mips/context_mips.cc b/runtime/arch/mips/context_mips.cc
similarity index 100%
rename from runtime/oat/runtime/mips/context_mips.cc
rename to runtime/arch/mips/context_mips.cc
diff --git a/runtime/oat/runtime/mips/context_mips.h b/runtime/arch/mips/context_mips.h
similarity index 87%
rename from runtime/oat/runtime/mips/context_mips.h
rename to runtime/arch/mips/context_mips.h
index f27124c..5595f86 100644
--- a/runtime/oat/runtime/mips/context_mips.h
+++ b/runtime/arch/mips/context_mips.h
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
-#define ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
+#ifndef ART_RUNTIME_ARCH_MIPS_CONTEXT_MIPS_H_
+#define ART_RUNTIME_ARCH_MIPS_CONTEXT_MIPS_H_
 
-#include "constants_mips.h"
-#include "oat/runtime/context.h"
+#include "arch/context.h"
+#include "base/logging.h"
+#include "registers_mips.h"
 
 namespace art {
 namespace mips {
@@ -61,4 +62,4 @@
 }  // namespace mips
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
+#endif  // ART_RUNTIME_ARCH_MIPS_CONTEXT_MIPS_H_
diff --git a/runtime/oat/runtime/mips/oat_support_entrypoints_mips.cc b/runtime/arch/mips/quick_entrypoints_init_mips.cc
similarity index 98%
rename from runtime/oat/runtime/mips/oat_support_entrypoints_mips.cc
rename to runtime/arch/mips/quick_entrypoints_init_mips.cc
index 8e06611..d494c65 100644
--- a/runtime/oat/runtime/mips/oat_support_entrypoints_mips.cc
+++ b/runtime/arch/mips/quick_entrypoints_init_mips.cc
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "runtime_support.h"
-#include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
 
@@ -132,7 +132,7 @@
 extern "C" void art_quick_throw_null_pointer_exception_from_code();
 extern "C" void art_quick_throw_stack_overflow_from_code(void*);
 
-void InitEntryPoints(EntryPoints* points) {
+void InitEntryPoints(QuickEntryPoints* points) {
   // Alloc
   points->pAllocArrayFromCode = art_quick_alloc_array_from_code;
   points->pAllocArrayFromCodeWithAccessCheck = art_quick_alloc_array_from_code_with_access_check;
diff --git a/runtime/oat/runtime/mips/runtime_support_mips.S b/runtime/arch/mips/quick_entrypoints_mips.S
similarity index 100%
rename from runtime/oat/runtime/mips/runtime_support_mips.S
rename to runtime/arch/mips/quick_entrypoints_mips.S
diff --git a/runtime/arch/mips/registers_mips.cc b/runtime/arch/mips/registers_mips.cc
new file mode 100644
index 0000000..5d31f2f
--- /dev/null
+++ b/runtime/arch/mips/registers_mips.cc
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "registers_mips.h"
+
+#include <ostream>
+
+namespace art {
+namespace mips {
+
+static const char* kRegisterNames[] = {
+  "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
+  "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
+  "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+  "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra",
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs) {
+  if (rhs >= ZERO && rhs <= RA) {
+    os << kRegisterNames[rhs];
+  } else {
+    os << "Register[" << static_cast<int>(rhs) << "]";
+  }
+  return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const FRegister& rhs) {
+  if (rhs >= F0 && rhs < kNumberOfFRegisters) {
+    os << "f" << static_cast<int>(rhs);
+  } else {
+    os << "FRegister[" << static_cast<int>(rhs) << "]";
+  }
+  return os;
+}
+
+}  // namespace mips
+}  // namespace art
diff --git a/runtime/arch/mips/registers_mips.h b/runtime/arch/mips/registers_mips.h
new file mode 100644
index 0000000..0f784ed
--- /dev/null
+++ b/runtime/arch/mips/registers_mips.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_RUNTIME_ARCH_MIPS_REGISTERS_MIPS_H_
+#define ART_RUNTIME_ARCH_MIPS_REGISTERS_MIPS_H_
+
+#include <iosfwd>
+
+#include "base/logging.h"
+#include "base/macros.h"
+#include "globals.h"
+
+namespace art {
+namespace mips {
+
+enum Register {
+  ZERO =  0,
+  AT   =  1,  // Assembler temporary.
+  V0   =  2,  // Values.
+  V1   =  3,
+  A0   =  4,  // Arguments.
+  A1   =  5,
+  A2   =  6,
+  A3   =  7,
+  T0   =  8,  // Temporaries.
+  T1   =  9,
+  T2   = 10,
+  T3   = 11,
+  T4   = 12,
+  T5   = 13,
+  T6   = 14,
+  T7   = 15,
+  S0   = 16,  // Saved values.
+  S1   = 17,
+  S2   = 18,
+  S3   = 19,
+  S4   = 20,
+  S5   = 21,
+  S6   = 22,
+  S7   = 23,
+  T8   = 24,  // More temporaries.
+  T9   = 25,
+  K0   = 26,  // Reserved for trap handler.
+  K1   = 27,
+  GP   = 28,  // Global pointer.
+  SP   = 29,  // Stack pointer.
+  FP   = 30,  // Saved value/frame pointer.
+  RA   = 31,  // Return address.
+  kNumberOfCoreRegisters = 32,
+  kNoRegister = -1  // Signals an illegal register.
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs);
+
+// Values for single-precision floating point registers.
+enum FRegister {
+  F0  =  0,
+  F1  =  1,
+  F2  =  2,
+  F3  =  3,
+  F4  =  4,
+  F5  =  5,
+  F6  =  6,
+  F7  =  7,
+  F8  =  8,
+  F9  =  9,
+  F10 = 10,
+  F11 = 11,
+  F12 = 12,
+  F13 = 13,
+  F14 = 14,
+  F15 = 15,
+  F16 = 16,
+  F17 = 17,
+  F18 = 18,
+  F19 = 19,
+  F20 = 20,
+  F21 = 21,
+  F22 = 22,
+  F23 = 23,
+  F24 = 24,
+  F25 = 25,
+  F26 = 26,
+  F27 = 27,
+  F28 = 28,
+  F29 = 29,
+  F30 = 30,
+  F31 = 31,
+  kNumberOfFRegisters = 32,
+  kNoFRegister = -1,
+};
+std::ostream& operator<<(std::ostream& os, const FRegister& rhs);
+
+}  // namespace mips
+}  // namespace art
+
+#endif  // ART_RUNTIME_ARCH_MIPS_REGISTERS_MIPS_H_
diff --git a/runtime/oat/runtime/x86/context_x86.cc b/runtime/arch/x86/context_x86.cc
similarity index 100%
rename from runtime/oat/runtime/x86/context_x86.cc
rename to runtime/arch/x86/context_x86.cc
diff --git a/runtime/oat/runtime/x86/context_x86.h b/runtime/arch/x86/context_x86.h
similarity index 84%
rename from runtime/oat/runtime/x86/context_x86.h
rename to runtime/arch/x86/context_x86.h
index 4ecfc51..d7d2210 100644
--- a/runtime/oat/runtime/x86/context_x86.h
+++ b/runtime/arch/x86/context_x86.h
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
-#define ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
+#ifndef ART_RUNTIME_ARCH_X86_CONTEXT_X86_H_
+#define ART_RUNTIME_ARCH_X86_CONTEXT_X86_H_
 
-#include "constants_x86.h"
-#include "oat/runtime/context.h"
+#include "arch/context.h"
+#include "base/logging.h"
+#include "registers_x86.h"
 
 namespace art {
 namespace x86 {
@@ -43,7 +44,8 @@
   }
 
   virtual uintptr_t GetGPR(uint32_t reg) {
-    CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCpuRegisters));
+    const uint32_t kNumberOfCpuRegisters = 8;
+    DCHECK_LT(reg, kNumberOfCpuRegisters);
     return *gprs_[reg];
   }
 
@@ -64,4 +66,4 @@
 }  // namespace x86
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
+#endif  // ART_RUNTIME_ARCH_X86_CONTEXT_X86_H_
diff --git a/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc b/runtime/arch/x86/quick_entrypoints_init_x86.cc
similarity index 98%
rename from runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
rename to runtime/arch/x86/quick_entrypoints_init_x86.cc
index 7dfb07c..cced916 100644
--- a/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
+++ b/runtime/arch/x86/quick_entrypoints_init_x86.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "runtime_support.h"
 
 namespace art {
@@ -115,7 +115,7 @@
 extern "C" void art_quick_throw_null_pointer_exception_from_code();
 extern "C" void art_quick_throw_stack_overflow_from_code(void*);
 
-void InitEntryPoints(EntryPoints* points) {
+void InitEntryPoints(QuickEntryPoints* points) {
   // Alloc
   points->pAllocArrayFromCode = art_quick_alloc_array_from_code;
   points->pAllocArrayFromCodeWithAccessCheck = art_quick_alloc_array_from_code_with_access_check;
diff --git a/runtime/oat/runtime/x86/runtime_support_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
similarity index 100%
rename from runtime/oat/runtime/x86/runtime_support_x86.S
rename to runtime/arch/x86/quick_entrypoints_x86.S
diff --git a/runtime/arch/x86/registers_x86.cc b/runtime/arch/x86/registers_x86.cc
new file mode 100644
index 0000000..4255d64
--- /dev/null
+++ b/runtime/arch/x86/registers_x86.cc
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "registers_x86.h"
+
+#include <ostream>
+
+namespace art {
+namespace x86 {
+
+static const char* kRegisterNames[] = {
+  "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs) {
+  if (rhs >= EAX && rhs <= EDI) {
+    os << kRegisterNames[rhs];
+  } else {
+    os << "Register[" << static_cast<int>(rhs) << "]";
+  }
+  return os;
+}
+
+}  // namespace x86
+}  // namespace art
diff --git a/runtime/arch/x86/registers_x86.h b/runtime/arch/x86/registers_x86.h
new file mode 100644
index 0000000..23027ed
--- /dev/null
+++ b/runtime/arch/x86/registers_x86.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_RUNTIME_ARCH_X86_REGISTERS_X86_H_
+#define ART_RUNTIME_ARCH_X86_REGISTERS_X86_H_
+
+#include <iosfwd>
+
+#include "base/logging.h"
+#include "base/macros.h"
+#include "globals.h"
+
+namespace art {
+namespace x86 {
+
+enum Register {
+  EAX = 0,
+  ECX = 1,
+  EDX = 2,
+  EBX = 3,
+  ESP = 4,
+  EBP = 5,
+  ESI = 6,
+  EDI = 7,
+  kNumberOfCpuRegisters = 8,
+  kFirstByteUnsafeRegister = 4,
+  kNoRegister = -1  // Signals an illegal register.
+};
+std::ostream& operator<<(std::ostream& os, const Register& rhs);
+
+}  // namespace x86
+}  // namespace art
+
+#endif  // ART_RUNTIME_ARCH_X86_REGISTERS_X86_H_
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 7ebd6a3..3591a50 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -20,6 +20,7 @@
 
 #include <set>
 
+#include "arch/context.h"
 #include "class_linker.h"
 #include "class_linker-inl.h"
 #include "dex_file-inl.h"
@@ -37,7 +38,6 @@
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "mirror/throwable.h"
-#include "oat/runtime/context.h"
 #include "object_utils.h"
 #include "safe_map.h"
 #include "scoped_thread_state_change.h"
diff --git a/runtime/oat/runtime/callee_save_frame.h b/runtime/entrypoints/quick/callee_save_frame.h
similarity index 87%
rename from runtime/oat/runtime/callee_save_frame.h
rename to runtime/entrypoints/quick/callee_save_frame.h
index 59f46ac..0cb578d 100644
--- a/runtime/oat/runtime/callee_save_frame.h
+++ b/runtime/entrypoints/quick/callee_save_frame.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
-#define ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
+#ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_CALLEE_SAVE_FRAME_H_
+#define ART_RUNTIME_ENTRYPOINTS_QUICK_CALLEE_SAVE_FRAME_H_
 
 #include "base/mutex.h"
 #include "thread-inl.h"
@@ -38,4 +38,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
+#endif  // ART_RUNTIME_ENTRYPOINTS_QUICK_CALLEE_SAVE_FRAME_H_
diff --git a/runtime/oat/runtime/support_alloc.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_alloc.cc
rename to runtime/entrypoints/quick/quick_alloc_entrypoints.cc
diff --git a/runtime/oat/runtime/argument_visitor.h b/runtime/entrypoints/quick/quick_argument_visitor.h
similarity index 97%
rename from runtime/oat/runtime/argument_visitor.h
rename to runtime/entrypoints/quick/quick_argument_visitor.h
index aaf93f7..4f81151 100644
--- a/runtime/oat/runtime/argument_visitor.h
+++ b/runtime/entrypoints/quick/quick_argument_visitor.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
-#define ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
+#ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ARGUMENT_VISITOR_H_
+#define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ARGUMENT_VISITOR_H_
 
 #include "object_utils.h"
 
@@ -245,4 +245,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
+#endif  // ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ARGUMENT_VISITOR_H_
diff --git a/runtime/oat/runtime/support_cast.cc b/runtime/entrypoints/quick/quick_cast_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_cast.cc
rename to runtime/entrypoints/quick/quick_cast_entrypoints.cc
diff --git a/runtime/oat/runtime/support_deoptimize.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_deoptimize.cc
rename to runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
diff --git a/runtime/oat/runtime/support_dexcache.cc b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_dexcache.cc
rename to runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
diff --git a/runtime/oat/runtime/oat_support_entrypoints.h b/runtime/entrypoints/quick/quick_entrypoints.h
similarity index 92%
rename from runtime/oat/runtime/oat_support_entrypoints.h
rename to runtime/entrypoints/quick/quick_entrypoints.h
index 546ee01..8692e92 100644
--- a/runtime/oat/runtime/oat_support_entrypoints.h
+++ b/runtime/entrypoints/quick/quick_entrypoints.h
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
-#define ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
+#ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_H_
+#define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_H_
 
 #include "dex_file-inl.h"
 #include "runtime.h"
 
 #define ENTRYPOINT_OFFSET(x) \
     (static_cast<uintptr_t>(OFFSETOF_MEMBER(Thread, entrypoints_)) + \
-        static_cast<uintptr_t>(OFFSETOF_MEMBER(EntryPoints, x)))
+        static_cast<uintptr_t>(OFFSETOF_MEMBER(QuickEntryPoints, x)))
 
 namespace art {
 namespace mirror {
@@ -35,7 +35,8 @@
 class ShadowFrame;
 class Thread;
 
-struct PACKED(4) EntryPoints {
+// Pointers to functions that are called by quick compiler generated code via thread-local storage.
+struct PACKED(4) QuickEntryPoints {
   // Alloc
   void* (*pAllocArrayFromCode)(uint32_t, void*, int32_t);
   void* (*pAllocArrayFromCodeWithAccessCheck)(uint32_t, void*, int32_t);
@@ -166,12 +167,9 @@
                                                              jobject locked, Thread* self)
     SHARED_LOCK_FUNCTION(Locks::mutator_lock_) HOT_ATTR;
 
-// Initialize an entry point data structure.
-void InitEntryPoints(EntryPoints* points);
-
-// Change the debugger entry point in the data structure.
-void ChangeDebuggerEntryPoint(EntryPoints* points, bool enabled);
+// Initialize an entry point data structure, architecture specific.
+void InitEntryPoints(QuickEntryPoints* points);
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
+#endif  // ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_H_
diff --git a/runtime/oat/runtime/support_field.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_field.cc
rename to runtime/entrypoints/quick/quick_field_entrypoints.cc
diff --git a/runtime/oat/runtime/support_fillarray.cc b/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_fillarray.cc
rename to runtime/entrypoints/quick/quick_fillarray_entrypoints.cc
diff --git a/runtime/oat/runtime/support_instrumentation.cc b/runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_instrumentation.cc
rename to runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc
diff --git a/runtime/oat/runtime/support_interpreter.cc b/runtime/entrypoints/quick/quick_interpreter_entrypoints.cc
similarity index 98%
rename from runtime/oat/runtime/support_interpreter.cc
rename to runtime/entrypoints/quick/quick_interpreter_entrypoints.cc
index 78b7e10..656df8d 100644
--- a/runtime/oat/runtime/support_interpreter.cc
+++ b/runtime/entrypoints/quick/quick_interpreter_entrypoints.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "argument_visitor.h"
+#include "quick_argument_visitor.h"
 #include "callee_save_frame.h"
 #include "dex_file-inl.h"
 #include "interpreter/interpreter.h"
diff --git a/runtime/oat/runtime/support_invoke.cc b/runtime/entrypoints/quick/quick_invoke_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_invoke.cc
rename to runtime/entrypoints/quick/quick_invoke_entrypoints.cc
diff --git a/runtime/oat/runtime/support_jni.cc b/runtime/entrypoints/quick/quick_jni_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_jni.cc
rename to runtime/entrypoints/quick/quick_jni_entrypoints.cc
diff --git a/runtime/oat/runtime/support_locks.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_locks.cc
rename to runtime/entrypoints/quick/quick_lock_entrypoints.cc
diff --git a/runtime/oat/runtime/support_math.cc b/runtime/entrypoints/quick/quick_math_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_math.cc
rename to runtime/entrypoints/quick/quick_math_entrypoints.cc
diff --git a/runtime/oat/runtime/support_proxy.cc b/runtime/entrypoints/quick/quick_proxy_entrypoints.cc
similarity index 98%
rename from runtime/oat/runtime/support_proxy.cc
rename to runtime/entrypoints/quick/quick_proxy_entrypoints.cc
index d4d0ca1..e4ef45f 100644
--- a/runtime/oat/runtime/support_proxy.cc
+++ b/runtime/entrypoints/quick/quick_proxy_entrypoints.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "argument_visitor.h"
+#include "quick_argument_visitor.h"
 #include "dex_file-inl.h"
 #include "mirror/abstract_method-inl.h"
 #include "mirror/object_array-inl.h"
diff --git a/runtime/oat/runtime/support_stubs.cc b/runtime/entrypoints/quick/quick_stub_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_stubs.cc
rename to runtime/entrypoints/quick/quick_stub_entrypoints.cc
diff --git a/runtime/oat/runtime/support_thread.cc b/runtime/entrypoints/quick/quick_thread_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_thread.cc
rename to runtime/entrypoints/quick/quick_thread_entrypoints.cc
diff --git a/runtime/oat/runtime/support_throw.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
similarity index 100%
rename from runtime/oat/runtime/support_throw.cc
rename to runtime/entrypoints/quick/quick_throw_entrypoints.cc
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index e99fbd8..c0b85f4 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -30,7 +30,7 @@
 #include "mirror/object-inl.h"
 #include "nth_caller_visitor.h"
 #if !defined(ART_USE_PORTABLE_COMPILER)
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #endif
 #include "object_utils.h"
 #include "os.h"
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 35667e7..485c636 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -28,11 +28,11 @@
 #include <limits>
 #include <vector>
 
+#include "arch/arm/registers_arm.h"
+#include "arch/mips/registers_mips.h"
+#include "arch/x86/registers_x86.h"
 #include "atomic.h"
 #include "class_linker.h"
-#include "constants_arm.h"
-#include "constants_mips.h"
-#include "constants_x86.h"
 #include "debugger.h"
 #include "gc/accounting/card_table-inl.h"
 #include "gc/heap.h"
diff --git a/runtime/runtime_support_llvm.cc b/runtime/runtime_support_llvm.cc
index 9d83f9e..713bc40 100644
--- a/runtime/runtime_support_llvm.cc
+++ b/runtime/runtime_support_llvm.cc
@@ -33,7 +33,6 @@
 #include "object_utils.h"
 #include "reflection.h"
 #include "runtime_support.h"
-#include "runtime_support_llvm_func_list.h"
 #include "scoped_thread_state_change.h"
 #include "thread.h"
 #include "thread_list.h"
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 286a2a6..aeb15f0 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -16,7 +16,6 @@
 
 #include "stack.h"
 
-#include "oat/runtime/context.h"
 #include "mirror/abstract_method-inl.h"
 #include "mirror/class-inl.h"
 #include "mirror/object.h"
diff --git a/runtime/stack.h b/runtime/stack.h
index 0b94f27..de93846 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -20,7 +20,7 @@
 #include "dex_file.h"
 #include "instrumentation.h"
 #include "base/macros.h"
-#include "oat/runtime/context.h"
+#include "arch/context.h"
 
 #include <stdint.h>
 #include <string>
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 0b3a5b4..ea12c2e 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -30,6 +30,7 @@
 #include <iostream>
 #include <list>
 
+#include "arch/context.h"
 #include "base/mutex.h"
 #include "class_linker.h"
 #include "class_linker-inl.h"
@@ -50,7 +51,6 @@
 #include "mirror/object_array-inl.h"
 #include "mirror/stack_trace_element.h"
 #include "monitor.h"
-#include "oat/runtime/context.h"
 #include "object_utils.h"
 #include "reflection.h"
 #include "runtime.h"
@@ -1686,7 +1686,7 @@
 #undef DO_THREAD_OFFSET
 
   size_t entry_point_count = arraysize(gThreadEntryPointInfo);
-  CHECK_EQ(entry_point_count * size_of_pointers, sizeof(EntryPoints));
+  CHECK_EQ(entry_point_count * size_of_pointers, sizeof(QuickEntryPoints));
   uint32_t expected_offset = OFFSETOF_MEMBER(Thread, entrypoints_);
   for (size_t i = 0; i < entry_point_count; ++i) {
     CHECK_EQ(gThreadEntryPointInfo[i].offset, expected_offset) << gThreadEntryPointInfo[i].name;
diff --git a/runtime/thread.h b/runtime/thread.h
index b9393a3..d02ab36 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -28,7 +28,7 @@
 #include "base/macros.h"
 #include "globals.h"
 #include "jvalue.h"
-#include "oat/runtime/oat_support_entrypoints.h"
+#include "entrypoints/quick/quick_entrypoints.h"
 #include "locks.h"
 #include "offsets.h"
 #include "root_visitor.h"
@@ -775,7 +775,7 @@
  public:
   // Runtime support function pointers
   // TODO: move this near the top, since changing its offset requires all oats to be recompiled!
-  EntryPoints entrypoints_;
+  QuickEntryPoints entrypoints_;
 
  private:
   // How many times has our pthread key's destructor been called?
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 177fd48..2bce70f 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -29,14 +29,14 @@
 #include "mirror/dex_cache.h"
 #include "mirror/object_array-inl.h"
 #include "mirror/object-inl.h"
-#if !defined(ART_USE_PORTABLE_COMPILER)
-#include "oat/runtime/oat_support_entrypoints.h"
-#endif
 #include "object_utils.h"
 #include "os.h"
 #include "scoped_thread_state_change.h"
 #include "thread.h"
 #include "thread_list.h"
+#if !defined(ART_USE_PORTABLE_COMPILER)
+#include "entrypoints/quick/quick_entrypoints.h"
+#endif
 
 namespace art {