From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18817 invoked by alias); 20 Nov 2003 09:24:43 -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 18805 invoked from network); 20 Nov 2003 09:24:38 -0000 Received: from unknown (HELO sohm.kpit.com) (203.129.230.82) by sources.redhat.com with SMTP; 20 Nov 2003 09:24:38 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [PATCH] Fix for immediate AND operation with EXR register of H8S Date: Thu, 20 Nov 2003 09:24:00 -0000 Message-ID: <69595093233BB547BB70CF5E492B63F202D241B7@sohm.kpit.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Nitin Yewale" To: X-SW-Source: 2003-11/txt/msg00419.txt.bz2 Hi, Immediate AND operation with exr register fails with H8 simulator. =09 When I debug the following program compiled with the command line=20 "h8300-elf-gcc test.c -ms -g " under gdb simulator it doesn't show the prop= er result. /***************************** Start of test.s ****************************= */ int main () { asm ("mov #0x07, r0"); asm ("ldc r0l, exr"); asm ("andc #0x89, exr"); return 1; } /***************************** End of test.c *****************************/= =09 Please find below patch which fixes the same. ******************CHANGELOG TEXT******************************************** 2003-11-20 Nitin Yewale * h8300/compile.c (sim_resume): Corrected ANDC operation on EXR for H8S=09 **************************************************************************** --- sim/h8300/compile.c.orig 2003-10-17 18:15:56.000000000 +0530 +++ sim/h8300/compile.c 2003-11-19 16:40:42.000000000 +0530 @@ -2566,7 +2566,7 @@ sim_resume (SIM_DESC sd, int step, int s { if (h8300smode) h8_set_exr (sd, (trace << 7) | intMask); - res =3D h8_get_exr (sd); + rd =3D h8_get_exr (sd); } else goto illegal; Regards, Nitin Yewale