diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-09-08 13:56:01 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2020-12-25 18:34:24 +0100 |
commit | 9ab3738ae87a554fb742420b8c81ced4cd3c66c7 (patch) | |
tree | cc17ce961dfc2f8dd13f4428b0814c8fe66be254 /x86/Asmexpand.ml | |
parent | a138b43ccb391be63bed2fea26cd36dab96b091f (diff) | |
download | compcert-9ab3738ae87a554fb742420b8c81ced4cd3c66c7.tar.gz compcert-9ab3738ae87a554fb742420b8c81ced4cd3c66c7.zip |
Changed cc_varargs to an option type
Instead of being a simple boolean we now use an option type to record
the number of fixed (non-vararg) arguments. Hence, `None` means
not vararg, and `Some n` means `n` fixed arguments followed with varargs.
Diffstat (limited to 'x86/Asmexpand.ml')
-rw-r--r-- | x86/Asmexpand.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/x86/Asmexpand.ml b/x86/Asmexpand.ml index 73efc3c5..14cbb373 100644 --- a/x86/Asmexpand.ml +++ b/x86/Asmexpand.ml @@ -500,7 +500,7 @@ let expand_builtin_inline name args res = unprototyped. *) let fixup_funcall_elf64 sg = - if sg.sig_cc.cc_vararg || sg.sig_cc.cc_unproto then begin + if sg.sig_cc.cc_vararg <> None || sg.sig_cc.cc_unproto then begin let (ir, fr, ofs) = next_arg_locations 0 0 0 sg.sig_args in emit (Pmovl_ri (RAX, coqint_of_camlint (Int32.of_int fr))) end @@ -521,7 +521,7 @@ let rec copy_fregs_to_iregs args fr ir = () let fixup_funcall_win64 sg = - if sg.sig_cc.cc_vararg then + if sg.sig_cc.cc_vararg <> None then copy_fregs_to_iregs sg.sig_args [XMM0; XMM1; XMM2; XMM3] [RCX; RDX; R8; R9] let fixup_funcall sg = |