Subzero: Try to fix warnings and errors in the Windows build.
Quiet some unused-variable warnings when their only use is in an assert().
Forward-declare partial template specializations when the template method already has a default implementation, to avoid ODR violations and link errors.
BUG= https://codereview.chromium.org/296053008/
R=wala@chromium.org
Review URL: https://codereview.chromium.org/429993002
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index fb57b75..18f0dde 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -1190,6 +1190,31 @@
virtual ~InstX8632Xchg() {}
};
+// Declare partial template specializations of emit() methods that
+// already have default implementations. Without this, there is the
+// possibility of ODR violations and link errors.
+template <> void InstX8632Addss::emit(const Cfg *Func) const;
+template <> void InstX8632Blendvps::emit(const Cfg *Func) const;
+template <> void InstX8632Div::emit(const Cfg *Func) const;
+template <> void InstX8632Divss::emit(const Cfg *Func) const;
+template <> void InstX8632Idiv::emit(const Cfg *Func) const;
+template <> void InstX8632Imul::emit(const Cfg *Func) const;
+template <> void InstX8632Lea::emit(const Cfg *Func) const;
+template <> void InstX8632Mulss::emit(const Cfg *Func) const;
+template <> void InstX8632Padd::emit(const Cfg *Func) const;
+template <> void InstX8632Pblendvb::emit(const Cfg *Func) const;
+template <> void InstX8632Pcmpeq::emit(const Cfg *Func) const;
+template <> void InstX8632Pcmpgt::emit(const Cfg *Func) const;
+template <> void InstX8632Pextr::emit(const Cfg *Func) const;
+template <> void InstX8632Pinsr::emit(const Cfg *Func) const;
+template <> void InstX8632Pmull::emit(const Cfg *Func) const;
+template <> void InstX8632Pmuludq::emit(const Cfg *Func) const;
+template <> void InstX8632Psll::emit(const Cfg *Func) const;
+template <> void InstX8632Psra::emit(const Cfg *Func) const;
+template <> void InstX8632Psub::emit(const Cfg *Func) const;
+template <> void InstX8632Sqrtss::emit(const Cfg *Func) const;
+template <> void InstX8632Subss::emit(const Cfg *Func) const;
+
} // end of namespace Ice
#endif // SUBZERO_SRC_ICEINSTX8632_H