mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
Implement load and store.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -169,6 +169,10 @@ pub struct Intrinsics<'ctx> {
|
||||
|
||||
pub experimental_stackmap: FunctionValue<'ctx>,
|
||||
|
||||
pub vmmemory_definition_ptr_ty: PointerType<'ctx>,
|
||||
pub vmmemory_definition_base_element: u32,
|
||||
pub vmmemory_definition_current_length_element: u32,
|
||||
|
||||
pub memory32_grow_ptr_ty: PointerType<'ctx>,
|
||||
pub imported_memory32_grow_ptr_ty: PointerType<'ctx>,
|
||||
pub memory32_size_ptr_ty: PointerType<'ctx>,
|
||||
@@ -226,6 +230,7 @@ impl<'ctx> Intrinsics<'ctx> {
|
||||
let f32x4_ty_basic = f32x4_ty.as_basic_type_enum();
|
||||
let f64x2_ty_basic = f64x2_ty.as_basic_type_enum();
|
||||
let i8_ptr_ty_basic = i8_ptr_ty.as_basic_type_enum();
|
||||
let i64_ptr_ty_basic = i64_ptr_ty.as_basic_type_enum();
|
||||
|
||||
let ctx_ty = i8_ty;
|
||||
let ctx_ptr_ty = ctx_ty.ptr_type(AddressSpace::Generic);
|
||||
@@ -572,6 +577,13 @@ impl<'ctx> Intrinsics<'ctx> {
|
||||
None,
|
||||
),
|
||||
|
||||
// TODO: this i64 is actually a rust usize
|
||||
vmmemory_definition_ptr_ty: context
|
||||
.struct_type(&[i8_ptr_ty_basic, i64_ptr_ty_basic], false)
|
||||
.ptr_type(AddressSpace::Generic),
|
||||
vmmemory_definition_base_element: 0,
|
||||
vmmemory_definition_current_length_element: 1,
|
||||
|
||||
memory32_grow_ptr_ty: i32_ty
|
||||
.fn_type(
|
||||
&[ctx_ptr_ty.as_basic_type_enum(), i32_ty_basic, i32_ty_basic],
|
||||
@@ -665,7 +677,7 @@ struct ImportedFuncCache<'ctx> {
|
||||
}
|
||||
|
||||
pub struct CtxType<'ctx, 'a> {
|
||||
pub ctx_ptr_value: PointerValue<'ctx>,
|
||||
ctx_ptr_value: PointerValue<'ctx>,
|
||||
|
||||
wasm_module: &'a WasmerCompilerModule,
|
||||
cache_builder: &'a Builder<'ctx>,
|
||||
|
||||
Reference in New Issue
Block a user