Indirect calls and fixing v128 const loads.
This commit is contained in:
parent
0123b63aa2
commit
d323e6d3ec
|
@ -81,9 +81,9 @@ void* ResolveFunctionAddress(void* raw_context, uint64_t target_address) {
|
||||||
Function* fn = NULL;
|
Function* fn = NULL;
|
||||||
thread_state->runtime()->ResolveFunction(target_address, &fn);
|
thread_state->runtime()->ResolveFunction(target_address, &fn);
|
||||||
XEASSERTNOTNULL(fn);
|
XEASSERTNOTNULL(fn);
|
||||||
XEASSERTALWAYS();
|
XEASSERT(fn->type() == Function::USER_FUNCTION);
|
||||||
//fn->Call(thread_state);
|
auto x64_fn = (X64Function*)fn;
|
||||||
return 0;
|
return x64_fn->machine_code();
|
||||||
}
|
}
|
||||||
void IssueCall(X64Emitter& e, FunctionInfo* symbol_info, uint32_t flags) {
|
void IssueCall(X64Emitter& e, FunctionInfo* symbol_info, uint32_t flags) {
|
||||||
// If we are an extern function, we can directly insert a call.
|
// If we are an extern function, we can directly insert a call.
|
||||||
|
@ -1236,8 +1236,8 @@ void alloy::backend::x64::lowering::RegisterSequences(LoweringTable* table) {
|
||||||
e.movaps(e.ptr[e.rcx + i->src1.offset], src);
|
e.movaps(e.ptr[e.rcx + i->src1.offset], src);
|
||||||
e.EndOp(src);
|
e.EndOp(src);
|
||||||
} else if (i->Match(SIG_TYPE_X, SIG_TYPE_IGNORE, SIG_TYPE_V128C)) {
|
} else if (i->Match(SIG_TYPE_X, SIG_TYPE_IGNORE, SIG_TYPE_V128C)) {
|
||||||
e.mov(e.ptr[e.rcx + i->src1.offset], i->src2.value->constant.v128.low);
|
e.mov(e.qword[e.rcx + i->src1.offset], i->src2.value->constant.v128.low);
|
||||||
e.mov(e.ptr[e.rcx + i->src1.offset + 8], i->src2.value->constant.v128.high);
|
e.mov(e.qword[e.rcx + i->src1.offset + 8], i->src2.value->constant.v128.high);
|
||||||
} else {
|
} else {
|
||||||
ASSERT_INVALID_TYPE();
|
ASSERT_INVALID_TYPE();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue