From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10698 invoked by alias); 20 Jul 2011 15:35:00 -0000 Received: (qmail 10614 invoked by uid 22791); 20 Jul 2011 15:34:58 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jul 2011 15:34:43 +0000 Received: (qmail 28282 invoked from network); 20 Jul 2011 15:34:42 -0000 Received: from unknown (HELO ?192.168.0.100?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2011 15:34:42 -0000 Message-ID: <4E26F58C.8070306@codesourcery.com> Date: Wed, 20 Jul 2011 16:03:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Tom Tromey CC: Matt Rice , gdb-patches@sourceware.org Subject: Re: [patch] bfin: swapped args in bfin_extract_return_value? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00540.txt.bz2 On 07/20/2011 09:59 PM, Tom Tromey wrote: > I think this change is good, but I don't understand why this function > even calls store_unsigned_integer. I thought > regcache_cooked_read_unsigned did that for you. regcache_cooked_read_unsigned and store_unsigned_integer can be replaced by regcache_cooked_read, IIUC. However, in the last iteration of loop, the size of data might not be 4, so we may have to use regcache_cooked_read_part and consider different data layout related to endianess. Looks like current approach doesn't have to worry about this problem. -- Yao (齐尧)