Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Nitin Yewale" <NitinY@KPITCummins.com>
To: <gdb-patches@sources.redhat.com>
Subject: [PATCH] Fix for immediate AND operation with EXR register of H8S
Date: Thu, 20 Nov 2003 09:24:00 -0000	[thread overview]
Message-ID: <69595093233BB547BB70CF5E492B63F202D241B7@sohm.kpit.com> (raw)

Hi,

	Immediate AND operation with exr register fails with H8 simulator.
	
	When I debug the following program compiled with the command line 
"h8300-elf-gcc test.c -ms -g " under gdb simulator it doesn't show the proper 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 *****************************/	

Please find below patch which fixes the same.

******************CHANGELOG TEXT********************************************
2003-11-20  Nitin Yewale  <NitinY@KPITCummins.com>
	* h8300/compile.c (sim_resume): Corrected ANDC operation on EXR for H8S	
****************************************************************************

--- 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 = h8_get_exr (sd);
+	      rd = h8_get_exr (sd);
 	    }
 	  else
 	    goto illegal;

Regards,
Nitin Yewale


                 reply	other threads:[~2003-11-20  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69595093233BB547BB70CF5E492B63F202D241B7@sohm.kpit.com \
    --to=nitiny@kpitcummins.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox