[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Incorrect function call code on ARMv6

From: Daniel Glöckner
Subject: Re: [Tinycc-devel] Incorrect function call code on ARMv6
Date: Thu, 11 Aug 2016 01:17:03 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Aug 10, 2016 at 06:59:46AM +0100, Balazs Kezes wrote:
>   90:   e5912000        ldr     r2, [r1]  ; <-- This is the y argument.
>   94:   e50b2018        str     r2, [fp, #-24]
>   98:   e5901000        ldr     r1, [r0]
>   9c:   e2800004        add     r0, r0, #4
>   a0:   e5902000        ldr     r2, [r0]  ; <-- The clobbering happens here.
>   a4:   e50b101c        str     r1, [fp, #-28]
>   a8:   e1a01002        mov     r1, r2
>   ac:   e51b001c        ldr     r0, [fp, #-28]
>   b0:   ebfffffe        bl      0 <foo>

I think the error is caused by the "vtop--;" lines in copy_params().
The former gfunc_call() implementation for ARM rotated the elements
on the parameter stack to let get_reg() know that the registers are
still in use. The current implementation drops each element directly
after it has been moved to the final register.

Best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]