mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 13:11:32 +00:00
Implement InternalEvent::Breakpoint in the llvm backend.
Enable now-working metering unit tests when run with the llvm backend.
This commit is contained in:
@ -147,6 +147,7 @@ pub struct Intrinsics {
|
||||
pub memory_size_shared_import: FunctionValue,
|
||||
|
||||
pub throw_trap: FunctionValue,
|
||||
pub throw_breakpoint: FunctionValue,
|
||||
|
||||
pub ctx_ptr_ty: PointerType,
|
||||
}
|
||||
@ -309,7 +310,6 @@ impl Intrinsics {
|
||||
i32_ty.fn_type(&[ctx_ptr_ty.as_basic_type_enum(), i32_ty_basic], false);
|
||||
|
||||
let ret_i1_take_i1_i1 = i1_ty.fn_type(&[i1_ty_basic, i1_ty_basic], false);
|
||||
|
||||
Self {
|
||||
ctlz_i32: module.add_function("llvm.ctlz.i32", ret_i32_take_i32_i1, None),
|
||||
ctlz_i64: module.add_function("llvm.ctlz.i64", ret_i64_take_i64_i1, None),
|
||||
@ -525,6 +525,11 @@ impl Intrinsics {
|
||||
void_ty.fn_type(&[i32_ty_basic], false),
|
||||
None,
|
||||
),
|
||||
throw_breakpoint: module.add_function(
|
||||
"vm.breakpoint",
|
||||
void_ty.fn_type(&[i64_ty_basic], false),
|
||||
None,
|
||||
),
|
||||
ctx_ptr_ty,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user