LOAD/STORE_VECTOR_LEFT/RIGHT. It'd be nice not to have these.
This commit is contained in:
@@ -781,6 +781,28 @@ 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);
|
||||
@@ -812,6 +834,26 @@ 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,8 +118,15 @@ 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);
|
||||
|
||||
@@ -100,8 +100,12 @@ 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,6 +194,18 @@ 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",
|
||||
@@ -206,6 +218,18 @@ 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",
|
||||
|
||||
Reference in New Issue
Block a user