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 427B62FD42 for ; Wed, 25 Jul 2001 08:09:38 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f6PC3Jq24616 for axp-list@listman.redhat.com; Wed, 25 Jul 2001 08:03:19 -0400 Received: from alpha-gw.alpha-processor.com (barracuda.alpha-processor.com [192.233.60.7]) by mail.redhat.com (8.11.0/8.8.7) with SMTP id f6PC3Ig24610 for ; Wed, 25 Jul 2001 08:03:18 -0400 Received: from barracuda.alpha-processor.com by alpha-gw.alpha-processor.com via smtpd (for mail.redhat.com [199.183.24.239]) with SMTP; 25 Jul 2001 12:05:08 UT Received: by barracuda.alpha-processor.com with Internet Mail Service (5.5.2653.19) id ; Wed, 25 Jul 2001 07:56:08 -0400 Message-ID: <051DFF3BBA73D3119A5800A0C95BD02101213330@barracuda.alpha-processor.com> From: Rick Gorton To: "'axp-list@redhat.com'" Subject: RE: Unaligned accesses Date: Wed, 25 Jul 2001 07:56:07 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" 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: The Kernel does have code which does: print out unaligned access errors does the 'right' thing (albeit a bit slowly) In the event that a ldwu instruction is accessing a misaligned address. The 'gotcha': - Unless the code in the application is explicitly using the ldwu instructions, the code executed will read the content correctly from a misaligned address. The only way to get those instructions is to compile with -mcpu=ev56 (or later) If your machine supports ev56 instructions, you _really_ want to use them. Your code size will shrink (good for performance) and your code will automatically speed up - I've seen speedups ranging from 10%-20% by just using the new instructions. I hope this helps, Rick -----Original Message----- From: alvin [mailto:alvin@iplink.net] Sent: Tuesday, July 24, 2001 8:58 PM To: axp-list@redhat.com Subject: Unaligned accesses I have noticed some problem with accessing unaligned data. I have an application that has a bunch of accesses to shorts in a byte array. Not seeing any more alignment errors from the kernel I assumed that all was ok due to the fact that althought it is a byte array it seemed to be short aligned... Well this turns out to be wrong. forcing alignment and doing memcpy's made my problems go away. I was under the impression that the: 1) OS/Palcode handled unaligned accessed as a fault and although there is a performance penalty that is all. 2) The kernel generated an error message for unaligned accesses. -- Alvin Starr || voice: (416)785-4051 Interlink Connectivity || fax: (416)785-3668 alvin@iplink.net || _______________________________________________ Axp-list mailing list Axp-list@redhat.com https://listman.redhat.com/mailman/listinfo/axp-list