mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
add wasm eh intrinsics
This commit is contained in:
parent
82336c1311
commit
00ce5e8fca
@ -662,6 +662,10 @@ impl<'ll> CodegenCx<'ll, '_> {
|
|||||||
let t_f32 = self.type_f32();
|
let t_f32 = self.type_f32();
|
||||||
let t_f64 = self.type_f64();
|
let t_f64 = self.type_f64();
|
||||||
let t_metadata = self.type_metadata();
|
let t_metadata = self.type_metadata();
|
||||||
|
let t_token = self.type_token();
|
||||||
|
|
||||||
|
ifn!("llvm.wasm.get.exception", fn(t_token) -> i8p);
|
||||||
|
ifn!("llvm.wasm.get.ehselector", fn(t_token) -> t_i32);
|
||||||
|
|
||||||
ifn!("llvm.wasm.trunc.unsigned.i32.f32", fn(t_f32) -> t_i32);
|
ifn!("llvm.wasm.trunc.unsigned.i32.f32", fn(t_f32) -> t_i32);
|
||||||
ifn!("llvm.wasm.trunc.unsigned.i32.f64", fn(t_f64) -> t_i32);
|
ifn!("llvm.wasm.trunc.unsigned.i32.f64", fn(t_f64) -> t_i32);
|
||||||
|
@ -1071,6 +1071,7 @@ extern "C" {
|
|||||||
|
|
||||||
// Operations on other types
|
// Operations on other types
|
||||||
pub fn LLVMVoidTypeInContext(C: &Context) -> &Type;
|
pub fn LLVMVoidTypeInContext(C: &Context) -> &Type;
|
||||||
|
pub fn LLVMTokenTypeInContext(C: &Context) -> &Type;
|
||||||
pub fn LLVMMetadataTypeInContext(C: &Context) -> &Type;
|
pub fn LLVMMetadataTypeInContext(C: &Context) -> &Type;
|
||||||
|
|
||||||
// Operations on all values
|
// Operations on all values
|
||||||
|
@ -52,6 +52,10 @@ impl<'ll> CodegenCx<'ll, '_> {
|
|||||||
unsafe { llvm::LLVMVoidTypeInContext(self.llcx) }
|
unsafe { llvm::LLVMVoidTypeInContext(self.llcx) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn type_token(&self) -> &'ll Type {
|
||||||
|
unsafe { llvm::LLVMTokenTypeInContext(self.llcx) }
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn type_metadata(&self) -> &'ll Type {
|
pub(crate) fn type_metadata(&self) -> &'ll Type {
|
||||||
unsafe { llvm::LLVMMetadataTypeInContext(self.llcx) }
|
unsafe { llvm::LLVMMetadataTypeInContext(self.llcx) }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user