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

Unified Diff: src/IceTargetLoweringX86.cpp

Issue 1616673004: Merge x86 data and header lowering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Small syntactic commonality. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLoweringX86.cpp
diff --git a/src/IceTargetLoweringX86.cpp b/src/IceTargetLoweringX86.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..79f88a383a603b4a4bd5e6962c7e743a8239b0f0
--- /dev/null
+++ b/src/IceTargetLoweringX86.cpp
@@ -0,0 +1,50 @@
+//===- subzero/src/IceTargetLoweringX86.cpp - x86 lowering -*- C++ -*-==//
Jim Stichnoth 2016/01/22 05:52:10 Add hyphens near the end (and maybe make it a trip
sehr 2016/01/22 07:06:23 Done.
+//
+// The Subzero Code Generator
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// \brief Implements portions of the TargetLoweringX86Base class, and related
+/// classes.
+///
+//===----------------------------------------------------------------------===//
+
+// Choose one namespace, since including this file should not cause the
+// templates to be instantiated. This avoids duplicating the PoolTypeConverter
+// data items, but is ugly as code common to all of x86 is including code
+// specific to one of 32 or 64.
+// TODO(jpp): replace this ugliness with the beauty of extern template.
+
+#define X86NAMESPACE X8632
+#include "IceTargetLoweringX86Base.h"
+#undef X86NAMESPACE
+
+namespace Ice {
+namespace X86 {
+
+const char *PoolTypeConverter<float>::TypeName = "float";
+const char *PoolTypeConverter<float>::AsmTag = ".long";
+const char *PoolTypeConverter<float>::PrintfString = "0x%x";
+
+const char *PoolTypeConverter<double>::TypeName = "double";
+const char *PoolTypeConverter<double>::AsmTag = ".quad";
+const char *PoolTypeConverter<double>::PrintfString = "0x%llx";
+
+const char *PoolTypeConverter<uint32_t>::TypeName = "i32";
+const char *PoolTypeConverter<uint32_t>::AsmTag = ".long";
+const char *PoolTypeConverter<uint32_t>::PrintfString = "0x%x";
+
+const char *PoolTypeConverter<uint16_t>::TypeName = "i16";
+const char *PoolTypeConverter<uint16_t>::AsmTag = ".short";
+const char *PoolTypeConverter<uint16_t>::PrintfString = "0x%x";
+
+const char *PoolTypeConverter<uint8_t>::TypeName = "i8";
+const char *PoolTypeConverter<uint8_t>::AsmTag = ".byte";
+const char *PoolTypeConverter<uint8_t>::PrintfString = "0x%x";
+
+} // end of namespace X86
+} // end of namespace Ice

Powered by Google App Engine
This is Rietveld 408576698