aboutsummaryrefslogtreecommitdiffstats
path: root/arm/Asmexpand.ml
diff options
context:
space:
mode:
authorMichael Schmidt <github@mschmidt.me>2016-02-24 17:03:49 +0100
committerMichael Schmidt <github@mschmidt.me>2016-02-24 17:03:49 +0100
commit9e09561f54db459757446db52c01bf3d85bd8764 (patch)
tree3296cd2efcb40b924c0e733cba2fcc1f3a0600bc /arm/Asmexpand.ml
parentdfa87f9b200a10a75034ab20ba84d9ba22b2f504 (diff)
downloadcompcert-kvx-9e09561f54db459757446db52c01bf3d85bd8764.tar.gz
compcert-kvx-9e09561f54db459757446db52c01bf3d85bd8764.zip
bug 18168, catch cases where variadic arguments are transfered via registers
Diffstat (limited to 'arm/Asmexpand.ml')
-rw-r--r--arm/Asmexpand.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/arm/Asmexpand.ml b/arm/Asmexpand.ml
index 77714721..5415f78e 100644
--- a/arm/Asmexpand.ml
+++ b/arm/Asmexpand.ml
@@ -257,7 +257,7 @@ let align n a = (n + a - 1) land (-a)
let rec next_arg_location ir ofs = function
| [] ->
- Int32.of_int (16 + ofs)
+ Int32.of_int (ir * 4 + ofs)
| (Tint | Tsingle | Tany32) :: l ->
if ir < 4
then next_arg_location (ir + 1) ofs l
@@ -265,7 +265,7 @@ let rec next_arg_location ir ofs = function
| (Tfloat | Tlong | Tany64) :: l ->
if ir < 3
then next_arg_location (align ir 2 + 2) ofs l
- else next_arg_location ir (align ofs 8 + 8) l
+ else next_arg_location 4 (align ofs 8 + 8) l
let expand_builtin_va_start r =
if not !current_function.fn_sig.sig_cc.cc_vararg then