load_vector_sh*
This commit is contained in:
@@ -734,6 +734,26 @@ Value* FunctionBuilder::LoadConstant(const vec128_t& value) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadVectorShl(Value* sh) {
|
||||
XEASSERT(sh->type == INT8_TYPE);
|
||||
Instr* i = AppendInstr(
|
||||
OPCODE_LOAD_VECTOR_SHL_info, 0,
|
||||
AllocValue(VEC128_TYPE));
|
||||
i->set_src1(sh);
|
||||
i->src2.value = i->src3.value = NULL;
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadVectorShr(Value* sh) {
|
||||
XEASSERT(sh->type == INT8_TYPE);
|
||||
Instr* i = AppendInstr(
|
||||
OPCODE_LOAD_VECTOR_SHR_info, 0,
|
||||
AllocValue(VEC128_TYPE));
|
||||
i->set_src1(sh);
|
||||
i->src2.value = i->src3.value = NULL;
|
||||
return i->dest;
|
||||
}
|
||||
|
||||
Value* FunctionBuilder::LoadContext(size_t offset, TypeName type) {
|
||||
Instr* i = AppendInstr(
|
||||
OPCODE_LOAD_CONTEXT_info, 0,
|
||||
|
||||
@@ -110,6 +110,9 @@ public:
|
||||
Value* LoadConstant(double value);
|
||||
Value* LoadConstant(const vec128_t& value);
|
||||
|
||||
Value* LoadVectorShl(Value* sh);
|
||||
Value* LoadVectorShr(Value* sh);
|
||||
|
||||
Value* LoadContext(size_t offset, TypeName type);
|
||||
void StoreContext(size_t offset, Value* value);
|
||||
|
||||
|
||||
@@ -92,6 +92,9 @@ enum Opcode {
|
||||
OPCODE_VECTOR_CONVERT_I2F,
|
||||
OPCODE_VECTOR_CONVERT_F2I,
|
||||
|
||||
OPCODE_LOAD_VECTOR_SHL,
|
||||
OPCODE_LOAD_VECTOR_SHR,
|
||||
|
||||
OPCODE_LOAD_CONTEXT,
|
||||
OPCODE_STORE_CONTEXT,
|
||||
|
||||
|
||||
@@ -158,6 +158,18 @@ DEFINE_OPCODE(
|
||||
OPCODE_SIG_V_V,
|
||||
0);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_LOAD_VECTOR_SHL,
|
||||
"load_vector_shl",
|
||||
OPCODE_SIG_V_V,
|
||||
0);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_LOAD_VECTOR_SHR,
|
||||
"load_vector_shr",
|
||||
OPCODE_SIG_V_V,
|
||||
0);
|
||||
|
||||
DEFINE_OPCODE(
|
||||
OPCODE_LOAD_CONTEXT,
|
||||
"load_context",
|
||||
|
||||
Reference in New Issue
Block a user