From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 21874 invoked from network); 12 Jul 1999 18:54:47 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 12 Jul 1999 18:54:47 -0000 Received: from voicenet.com (mail12.voicenet.com [207.103.0.6]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id OAA29185 for ; Mon, 12 Jul 1999 14:48:50 -0400 Received: (qmail 6258 invoked from network); 12 Jul 1999 18:48:46 -0000 Received: from dialpool0427-pri.voicenet.com (HELO voicenet.com) (209.71.85.220) by mail12.voicenet.com with SMTP; 12 Jul 1999 18:48:46 -0000 Sender: gat@mail.redhat.com Message-ID: <378A384F.3439D26A@voicenet.com> Date: Mon, 12 Jul 1999 14:47:43 -0400 From: Uncle George Organization: Big Endian X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: an evil memcpy() optimizer bug! (egcs-1.1.2, alphaev6, linux) References: <378A21C6.1E094CB4@paralleldata.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I thought he was! If he was passing the value, then he would have a problem, as the float is passed in the second floating point argument register ( rather than the second integer argument register ). Wes Bauske wrote: > Try modifying your code to pass the address of a double rather > than the double itself and see if you still can create the > > > put_f8( > > double v, /* in - value */ > > char* buf /* in - destination address */ > > ) > > { > > v = 99.875; > > hexdump(stdout, "pack_f8: v", (char*) &v, 8); > > memcpy(buf, &v, 8); > > hexdump(stdout, "pack_f8: buf", (char*) buf, 8); > >