From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15992 invoked by alias); 18 Jul 2006 16:46:07 -0000 Received: (qmail 15983 invoked by uid 22791); 18 Jul 2006 16:46:06 -0000 X-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO,RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL,TW_CP X-Spam-Check-By: sourceware.org Received: from cpc3-cmbg5-0-0-cust54.cmbg.cable.ntl.com (HELO jifvik.dyndns.org) (81.101.128.55) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Jul 2006 16:46:03 +0000 Received: from [192.168.7.9] (unknown [82.152.158.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jifvik.dyndns.org (Postfix) with ESMTP id 0334D400E; Tue, 18 Jul 2006 17:45:59 +0100 (BST) Message-ID: <44BD1047.8060507@jifvik.org> Date: Tue, 18 Jul 2006 16:46:00 -0000 From: Jonathan Larmour User-Agent: Thunderbird 1.5.0.4 (X11/20060614) MIME-Version: 1.0 To: Gerster Jochen-B01096 Cc: ecos-patches@ecos.sourceware.org Subject: Re: FW: eCos for MPC55xx References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2006-07/txt/msg00016.txt.bz2 Gerster Jochen-B01096 wrote: > > The problem is: The POWERPC gcc compiler (allocated from the ecos site) > optimize memcpy calls with small length, instead it uses its own inline > function without taking care of aligned access. If it did not work for unaligned accesses on PowerPC in general, then this would have been discovered years ago. Perhaps have the semantics of an opcode in the MPC55xx changed so that something that used to work for all PowerPC now only works on aligned addresses? If so that wouldn't be good, but it's not beyond the realms of possibility. > This is a very very big > problem using the TCP/IP stack because the IP-address is 4byte so the > gcc optimize and the offset of the IP-address in the different > protocol-headers varies. This ends in a exception :( > > So I asking me now: I'm the only one with this problem? How do you solve > this problem, perhaps a compiler flag? Theoretically -fno-builtin can be used to disable GCC's optimisations if they are genuinely at fault. But I'm not sure. Have you tried a small testcase? And if so have you looked at the assembler GCC is producing? Jifl -- --["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine