Mercurial > projects > ldc
diff tangotests/vararg3.d @ 264:a9dae3da4e87 trunk
[svn r285] Fixed D -> bool LLVM helper for floating point values.
Changed the way D-style varargs are passed, now each param should be aligned to size_t.sizeof.
author | lindquist |
---|---|
date | Sat, 14 Jun 2008 17:28:13 +0200 |
parents | a58d8f4b84df |
children | 23d0d9855cad |
line wrap: on
line diff
--- a/tangotests/vararg3.d Sat Jun 14 06:13:35 2008 +0200 +++ b/tangotests/vararg3.d Sat Jun 14 17:28:13 2008 +0200 @@ -113,12 +113,9 @@ private void* get_va_arg(TypeInfo ti, ref void* vp) { - auto tisize = ti.tsize; - assert(tisize); - size_t size = tisize > size_t.sizeof ? size_t.sizeof : tisize; - void* vptmp = cast(void*)((cast(size_t)vp + size - 1) & ~(size - 1)); - vp = vptmp + tisize; - return vptmp; + void* arg = vp; + vp = vp + ( ( ti.tsize + size_t.sizeof - 1 ) & ~( size_t.sizeof - 1 ) ); + return arg; } void print(TypeInfo ti, void* arg)