This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix for immediate AND operation with EXR register of H8S


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]