Use HOST call convension in Func signature (#383)
This commit is contained in:
@@ -137,10 +137,11 @@ pub struct FuncType {
|
|||||||
|
|
||||||
impl FuncType {
|
impl FuncType {
|
||||||
pub fn new(params: Box<[ValType]>, results: Box<[ValType]>) -> FuncType {
|
pub fn new(params: Box<[ValType]>, results: Box<[ValType]>) -> FuncType {
|
||||||
let signature: ir::Signature = {
|
|
||||||
use cranelift_codegen::ir::*;
|
use cranelift_codegen::ir::*;
|
||||||
use cranelift_codegen::isa::CallConv;
|
use cranelift_codegen::isa::CallConv;
|
||||||
|
use target_lexicon::HOST;
|
||||||
|
let call_conv = CallConv::triple_default(&HOST);
|
||||||
|
let signature: Signature = {
|
||||||
let mut params = params
|
let mut params = params
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| AbiParam::new(p.get_cranelift_type()))
|
.map(|p| AbiParam::new(p.get_cranelift_type()))
|
||||||
@@ -154,7 +155,7 @@ impl FuncType {
|
|||||||
Signature {
|
Signature {
|
||||||
params,
|
params,
|
||||||
returns,
|
returns,
|
||||||
call_conv: CallConv::SystemV,
|
call_conv,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
FuncType {
|
FuncType {
|
||||||
|
|||||||
Reference in New Issue
Block a user