Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Apr 2014 16:25:08 +0000
From:      =?iso-8859-1?B?V2Vp3ywgSvxyZ2Vu?= <weiss@uni-mainz.de>
To:        "'freebsd-arm@freebsd.org'" <freebsd-arm@freebsd.org>
Subject:   sleep command with armv6hf
Message-ID:  <79020061b2a74d8e8d56d47361ca3f4d@e15be-01.zdv.Uni-Mainz.DE>

next in thread | raw e-mail | index | archive | help
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).

__aeabi_d2lz:
   0:   e92d4010        push    {r4, lr}
   4:   ec52cb10        vmov    ip, r2, d0
   8:   e3a000ff        mov     r0, #255        ; 0xff
   c:   e59f10a8        ldr     r1, [pc, #168]  ; bc <__aeabi_d2lz+0xbc>
  10:   e3800c07        orr     r0, r0, #1792   ; 0x700
  14:   e0004a22        and     r4, r0, r2, lsr #20

Besides, when compiling sleep without optimization, the argument
for __aeabi_d2lz by chance is in d0 as well as r0/r1. So this
accidentally works.


Regards

Juergen




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