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 /riscV/Conventions1.v | |
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 'riscV/Conventions1.v')
-rw-r--r-- | riscV/Conventions1.v | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/riscV/Conventions1.v b/riscV/Conventions1.v index 17326139..74c99d07 100644 --- a/riscV/Conventions1.v +++ b/riscV/Conventions1.v @@ -281,7 +281,8 @@ Fixpoint loc_arguments_rec (va: bool) when calling a function with signature [s]. *) Definition loc_arguments (s: signature) : list (rpair loc) := - loc_arguments_rec s.(sig_cc).(cc_vararg) s.(sig_args) 0 0 0. + let va := match s.(sig_cc).(cc_vararg) with Some _ => true | None => false end in + loc_arguments_rec va s.(sig_args) 0 0 0. (** Argument locations are either non-temporary registers or [Outgoing] stack slots at nonnegative offsets. *) |