aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/arm/vararg.S
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2015-03-31 10:19:44 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2015-03-31 10:19:44 +0200
commit47a6b116069cff9c71466bde1fd87d0775ec9175 (patch)
treecc6402162b64512db1f82ebbb5c94606f14ee3a8 /runtime/arm/vararg.S
parent14f3f0dfb90c74b7e1bc96c4aee74fb88dd7923b (diff)
parentc1205952ab7e3be09cd1a0a9a4d4ee9ddeefe1ea (diff)
downloadcompcert-47a6b116069cff9c71466bde1fd87d0775ec9175.tar.gz
compcert-47a6b116069cff9c71466bde1fd87d0775ec9175.zip
Merge pull request #33 from AbsInt/struct-passing
ABI conformance for passing function arguments and returning function results of struct and union types
Diffstat (limited to 'runtime/arm/vararg.S')
-rw-r--r--runtime/arm/vararg.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/arm/vararg.S b/runtime/arm/vararg.S
index ae06e361..5e319b8b 100644
--- a/runtime/arm/vararg.S
+++ b/runtime/arm/vararg.S
@@ -75,3 +75,15 @@ FUNCTION(__compcert_va_float64)
#endif
bx lr
ENDFUNCTION(__compcert_va_float64)
+
+FUNCTION(__compcert_va_composite)
+ @ r0 = ap parameter
+ @ r1 = size of the composite, in bytes
+ ldr r2, [r0, #0] @ r2 = pointer to next argument
+ ADD r3, r2, r1 @ advance by size
+ ADD r3, r3, #3 @ 4-align
+ BIC r3, r3, #3
+ str r3, [r0, #0] @ update ap
+ mov r0, r2 @ result is pointer to composite in stack
+ bx lr
+ENDFUNCTION(__compcert_va_composite)