From owner-freebsd-arm@FreeBSD.ORG Tue Mar 30 09:35:11 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EDF6106566B for ; Tue, 30 Mar 2010 09:35:11 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id 949038FC17 for ; Tue, 30 Mar 2010 09:35:10 +0000 (UTC) Received: by fxm25 with SMTP id 25so533218fxm.3 for ; Tue, 30 Mar 2010 02:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=V3h5Me/DSOF3JSEmGyb5jZq2mx6omrDvPeVhOik1j6o=; b=N5shaCYGrZs97S8gnZJsZVKybat66POBWgpW4IKGjq+InfvUfreInHWGMEEPrF0afy o0M/ERGEfh74PSfhl8HnarfOGTcB6FxPDBGHkyxfLCJ/OyZqBfJMVjBj0Jlq1aretMvS 0mBrcQRv0k7sSSJOxCxF13qZDzPFkSeySEY+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ltcBEUW2VOFfooUTD3vMmCnG2KFF5VJn5nyu2AtUszV97AJZC9iHfgrpFuH+L83Ywd Q0C9TdnkZ30aph99JFybP1ydkwyRpmBhMvCJqyBQM7z07r1KGQ93Gc9CaZPGo65YXfcP HfB5zykhSSCGYoRrHOPIpyQNe6mnRQp6WToRE= Received: by 10.223.63.17 with SMTP id z17mr3130372fah.66.1269941709351; Tue, 30 Mar 2010 02:35:09 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 15sm3711241fxm.15.2010.03.30.02.35.07 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 02:35:07 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BB1C5C9.8000402@FreeBSD.org> Date: Tue, 30 Mar 2010 12:35:05 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-arm@FreeBSD.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: printf(long double) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 09:35:11 -0000 Hi. Playing with SheevaPlug (Marvell 88F6281 rev A0) with fresh 9-CURRENT I've found that many system statistics utilities are lying, showing number few times smaller then expected. After some investigation I've found that the problem possibly goes from different meaning of (long double) type for compiler and printf() code. I've written small test to check it: #include int main (void) { printf("%d %d\n", sizeof(long double), sizeof(double)); printf("%Lf %f %Lf %f\n", (long double)14.5, (long double)14.5, (double)14.5, (double)14.5); } On amd64 it prints: # ./a.out 16 8 14.500000 14.500000 14.500000 14.500000 But on arm: %./a.out 8 8 6.500000 14.500000 6.500000 14.500000 Can somebody comment this? -- Alexander Motin