From 7135f93c41413ed750ad8d2660541c95b37003b5 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 1 Jan 2014 17:54:52 +0000 Subject: stdarg.h: assorted fixes for PowerPC git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2397 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- powerpc/PrintAsm.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'powerpc') diff --git a/powerpc/PrintAsm.ml b/powerpc/PrintAsm.ml index 310a733..6d0b52c 100644 --- a/powerpc/PrintAsm.ml +++ b/powerpc/PrintAsm.ml @@ -535,7 +535,8 @@ let print_builtin_va_start oc r = fprintf oc " li %a, %d\n" ireg GPR0 fr; fprintf oc " stb %a, 1(%a)\n" ireg GPR0 ireg r; fprintf oc " addi %a, %a, %ld\n" ireg GPR0 ireg GPR1 - Int32.(add !current_function_stacksize 8l); + Int32.(add (add !current_function_stacksize 8l) + (of_int ofs)); fprintf oc " stw %a, 4(%a)\n" ireg GPR0 ireg r; fprintf oc " addi %a, %a, %ld\n" ireg GPR0 ireg GPR1 Int32.(sub !current_function_stacksize 96l); @@ -709,7 +710,7 @@ let print_instruction oc tbl pc fallthrough = function cfi_adjust oc sz; if (!current_function_sig).sig_cc.cc_vararg then begin fprintf oc " mflr %a\n" ireg GPR0; - fprintf oc " blr __compcert_va_saveregs\n"; + fprintf oc " bl __compcert_va_saveregs\n"; fprintf oc " mtlr %a\n" ireg GPR0 end; current_function_stacksize := sz -- cgit v1.2.3