1 // This is not and has never been a correct C ABI for WebAssembly, but
2 // for a long time this was the C ABI that Rust used. wasm-bindgen
3 // depends on ABI details for this ABI and is incompatible with the
4 // correct C ABI, so this ABI is being kept around until wasm-bindgen
5 // can be fixed to work with the correct ABI. See #63649 for further
8 use crate::abi::call::{ArgAbi, FnAbi};
10 fn classify_ret<Ty>(ret: &mut ArgAbi<'_, Ty>) {
11 ret.extend_integer_width_to(32);
14 fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
15 arg.extend_integer_width_to(32);
18 pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
19 if !fn_abi.ret.is_ignore() {
20 classify_ret(&mut fn_abi.ret);
23 for arg in &mut fn_abi.args {