From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6094 invoked by alias); 27 Jun 2005 15:30:28 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 6048 invoked by uid 22791); 27 Jun 2005 15:30:20 -0000 Received: from thelemkes.ca (HELO shoal.thelemkes.ca) (66.96.18.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 27 Jun 2005 15:30:20 +0000 Received: from [192.168.62.32] (keel.thelemkes.ca [192.168.62.32]) by shoal.thelemkes.ca (Postfix) with ESMTP id 5663320149; Mon, 27 Jun 2005 11:30:12 -0400 (EDT) Subject: Re: expanding builtins From: James Lemke To: Jakub Jelinek Cc: gcc@gcc.gnu.org In-Reply-To: <20050627142632.GG7663@sunsite.mff.cuni.cz> References: <1119881510.29036.29.camel@keel.thelemkes.ca> <20050627142632.GG7663@sunsite.mff.cuni.cz> Content-Type: text/plain Message-Id: <1119886211.29036.46.camel@keel.thelemkes.ca> Mime-Version: 1.0 Date: Mon, 27 Jun 2005 15:30:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg01058.txt.bz2 > You can: > #include > ... > extern __typeof(memcpy) my_memcpy __asm ("memcpy"); > > and use my_memcpy instead of memcpy in the place where you want to force > library call. Thanks Jakub! That worked very well. Jim. > Or you can use memcpy builtin, just tell GCC it should forget everything > it knows about alignment of whatever you know is not aligned. > void *psrc = (void *) src; > __asm ("" : "+r" (psrc)); > memcpy (dest, psrc, len); -- James Lemke jim@TheLemkes.ca Orillia, Ontario 1992 ST1100, STOC #3750; FWD# M:245401 H:246889 Life is what happens while you're busy making other plans. --John Lennon