Add basic assembler interface and an x86 backend.

Change-Id: Ia8136bad88f1194c8a247e2af80e486ab88c1e8c
diff --git a/src/casts.h b/src/casts.h
new file mode 100644
index 0000000..f9f3c6b
--- /dev/null
+++ b/src/casts.h
@@ -0,0 +1,24 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
+#ifndef ART_SRC_CASTS_H_
+#define ART_SRC_CASTS_H_
+
+#include <string.h>
+#include "src/macros.h"
+
+namespace android {
+namespace runtime {
+
+template <class Dest, class Source>
+inline Dest bit_cast(const Source& source) {
+  // Compile time assertion: sizeof(Dest) == sizeof(Source)
+  // A compile error here means your Dest and Source have different sizes.
+  COMPILE_ASSERT(sizeof(Dest) == sizeof(Source), verify_sizes_are_equal);
+  Dest dest;
+  memcpy(&dest, &source, sizeof(dest));
+  return dest;
+}
+
+} }  // namespace android::runtime
+
+#endif  // ART_SRC_CASTS_H_