aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Asmexpand.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2020-09-08 13:56:01 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-25 18:34:24 +0100
commit9ab3738ae87a554fb742420b8c81ced4cd3c66c7 (patch)
treecc17ce961dfc2f8dd13f4428b0814c8fe66be254 /riscV/Asmexpand.ml
parenta138b43ccb391be63bed2fea26cd36dab96b091f (diff)
downloadcompcert-kvx-9ab3738ae87a554fb742420b8c81ced4cd3c66c7.tar.gz
compcert-kvx-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/Asmexpand.ml')
-rw-r--r--riscV/Asmexpand.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml
index 810514a3..80e33b2b 100644
--- a/riscV/Asmexpand.ml
+++ b/riscV/Asmexpand.ml
@@ -100,7 +100,7 @@ let rec fixup_variadic_call ri rf tyl =
end
let fixup_call sg =
- if sg.sig_cc.cc_vararg then fixup_variadic_call 0 0 sg.sig_args
+ if (sg.sig_cc.cc_vararg <> None) then fixup_variadic_call 0 0 sg.sig_args
(* Handling of annotations *)
@@ -588,7 +588,7 @@ let expand_instruction instr =
| Pallocframe (sz, ofs) ->
let sg = get_current_function_sig() in
emit (Pmv (X30, X2));
- if sg.sig_cc.cc_vararg then begin
+ if (sg.sig_cc.cc_vararg <> None) then begin
let n = arguments_size sg in
let extra_sz = if n >= 8 then 0 else align ((8 - n) * wordsize) 16 in
let full_sz = Z.add sz (Z.of_uint extra_sz) in
@@ -606,7 +606,7 @@ let expand_instruction instr =
| Pfreeframe (sz, ofs) ->
let sg = get_current_function_sig() in
let extra_sz =
- if sg.sig_cc.cc_vararg then begin
+ if (sg.sig_cc.cc_vararg <> None) then begin
let n = arguments_size sg in
if n >= 8 then 0 else align ((8 - n) * wordsize) 16
end else 0 in