public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* RFA: RX sim: Add support for new operand types.
@ 2015-11-09 16:07 Nick Clifton
  2015-11-09 19:21 ` DJ Delorie
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2015-11-09 16:07 UTC (permalink / raw)
  To: dj; +Cc: gdb-patches

Hi DJ,

  A couple of recent patches to the RX disassembler have created some
  new operand types.  Unfortunately I forgot to add these types to the
  RX simulator, which consequently broke.  So here is a patch to add
  them.

  OK to apply ?

Cheers
  Nick

sim/rx/ChangeLog
2015-11-09  Nick Clifton  <nickc@redhat.com>

	* rx.c (id_names): Add nop4, nop5, nop6 and nop7.
	(decode_opcode): Likewise.
	(get_op): Handle RX_Operand_Zero_Indirect.
	Handle RX_Bad_Size and RX_MAX_SIZE.
	(put_op): Likewise.

diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 31c1443..a4768f9 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -80,6 +80,10 @@ static const char * id_names[] = {
   "RXO_nop",
   "RXO_nop2",
   "RXO_nop3",
+  "RXO_nop4",
+  "RXO_nop5",
+  "RXO_nop6",
+  "RXO_nop7",
 
   "RXO_scmpu",
   "RXO_smovu",
@@ -406,6 +410,7 @@ get_op (const RX_Opcode_Decoded *rd, int i)
       put_reg (o->reg, get_reg (o->reg) - size2bytes[o->size]);
       /* fall through */
     case RX_Operand_Postinc:	/* [Rn+] */
+    case RX_Operand_Zero_Indirect:	/* [Rn + 0] */
     case RX_Operand_Indirect:	/* [Rn + addend] */
     case RX_Operand_TwoReg:	/* [Rn + scale * R2] */
 #ifdef CYCLE_ACCURATE
@@ -433,6 +438,7 @@ get_op (const RX_Opcode_Decoded *rd, int i)
 
       switch (o->size)
 	{
+	default:
 	case RX_AnySize:
 	  rx_abort ();
 
@@ -473,6 +479,7 @@ get_op (const RX_Opcode_Decoded *rd, int i)
      to the size.  */
   switch (o->size)
     {
+    default:
     case RX_AnySize:
       rx_abort ();
 
@@ -518,6 +525,7 @@ put_op (const RX_Opcode_Decoded *rd, int i, int v)
 
   switch (o->size)
     {
+    default:
     case RX_AnySize:
       if (o->type != RX_Operand_Register)
 	rx_abort ();
@@ -574,6 +582,7 @@ put_op (const RX_Opcode_Decoded *rd, int i, int v)
       put_reg (o->reg, get_reg (o->reg) - size2bytes[o->size]);
       /* fall through */
     case RX_Operand_Postinc:	/* [Rn+] */
+    case RX_Operand_Zero_Indirect:	/* [Rn + 0] */
     case RX_Operand_Indirect:	/* [Rn + addend] */
     case RX_Operand_TwoReg:	/* [Rn + scale * R2] */
 
@@ -597,6 +606,7 @@ put_op (const RX_Opcode_Decoded *rd, int i, int v)
 
       switch (o->size)
 	{
+	default:
 	case RX_AnySize:
 	  rx_abort ();
 
@@ -1504,6 +1514,10 @@ decode_opcode ()
     case RXO_nop:
     case RXO_nop2:
     case RXO_nop3:
+    case RXO_nop4:
+    case RXO_nop5:
+    case RXO_nop6:
+    case RXO_nop7:
       E1;
       break;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFA: RX sim: Add support for new operand types.
  2015-11-09 16:07 RFA: RX sim: Add support for new operand types Nick Clifton
@ 2015-11-09 19:21 ` DJ Delorie
  0 siblings, 0 replies; 2+ messages in thread
From: DJ Delorie @ 2015-11-09 19:21 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gdb-patches


> sim/rx/ChangeLog
> 2015-11-09  Nick Clifton  <nickc@redhat.com>
> 
> 	* rx.c (id_names): Add nop4, nop5, nop6 and nop7.
> 	(decode_opcode): Likewise.
> 	(get_op): Handle RX_Operand_Zero_Indirect.
> 	Handle RX_Bad_Size and RX_MAX_SIZE.
> 	(put_op): Likewise.

Ok.  Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-09 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 16:07 RFA: RX sim: Add support for new operand types Nick Clifton
2015-11-09 19:21 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).