From owner-freebsd-arm@FreeBSD.ORG Sat Apr 5 16:25:11 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8111AB11 for ; Sat, 5 Apr 2014 16:25:11 +0000 (UTC) Received: from mailgate-01.zdv.uni-mainz.de (mailgate-01.zdv.Uni-Mainz.DE [IPv6:2001:4c80:40:62d:203:ffff:fe5d:b2f1]) by mx1.freebsd.org (Postfix) with ESMTP id 103DA254 for ; Sat, 5 Apr 2014 16:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-mainz.de; i=@uni-mainz.de; q=dns/txt; s=ironport; t=1396715112; x=1428251112; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=KLKKFAWJmxqZTgawh8O1xmxSVF3DoOu46mfI11tCmPY=; b=kIO4fLB95SmdSWoqr3g16bdRSnKTqNIxYZKT7yRQfoNDRuRjJUro9L4l jnakTufI4//NWAw8A/P4OQzCOVuAlPlZ1r6xuYFsI2pXHzPh2nD8SF9tk pnwKebQVzGTD3WJ+x5jO+qauY0bSqtHbnZTGyY+m94dEgPv9lXM1gboxP M=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqQEAAElQFMKXgZQ/2dsb2JhbABYgmWBM4wluRd0giyBCwGBACYBBBuHcQGdArFlF5MwBIkilgWLc4Mwgis X-IPAS-Result: AqQEAAElQFMKXgZQ/2dsb2JhbABYgmWBM4wluRd0giyBCwGBACYBBBuHcQGdArFlF5MwBIkilgWLc4Mwgis Received: from e14hub-01.zdv.uni-mainz.de ([10.94.6.80]) by mailgate-01.zdv.uni-mainz.de with ESMTP; 05 Apr 2014 18:25:10 +0200 Received: from e15be-01.zdv.Uni-Mainz.DE (2001:4c80:40:606:92e2:baff:fe19:9090) by E14HUB-01.zdv.Uni-Mainz.DE (2001:4c80:40:606:21d:d8ff:feb7:1c5f) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sat, 5 Apr 2014 18:25:08 +0200 Received: from e15be-01.zdv.Uni-Mainz.DE (2001:4c80:40:606:92e2:baff:fe19:9090) by e15be-01.zdv.Uni-Mainz.DE (2001:4c80:40:606:92e2:baff:fe19:9090) with Microsoft SMTP Server (TLS) id 15.0.847.32; Sat, 5 Apr 2014 18:25:08 +0200 Received: from e15be-01.zdv.Uni-Mainz.DE ([fe80::92e2:baff:fe19:9090]) by e15be-01.zdv.Uni-Mainz.DE ([fe80::92e2:baff:fe19:9090%15]) with mapi id 15.00.0847.030; Sat, 5 Apr 2014 18:25:08 +0200 From: =?iso-8859-1?B?V2Vp3ywgSvxyZ2Vu?= To: "'freebsd-arm@freebsd.org'" Subject: sleep command with armv6hf Thread-Topic: sleep command with armv6hf Thread-Index: Ac9Q6bdmGvnX8HesTcC/76T/cz8N0Q== Date: Sat, 5 Apr 2014 16:25:08 +0000 Message-ID: <79020061b2a74d8e8d56d47361ca3f4d@e15be-01.zdv.Uni-Mainz.DE> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [134.93.178.81] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 16:25:11 -0000 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