Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Apr 2014 18:39:58 +0100
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        "=?ISO-8859-1?Q?Wei=DF,_J=FCrgen?=" <weiss@uni-mainz.de>
Cc:        "'freebsd-arm@freebsd.org'" <freebsd-arm@freebsd.org>
Subject:   Re: sleep command with armv6hf
Message-ID:  <20140405183958.65834b35@bender.Home>
In-Reply-To: <79020061b2a74d8e8d56d47361ca3f4d@e15be-01.zdv.Uni-Mainz.DE>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, 5 Apr 2014 16:25:08 +0000
"Weiß, Jürgen" <weiss@uni-mainz.de> wrote:

> under armv6hf the sleep command gives
> 
> sleep: nanosleep: Invalid argument
> 
> Further investigations seem to indicate the following problem:
> 
> sleep calls the function __aeabi_d2lz
> 
>         vmov    r0, r1, d8
>         bl      __aeabi_d2lz
>         mov     r4, r0
>         mov     r5, r1
> 
> with the argument in the r0/r1 registers. But the function
> in libgcc.a expects the argument in d0 (seems to be
> compiled with hardfloat as well).

Can you try the attached patch. It should fix the function to use the
slightly odd calling convention of the __aeabi_* functions.

Andrew

[-- Attachment #2 --]
Index: contrib/compiler-rt/lib/fixdfdi.c
===================================================================
--- contrib/compiler-rt/lib/fixdfdi.c	(revision 264019)
+++ contrib/compiler-rt/lib/fixdfdi.c	(working copy)
@@ -25,7 +25,7 @@
 
 ARM_EABI_FNALIAS(d2lz, fixdfdi)
 
-di_int
+COMPILER_RT_ABI di_int
 __fixdfdi(double a)
 {
     double_bits fb;
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140405183958.65834b35>