summaryrefslogtreecommitdiff
path: root/libstd/varargs.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-21 18:54:53 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-21 19:08:40 -0700
commit14aeadb41737f1765b6f3489f3b8da330aeccf39 (patch)
tree58eeceec013d79b26e024f47a065896e5a44a21d /libstd/varargs.myr
parent0bd2678722f5f70a063190d54d12e62420f02b05 (diff)
downloadmc-14aeadb41737f1765b6f3489f3b8da330aeccf39.tar.gz
Get closer to the C ABI
Diffstat (limited to 'libstd/varargs.myr')
-rw-r--r--libstd/varargs.myr4
1 files changed, 4 insertions, 0 deletions
diff --git a/libstd/varargs.myr b/libstd/varargs.myr
index e0948a6..c2ed1b2 100644
--- a/libstd/varargs.myr
+++ b/libstd/varargs.myr
@@ -77,6 +77,9 @@ const vabytes = {ap
-> sl
}
+const inspectarg = {x
+}
+
generic vanext = {ap -> @a
var v : @a
var ti
@@ -87,6 +90,7 @@ generic vanext = {ap -> @a
/* apply the alignment to the arg pointer */
align = ti.align castto(intptr)
+ inspectarg(align)
p = ap.args castto(intptr)
p = (p + align - 1) & ~(align - 1)
ap.args = p castto(byte#)