vctsxs, vctuxs.

This commit is contained in:
Ben Vanik
2014-01-09 21:20:03 -08:00
parent 478781e0dc
commit 2980a30f30
5 changed files with 90 additions and 19 deletions

View File

@@ -744,11 +744,11 @@ Value* HIRBuilder::VectorConvertI2F(Value* value, uint32_t arithmetic_flags) {
return i->dest;
}
Value* HIRBuilder::VectorConvertF2I(Value* value, RoundMode round_mode) {
Value* HIRBuilder::VectorConvertF2I(Value* value, uint32_t arithmetic_flags) {
ASSERT_VECTOR_TYPE(value);
Instr* i = AppendInstr(
OPCODE_VECTOR_CONVERT_F2I_info, round_mode,
OPCODE_VECTOR_CONVERT_F2I_info, arithmetic_flags,
AllocValue(value->type));
i->set_src1(value);
i->src2.value = i->src3.value = NULL;

View File

@@ -99,7 +99,7 @@ public:
// It'd be nice if Convert() supported this, however then we'd need a
// VEC128_INT32_TYPE or something.
Value* VectorConvertI2F(Value* value, uint32_t arithmetic_flags = 0);
Value* VectorConvertF2I(Value* value, RoundMode round_mode = ROUND_TO_ZERO);
Value* VectorConvertF2I(Value* value, uint32_t arithmetic_flags = 0);
Value* LoadZero(TypeName type);
Value* LoadConstant(int8_t value);

View File

@@ -50,6 +50,7 @@ enum PrefetchFlags {
enum ArithmeticFlags {
ARITHMETIC_SET_CARRY = (1 << 1),
ARITHMETIC_UNSIGNED = (1 << 2),
ARITHMETIC_SATURATE = (1 << 3),
};
enum Permutes {
PERMUTE_XY_ZW = 0x00010405,