Add V128 type

This commit is contained in:
Andrew Brown
2019-08-14 10:12:38 -07:00
committed by Dan Gohman
parent 290b51a5f6
commit 5bd422b429
5 changed files with 31 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ fn runtime_value(v: Value) -> RuntimeValue {
Value::I64(x) => RuntimeValue::I64(x),
Value::F32(x) => RuntimeValue::F32(x.to_bits()),
Value::F64(x) => RuntimeValue::F64(x.to_bits()),
Value::V128(_) => unimplemented!("SIMD"),
Value::V128(x) => RuntimeValue::V128(x.to_le_bytes()),
}
}
@@ -374,6 +374,15 @@ impl WastContext {
});
}
}
RuntimeValue::V128(_) => {
return Err(WastFileError {
filename: filename.to_string(),
line,
error: WastError::Type(format!(
"unexpected vector type in NaN test"
)),
});
}
};
}
}
@@ -426,6 +435,15 @@ impl WastContext {
});
}
}
RuntimeValue::V128(_) => {
return Err(WastFileError {
filename: filename.to_string(),
line,
error: WastError::Type(format!(
"unexpected vector type in NaN test",
)),
});
}
};
}
}