RFA: RX: Add support for simulating the SATR insn

Nick Clifton nickc@redhat.com
Wed Jan 16 08:38:00 GMT 2013


Hi DJ,

  The RX simulator is currently missing support for the SATR
  instruction.  The patch below implements it.  OK to apply ?

Cheers
  Nick

sim/rx/ChangeLog
2013-01-16  Nick Clifton  <nickc@redhat.com>

	* rx.c (decode_opcode): Handle RXO_satr.

Index: sim/rx/rx.c
===================================================================
RCS file: /cvs/src/src/sim/rx/rx.c,v
retrieving revision 1.16
diff -u -3 -p -r1.16 rx.c
--- sim/rx/rx.c 1 Jan 2013 06:41:40 -0000       1.16
+++ sim/rx/rx.c 16 Jan 2013 08:37:09 -0000
@@ -1802,6 +1802,22 @@ decode_opcode ()
       E1;
       break;
 
+    case RXO_satr:
+      if (FLAG_O && ! FLAG_S)
+       {
+         regs.r[6] = 0x0;
+         regs.r[5] = 0x7fffffff;
+         regs.r[4] = 0xffffffff;
+       }
+      else if (FLAG_O && FLAG_S)
+       {
+         regs.r[6] = 0xffffffff;
+         regs.r[5] = 0x80000000;
+         regs.r[4] = 0x0;
+       }
+      E1;
+      break;
+      
     case RXO_sbb:
       MATH_OP (-, ! carry);
       break;



More information about the Gdb-patches mailing list