tech-toolchain archive

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

Re: ABI issues with gcc



In article <20140125181952.GH6425%pony.stderr.spb.ru@localhost>,
Valery Ushakov  <uwe%stderr.spb.ru@localhost> wrote:
>On Fri, Jan 24, 2014 at 18:41:19 +0000, Christos Zoulas wrote:
>
>> In article <20140124052002.GF6425%pony.stderr.spb.ru@localhost>,
>> Valery Ushakov  <uwe%stderr.spb.ru@localhost> wrote:
>> >On Thu, Jan 23, 2014 at 10:42:40 -0500, Christos Zoulas wrote:
>> >
>[...]
>> >>   3. fix our ABI so for those archs we have a STACK_BOUNDAY of 8
>> >
>> >Is it really the case for sh3?
>> >
>> >#define STACK_BOUNDARY  BIGGEST_ALIGNMENT
>> >#define BIGGEST_ALIGNMENT  (TARGET_ALIGN_DOUBLE ? 64 : 32)
>> >#define TARGET_ALIGN_DOUBLE ((target_flags & MASK_ALIGN_DOUBLE) != 0
>> >
>> >And the only occurence of MASK_ALIGN_DOUBLE is:
>> >
>> >  if (TARGET_SH5)
>> >    {
>> >      sh_cpu = PROCESSOR_SH5;
>> >      target_flags |= MASK_ALIGN_DOUBLE;
>> 
>> Does the test program in the gcc PR fail?
>
>I don't have gcc 4.8 handy.  With current system compiler:
>
>$ cat stack.c
>#include <stdio.h>
>
>int
>main()
>{
>        long long ll;
>        printf("%p\n", &ll);
>        return 0;
>}
>$ cc stack.c 
>$ ./a.out 
>0x7fffdcac
>
>As you can see, that long long is only 4 bytes aligned.

I'll build one.

christos



Home | Main Index | Thread Index | Old Index