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

Re: [Xen-devel] [PATCH 19/34] xen/arm: Provide eabi wrapper for __aeabi_mem* functions



On 03/26/2014 10:39 AM, Ian Campbell wrote:
> On Tue, 2014-03-25 at 18:12 +0000, Julien Grall wrote:
>> Hi Ian,
>>
>> On 03/25/2014 05:25 PM, Ian Campbell wrote:
>>> On Tue, 2014-03-25 at 16:55 +0000, Julien Grall wrote:
>>>> Clang doesn't provide function __aebai_mem*, implement generically as a 
>>>> wrapper
>>>> for mem* function provided by Xen.
>>>
>>> Where are the references to these functions coming from if not from the
>>> compiler?
>>
>> Theses functions are called by the code generated by the compiler.
> 
> And who normally provides them when building with clang? Some sort of
> libclang I guess?

I've tried to compile a same compilation unit with gcc and clang. gcc is
inlining the call to __aebi_*. See below:

Clang assembly:
000002b8 <wallclock_time>:
 2b8:   e92d4800        push    {fp, lr}
 2bc:   e1a0b00d        mov     fp, sp
 2c0:   e3a01024        mov     r1, #36 ; 0x24
 2c4:   e3a02000        mov     r2, #0
 2c8:   ebfffffe        bl      0 <__aeabi_memset>
 2cc:   e8bd8800        pop     {fp, pc}

GCC assembly:

00000378 <wallclock_time>:
 378:   e52db004        push    {fp}            ; (str fp, [sp, #-4]!)
 37c:   e28db000        add     fp, sp, #0
 380:   e3a02000        mov     r2, #0
 384:   e1a03000        mov     r3, r0
 388:   e4832004        str     r2, [r3], #4
 38c:   e5802004        str     r2, [r0, #4]
 390:   e2833004        add     r3, r3, #4
 394:   e4832004        str     r2, [r3], #4
 398:   e4832004        str     r2, [r3], #4
 39c:   e4832004        str     r2, [r3], #4
 3a0:   e4832004        str     r2, [r3], #4
 3a4:   e4832004        str     r2, [r3], #4
 3a8:   e4832004        str     r2, [r3], #4
 3ac:   e5832000        str     r2, [r3]
 3b0:   e24bd000        sub     sp, fp, #0
 3b4:   e49db004        pop     {fp}            ; (ldr fp, [sp], #4)
 3b8:   e12fff1e        bx      lr

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.