diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-01-01 17:54:52 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-01-01 17:54:52 +0000 |
commit | 7135f93c41413ed750ad8d2660541c95b37003b5 (patch) | |
tree | 624287167bd56be14f05bf4bbb53dc80e4b03c56 /powerpc | |
parent | 25c616a17851ae5c61fa15ccbeba0e3efb8f3365 (diff) |
stdarg.h: assorted fixes for PowerPC
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2397 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc')
-rw-r--r-- | powerpc/PrintAsm.ml | 5 |
1 files changed, 3 insertions, 2 deletions
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 |