From 5511f920886c58f15b04155e41100bd9efecc563 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Thu, 13 Dec 2018 16:31:08 +0100 Subject: [PATCH] Add call alignment requirement. --- src/function_body.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/function_body.rs b/src/function_body.rs index 0983973f9f..bdd000d7ca 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -224,6 +224,7 @@ pub fn translate( let callee_ty = translation_ctx.func_type(function_index); // TODO: this implementation assumes that this function is locally defined. + // TODO: guarantee 16-byte alignment for calls as required by x86-64 ABI pass_outgoing_args(&mut ctx, callee_ty.params.len() as u32); call_direct(&mut ctx, function_index, callee_ty.returns.len() as u32);