From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2440 invoked by alias); 31 Jan 2003 04:54:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2431 invoked from network); 31 Jan 2003 04:54:32 -0000 Received: from unknown (HELO mail.cs.umass.edu) (128.119.243.168) by 172.16.49.205 with SMTP; 31 Jan 2003 04:54:32 -0000 Received: from localhost (IDENT:+OyRiDskIlpYrP270r8MhdB6b9nSUx3A@loki.cs.umass.edu [128.119.243.168]) by mail.cs.umass.edu (8.12.6/8.12.5) with ESMTP id h0V4sU1c000891; Thu, 30 Jan 2003 23:54:30 -0500 Date: Fri, 31 Jan 2003 04:54:00 -0000 Message-Id: <20030130.234517.112286807.kazu@cs.umass.edu> To: msnyder@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: Unreviewed patches From: Kazu Hirata In-Reply-To: <3E39E145.A5B01D17@redhat.com> References: <20030130.010258.25912168.kazu@cs.umass.edu> <3E39E145.A5B01D17@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checked: This message probably not SPAM X-Spam-Score: -3.4, Required: 5 X-Spam-Tests: IN_REP_TO X-Spam-Report: SPAM: -3.4 hits, 5 required; SPAM: * -3.4 -- Found a In-Reply-To header X-Scanned-By: MIMEDefang 2.26 (www . roaringpenguin . com / mimedefang) X-SW-Source: 2003-01/txt/msg00832.txt.bz2 Hi Michael, Thanks for reviewing the patches. > > [RFA] sim/h8300/h8300.c: Fix the handling of bxor. > > http://sources.redhat.com/ml/gdb-patches/2003-01/msg00328.html > > For this one, I find the expression "!!(ea & m)" a bit obscure. > How about "(ea & m) != 0)"? Sure. Does this mean the patch is OK to apply with your sugestion? > > [RFA] sim/h8300/compile.c: Fix the handling of extu.w. > > http://sources.redhat.com/ml/gdb-patches/2002-12/msg00685.html > > When you say "an 8-bit wide register that does not exist", > do you mean "that isn't simulated"? It seems to me that > the more correct solution is that breg[] is not big enough. > It ought to be at least 24 words, if not 32. Well, H8/300H and H8S have 8 32-bit registers, from er0 to er7. Each of them can be treated as two 16-bit wide registers. That is, er0 is split into e0 and r0. Furthermore, the lower half, r0, can be divided into two parts, r0h and r0l. The organization of one register looks like so: 31 24 23 16 15 8 7 0 +--------+--------+--------+--------+ | N/A | N/A | r0h | r0l | +--------+--------+--------+--------+ | e0 | r0 | +-----------------+-----------------+ | er0 | +-----------------------------------+ Now, "extu.w r0" zero-extends the value of r0l and stores the result to r0. The H8 simulator without my patch correctly handles this. A problem arises when the simulator sees "extu.w e0". The correct behavior is to zero-extend the lower half of e0 and store the result into e0. However, GET_B_REG in the simulator has no way to refer to the lower half of the e0. The real hardware does not even have this, so I decided to take e0 and clear the upper half of e0, which also works for "extu.w r0". Just take r0 and clear the upper half of r0. I hope this clarifies the motivation behind the patch. Regards, Kazu Hirata