More WIP architecture fixes (exception_handler/string_util)

This commit is contained in:
Dr. Chat
2017-05-09 22:30:25 -05:00
parent 096a0230c4
commit be962e6de1
2 changed files with 22 additions and 0 deletions

View File

@@ -59,6 +59,9 @@ inline std::string to_hex_string(const vec128_t& value) {
return std::string(buffer);
}
#if XE_ARCH_AMD64
// TODO(DrChat): This should not exist. Force the caller to use vec128.
inline std::string to_hex_string(const __m128& value) {
char buffer[128];
float f[4];
@@ -79,6 +82,8 @@ inline std::string to_string(const __m128& value) {
return std::string(buffer);
}
#endif
template <typename T>
inline T from_string(const char* value, bool force_hex = false);
@@ -182,6 +187,9 @@ inline vec128_t from_string<vec128_t>(const char* value, bool force_hex) {
return v;
}
#if XE_ARCH_AMD64
// TODO(DrChat): ?? Why is this here? Force the caller to use vec128.
template <>
inline __m128 from_string<__m128>(const char* value, bool force_hex) {
__m128 v;
@@ -225,6 +233,8 @@ inline __m128 from_string<__m128>(const char* value, bool force_hex) {
return v;
}
#endif
template <typename T>
inline T from_string(const std::string& value, bool force_hex = false) {
return from_string<T>(value.c_str(), force_hex);