Update the RX simulator to handle the latest opcode types.
authorNick Clifton <nickc@redhat.com>
Tue, 10 Nov 2015 16:07:17 +0000 (16:07 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 10 Nov 2015 16:08:35 +0000 (16:08 +0000)
* 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.
(N_MAP): Increase to 90.

sim/rx/ChangeLog
sim/rx/rx.c

index 762815d6588a42c16dc0655bb4563eb417f48d31..15bc12f45adf7ce883f3b38886ecb8e8f0012ca4 100644 (file)
@@ -1,3 +1,12 @@
+2015-11-10  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.
+       (N_MAP): Increase to 90.
+
 2015-06-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.ac (AC_ARG_ENABLE(cycle-accurate)): Call AS_HELP_STRING.
index 31c14436eb8ce81587512724c50375c644b05f06..e48f6c821d8880fa618a9f5b48e0f125b31ce597 100644 (file)
@@ -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",
@@ -149,7 +153,7 @@ static const char * optype_names[] = {
 
 #define N_RXO (sizeof(id_names)/sizeof(id_names[0]))
 #define N_RXT (sizeof(optype_names)/sizeof(optype_names[0]))
-#define N_MAP 30
+#define N_MAP 90
 
 static unsigned long long benchmark_start_cycle;
 static unsigned long long benchmark_end_cycle;
@@ -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;
 
This page took 0.027282 seconds and 4 git commands to generate.