From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 611842F321 for ; Thu, 26 Jul 2001 08:39:36 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f6QCXJY18802 for axp-list@listman.redhat.com; Thu, 26 Jul 2001 08:33:19 -0400 Received: from jurassic.park.msu.ru (jurassic.park.msu.ru [195.208.223.243]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f6QCXHg18796 for ; Thu, 26 Jul 2001 08:33:17 -0400 Received: (from ink@localhost) by jurassic.park.msu.ru (8.11.2/8.11.2) id f6QCdPj01317 for axp-list@redhat.com; Thu, 26 Jul 2001 16:39:25 +0400 Date: Thu, 26 Jul 2001 16:39:24 +0400 From: Ivan Kokshaysky To: axp-list@redhat.com Subject: Re: Unaligned accesses Message-ID: <20010726163924.A1019@jurassic.park.msu.ru> References: <3B5E197B.50ED0967@iplink.net> <20010725114713.C17679@linux04.mro.cpqcorp.net> <3B5F2EFD.1440F426@Iplink.net> <20010725151509.A28747@ellpspace.math.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010725151509.A28747@ellpspace.math.ualberta.ca>; from michal@ellpspace.math.ualberta.ca on Wed, Jul 25, 2001 at 03:15:09PM -0600 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Wed, Jul 25, 2001 at 03:15:09PM -0600, Michal Jaegermann wrote: > If you are compiling that only with gcc then '__attribute__ ((packed))' > on various structures will force gcc to generate a much more > careful access code - for a price, of course. Using memcpy() with constant size is fine as well, and is portable. Modern GCC (>= 2.95) generates quite a good inline code for this. Ivan.