OSDN Git Service

2006-03-29 Harry Hsin-Hua Pan <harry@andestech.com>
authorfche <fche>
Wed, 29 Mar 2006 21:21:10 +0000 (21:21 +0000)
committerfche <fche>
Wed, 29 Mar 2006 21:21:10 +0000 (21:21 +0000)
* arm7f.cxx (compute_operand2_immshift): Implement RRX.

sid/component/cgen-cpu/arm7t/ChangeLog
sid/component/cgen-cpu/arm7t/arm7f.cxx

index 70d0f23..4e76517 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-29  Harry Hsin-Hua Pan  <harry@andestech.com>
+
+       * arm7f.cxx (compute_operand2_immshift): Implement RRX.
+       
 2005-06-03  Jim Blandy  <jimb@redhat.com>
 
        * Makefile.in, aclocal.m4: Regenerated with Automake 1.9.5.
index 9062647..821ac8b 100644 (file)
@@ -1443,7 +1443,11 @@ arm7f_cpu::compute_operand2_immshift (SI rm, int type, int shift)
     case SHIFT_TYPE_LSL : return rm << shift;
     case SHIFT_TYPE_LSR : return (USI) rm >> shift;
     case SHIFT_TYPE_ASR : return rm >> shift;
-    case SHIFT_TYPE_ROR : return RORSI (rm, shift);
+    case SHIFT_TYPE_ROR : 
+      if (shift == 0) // it is RRX
+        return ((USI)rm >> 1) | ((USI)this->hardware.h_cbit << 31);
+      else
+        return RORSI (rm, shift);
     }
   abort();
 }