From e096fa7aa6161e1f5a74001185eb3873a684c48d Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 27 Jan 2015 16:57:20 +0100 Subject: ABI compatibility for struct/union function arguments passed by value. The passing of struct/union arguments by value implemented in the verified part of CompCert is not compatible with the ARM, PowerPC and x86 ABI. Here we enrich the StructReturn source-to-source emulation pass so that it implements the calling conventions defined in these ABIs. Plus: for x86, implement the returning of struct/union results by value in a way compatible with the ABI. --- cparser/Unblock.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Unblock.ml') diff --git a/cparser/Unblock.ml b/cparser/Unblock.ml index 405986f3..4013db9b 100644 --- a/cparser/Unblock.ml +++ b/cparser/Unblock.ml @@ -149,7 +149,7 @@ let rec expand_expr islocal env e = | ECall(e1, el) -> {edesc = ECall(expand e1, List.map expand el); etyp = e.etyp} in - let e' = expand e in add_inits_expr !inits e' + let e' = expand e in ecommalist !inits e' (* Elimination of compound literals within an initializer. *) -- cgit