ARM: Fix passing arrays to varadic functions
commit10750872419df9dc92421c4fd719f42e5561ee77
authorDaniel Glöckner <daniel-gl@gmx.net>
Sat, 29 Mar 2014 16:50:40 +0000 (29 17:50 +0100)
committerDaniel Glöckner <daniel-gl@gmx.net>
Sat, 29 Mar 2014 16:50:40 +0000 (29 17:50 +0100)
tree6f3f038903e3a2b23dfb8f3a4e54e1b12404e110
parentf272407353f2abdc09f9f6bcb54bcf4b6521d782
ARM: Fix passing arrays to varadic functions

TinyCC miscompiled

void g(int,...);

void f(void)
{
        char b[4000];
        g(1, 2, 3, 4, b);
}

in two ways:
 1. It didn't align the stack to 8 bytes before the call
 2. It added sizeof(b) to the stack pointer after the call
arm-gen.c