Replacing store vector left/right opcodes by just using permutes.
This commit is contained in:
@@ -781,28 +781,6 @@ Value* FunctionBuilder::Load(
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadVectorLeft(
|
||||
Value* address, TypeName type, uint32_t load_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
Instr* i = AppendInstr(
|
||||
OPCODE_LOAD_VECTOR_LEFT_info, load_flags,
|
||||
AllocValue(type));
|
||||
i->set_src1(address);
|
||||
i->src2.value = i->src3.value = NULL;
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadVectorRight(
|
||||
Value* address, TypeName type, uint32_t load_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
Instr* i = AppendInstr(
|
||||
OPCODE_LOAD_VECTOR_RIGHT_info, load_flags,
|
||||
AllocValue(type));
|
||||
i->set_src1(address);
|
||||
i->src2.value = i->src3.value = NULL;
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadAcquire(
|
||||
Value* address, TypeName type, uint32_t load_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
@@ -834,26 +812,6 @@ Value* FunctionBuilder::StoreRelease(
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
void FunctionBuilder::StoreVectorLeft(
|
||||
Value* address, Value* value, uint32_t store_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
ASSERT_VECTOR_TYPE(value);
|
||||
Instr* i = AppendInstr(OPCODE_STORE_VECTOR_LEFT_info, store_flags);
|
||||
i->set_src1(address);
|
||||
i->set_src2(value);
|
||||
i->src3.value = NULL;
|
||||
}
|
||||
|
||||
void FunctionBuilder::StoreVectorRight(
|
||||
Value* address, Value* value, uint32_t store_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
ASSERT_VECTOR_TYPE(value);
|
||||
Instr* i = AppendInstr(OPCODE_STORE_VECTOR_RIGHT_info, store_flags);
|
||||
i->set_src1(address);
|
||||
i->set_src2(value);
|
||||
i->src3.value = NULL;
|
||||
}
|
||||
|
||||
void FunctionBuilder::Prefetch(
|
||||
Value* address, size_t length, uint32_t prefetch_flags) {
|
||||
ASSERT_ADDRESS_TYPE(address);
|
||||
|
||||
@@ -118,15 +118,8 @@ public:
|
||||
|
||||
Value* Load(Value* address, TypeName type, uint32_t load_flags = 0);
|
||||
Value* LoadAcquire(Value* address, TypeName type, uint32_t load_flags = 0);
|
||||
Value* LoadVectorLeft(Value* address, TypeName type,
|
||||
uint32_t load_flags = 0);
|
||||
Value* LoadVectorRight(Value* address, TypeName type,
|
||||
uint32_t load_flags = 0);
|
||||
void Store(Value* address, Value* value, uint32_t store_flags = 0);
|
||||
Value* StoreRelease(Value* address, Value* value, uint32_t store_flags = 0);
|
||||
void StoreVectorLeft(Value* address, Value* value, uint32_t store_flags = 0);
|
||||
void StoreVectorRight(Value* address, Value* value,
|
||||
uint32_t store_flags = 0);
|
||||
void Prefetch(Value* address, size_t length, uint32_t prefetch_flags = 0);
|
||||
|
||||
Value* Max(Value* value1, Value* value2);
|
||||
|
||||
@@ -105,12 +105,8 @@ enum Opcode {
|
||||
|
||||
OPCODE_LOAD,
|
||||
OPCODE_LOAD_ACQUIRE,
|
||||
OPCODE_LOAD_VECTOR_LEFT,
|
||||
OPCODE_LOAD_VECTOR_RIGHT,
|
||||
OPCODE_STORE,
|
||||
OPCODE_STORE_RELEASE,
|
||||
OPCODE_STORE_VECTOR_LEFT,
|
||||
OPCODE_STORE_VECTOR_RIGHT,
|
||||
OPCODE_PREFETCH,
|
||||
|
||||
OPCODE_MAX,
|
||||
|
||||
@@ -194,18 +194,6 @@ DEFINE_OPCODE(
|
||||
OPCODE_SIG_V_V,
|
||||
OPCODE_FLAG_MEMORY | OPCODE_FLAG_VOLATILE);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_LOAD_VECTOR_LEFT,
|
||||
"load_vector_left",
|
||||
OPCODE_SIG_V_V,
|
||||
OPCODE_FLAG_MEMORY);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_LOAD_VECTOR_RIGHT,
|
||||
"load_vector_right",
|
||||
OPCODE_SIG_V_V,
|
||||
OPCODE_FLAG_MEMORY);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_STORE,
|
||||
"store",
|
||||
@@ -218,18 +206,6 @@ DEFINE_OPCODE(
|
||||
OPCODE_SIG_V_V_V,
|
||||
OPCODE_FLAG_MEMORY | OPCODE_FLAG_VOLATILE);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_STORE_VECTOR_LEFT,
|
||||
"store_vector_left",
|
||||
OPCODE_SIG_X_V_V,
|
||||
OPCODE_FLAG_MEMORY);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_STORE_VECTOR_RIGHT,
|
||||
"store_vector_right",
|
||||
OPCODE_SIG_X_V_V,
|
||||
OPCODE_FLAG_MEMORY);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_PREFETCH,
|
||||
"prefetch",
|
||||
|
||||
@@ -401,6 +401,10 @@ void Value::Not() {
|
||||
case INT64_TYPE:
|
||||
constant.i64 = ~constant.i64;
|
||||
break;
|
||||
case VEC128_TYPE:
|
||||
constant.v128.low = ~constant.v128.low;
|
||||
constant.v128.high = ~constant.v128.high;
|
||||
break;
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user