guix-devel
[Top][All Lists]
Advanced

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

Re: Preliminary 'wip-armhf' branch pushed


From: Mark H Weaver
Subject: Re: Preliminary 'wip-armhf' branch pushed
Date: Thu, 01 Jan 2015 02:11:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

John Darrington <address@hidden> writes:

> On Wed, Dec 31, 2014 at 06:40:23PM -0500, Mark H Weaver wrote:
>      
>      * You added "CFLAGS=-Wno-cast-qual" and "--disable-werror" for ARM in
>        'gcc-configure-flags-for-triplet', which I thought was a bad idea and
>        didn't belong there.
>
> Have you tried actually building GCC ?

Yes, I've built several GCCs including gcc-final.  I've also
successfully built the 'hello' package.

> I found that without those, it failed to build.

Perhaps the problem you ran into was fixed in GCC 4.8.4.

>      * You patched gcc/config/arm/linux-eabi.h unnecessarily.
>
> Without that patch, GCC actually builds soft-float code, even though
> you may have passed the --with-float=hard flag.  What bits of that
> patch do you think are not necessary?

All of it seems to be unnecessary, by experiment.  I've used the
resulting GCC to compile the following test program:

--8<---------------cut here---------------start------------->8---
#include <math.h>

double foo (double a, double b)
{
  return sinh(a * b);
}
--8<---------------cut here---------------end--------------->8---

Compiled with "/gnu/store/.../bin/gcc -O2 -S foo.c", here's the
resulting foo.s:

--8<---------------cut here---------------start------------->8---
        .syntax unified
        .arch armv7-a
        .eabi_attribute 27, 3
        .eabi_attribute 28, 1
        .fpu vfpv3-d16
        .eabi_attribute 20, 1
        .eabi_attribute 21, 1
        .eabi_attribute 23, 3
        .eabi_attribute 24, 1
        .eabi_attribute 25, 1
        .eabi_attribute 26, 2
        .eabi_attribute 30, 2
        .eabi_attribute 34, 1
        .eabi_attribute 18, 4
        .thumb
        .file   "foo.c"
        .text
        .align  2
        .global foo
        .thumb
        .thumb_func
        .type   foo, %function
foo:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        fmuld   d0, d0, d1
        b       sinh
        .size   foo, .-foo
        .ident  "GCC: (GNU) 4.8.4"
        .section        .note.GNU-stack,"",%progbits
--8<---------------cut here---------------end--------------->8---

'foo' accepts the double arguments via registers and passes a double to
sinh via registers.  I also checked a variant that simply returned a*b,
and it was clearly returning the result via register as well.

I think it's quite clear that this is using the hard-float ABI, no?

      Mark



reply via email to

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