提交 92163f1c 编写于 作者: E est31

Windows x64 ABI requires i128 params to be passed as reference

上级 ca73affe
......@@ -18,16 +18,20 @@
pub fn compute_abi_info(ccx: &CrateContext, fty: &mut FnType) {
let fixup = |a: &mut ArgType| {
if a.ty.kind() == Struct {
match llsize_of_alloc(ccx, a.ty) {
1 => a.cast = Some(Type::i8(ccx)),
2 => a.cast = Some(Type::i16(ccx)),
4 => a.cast = Some(Type::i32(ccx)),
8 => a.cast = Some(Type::i64(ccx)),
_ => a.make_indirect(ccx)
}
} else {
a.extend_integer_width_to(32);
match a.ty.kind() {
Struct => match llsize_of_alloc(ccx, a.ty) {
1 => a.cast = Some(Type::i8(ccx)),
2 => a.cast = Some(Type::i16(ccx)),
4 => a.cast = Some(Type::i32(ccx)),
8 => a.cast = Some(Type::i64(ccx)),
_ => a.make_indirect(ccx)
},
Integer => match llsize_of_alloc(ccx, a.ty) {
1 ... 8 => a.extend_integer_width_to(32),
16 => a.make_indirect(ccx),
_ => bug!(),
},
_ => (),
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册