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]

[RFA] h8-sim: shift variable


This allows shifts with the amount-to-shift in a register operand.

2003-06-18  Michael Snyder  <msnyder@redhat.com>

	* compile.c (sim_resume): Handle shll reg, reg and shlr reg, reg.

Index: compile.c
===================================================================
RCS file: /cvs/cvsfiles/devo/sim/h8sx/compile.c,v
retrieving revision 1.83
retrieving revision 1.85
diff -p -r1.83 -r1.85
*** compile.c	2003/06/19 01:40:53	1.83
--- compile.c	2003/07/02 19:09:27	1.85
*************** sim_resume (SIM_DESC sd, int step, int s
*** 3151,3160 ****
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (code->src.type == X (OP_IMM, SB))
  	    fetch (sd, &code->src, &ea);
- 	  else
- 	    ea = 1;
  
  	  if (code->opcode == O (O_SHLL, SB))
  	    {
--- 3153,3162 ----
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
! 	    ea = 1;		/* unary  op */
! 	  else			/* binary op */
  	    fetch (sd, &code->src, &ea);
  
  	  if (code->opcode == O (O_SHLL, SB))
  	    {
*************** sim_resume (SIM_DESC sd, int step, int s
*** 3175,3184 ****
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (code->src.type == X (OP_IMM, SW))
! 	    fetch (sd, &code->src, &ea);
  	  else
! 	    ea = 1;
  
  	  if (code->opcode == O (O_SHLL, SW))
  	    {
--- 3177,3186 ----
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
! 	    ea = 1;		/* unary  op */
  	  else
! 	    fetch (sd, &code->src, &ea);
  
  	  if (code->opcode == O (O_SHLL, SW))
  	    {
*************** sim_resume (SIM_DESC sd, int step, int s
*** 3199,3208 ****
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (code->src.type == X (OP_IMM, SL))
! 	    fetch (sd, &code->src, &ea);
  	  else
! 	    ea = 1;
  
  	  if (code->opcode == O (O_SHLL, SL))
  	    {
--- 3201,3210 ----
  	  if (fetch2 (sd, &code->dst, &rd))
  	    goto end;
  
! 	  if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
! 	    ea = 1;		/* unary  op */
  	  else
! 	    fetch (sd, &code->src, &ea);
  
  	  if (code->opcode == O (O_SHLL, SL))
  	    {

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