OSDN Git Service

[cgen]
authordj <dj>
Tue, 1 Jun 2010 22:06:50 +0000 (22:06 +0000)
committerdj <dj>
Tue, 1 Jun 2010 22:06:50 +0000 (22:06 +0000)
* cpu/xstormy16.cpu (movgriipostincgr, movgriipredecgr,
movfgriipredecgr): Fix increment/decrement amount.
[sid]
* xstormy16-sem.cxx: Regenerate.

cgen/ChangeLog
cgen/cpu/xstormy16.cpu
sid/component/cgen-cpu/xstormy16/ChangeLog
sid/component/cgen-cpu/xstormy16/xstormy16-sem.cxx

index cf93c47..9d98abf 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-28  DJ Delorie  <dj@redhat.com>
+
+       * cpu/xstormy16.cpu (movgriipostincgr, movgriipredecgr,
+       movfgriipredecgr): Fix increment/decrement amount.
+
 2010-02-12  Doug Evans  <dje@sebabeach.org>
 
        * iformat.scm (/sfmt-search-key): Use iformat key instead of list
index 1051850..8719717 100644 (file)
                   (set-alignfix-mem (add Rs imm12) Rdm)
                   (set (mem QI (add Rs imm12)) Rdm))
               (set-psw-nowrite (index-of Rdm) Rdm ws2)
-              (set Rs (add Rs 1)))
+              (set Rs (add Rs (add ws2 1))))
      ()
 )
 
      ("mov$ws2 (--$Rs,$imm12),$Rdm")
      (+ OP1_6 OP2A_A ws2 Rs OP4M_1 Rdm OP5_0 imm12)
      (sequence ()
-              (set Rs (sub Rs 1))
+              (set Rs (sub Rs (add ws2 1)))
               (set-psw-nowrite (index-of Rdm) Rdm ws2)
               (if ws2
                   (set-alignfix-mem (add Rs imm12) Rdm)
      ("movf$ws2 ($Rb,--$Rs,$imm12),$Rdm")
      (+ OP1_6 OP2A_E ws2 Rs OP4M_1 Rdm OP5A_0 Rb imm12)
      (sequence ()
-              (set Rs (sub Rs 1))
+              (set Rs (sub Rs (add ws2 1)))
               (set-psw-nowrite (index-of Rdm) Rdm ws2)
               (if ws2
                   (set (mem HI (and (add (join SI HI Rb Rs) imm12) #xFFFFFFFE)) Rdm)
index 4cc3b2f..b0e621f 100644 (file)
@@ -1,3 +1,7 @@
+2010-05-28  DJ Delorie  <dj@redhat.com>
+
+       * xstormy16-sem.cxx: Regenerate.
+
 2010-02-11  Doug Evans  <dje@sebabeach.org>
 
        * xstormy16-decode.cxx, * xstormy16-decode.h,
index b723516..84d22ac 100644 (file)
@@ -923,7 +923,7 @@ if (FLD (f_op2m)) {
   }
 }
   {
-    SI opval = ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), 1);
+    SI opval = ADDSI (current_cpu->h_gr_get (FLD (f_Rs)), ADDSI (FLD (f_op2m), 1));
     if (UNLIKELY(current_cpu->trace_result_p))
       current_cpu->trace_stream << "gr" << '[' << FLD (f_Rs) << ']' << ":=0x" << hex << opval << dec << "  ";
     current_cpu->h_gr_set (FLD (f_Rs), opval);
@@ -948,7 +948,7 @@ xstormy16_sem_movgriipredecgr (xstormy16_cpu* current_cpu, xstormy16_scache* sem
 
 {
   {
-    SI opval = SUBSI (current_cpu->h_gr_get (FLD (f_Rs)), 1);
+    SI opval = SUBSI (current_cpu->h_gr_get (FLD (f_Rs)), ADDSI (FLD (f_op2m), 1));
     if (UNLIKELY(current_cpu->trace_result_p))
       current_cpu->trace_stream << "gr" << '[' << FLD (f_Rs) << ']' << ":=0x" << hex << opval << dec << "  ";
     current_cpu->h_gr_set (FLD (f_Rs), opval);
@@ -1778,7 +1778,7 @@ xstormy16_sem_movfgriipredecgr (xstormy16_cpu* current_cpu, xstormy16_scache* se
 
 {
   {
-    SI opval = SUBSI (current_cpu->h_gr_get (FLD (f_Rs)), 1);
+    SI opval = SUBSI (current_cpu->h_gr_get (FLD (f_Rs)), ADDSI (FLD (f_op2m), 1));
     if (UNLIKELY(current_cpu->trace_result_p))
       current_cpu->trace_stream << "gr" << '[' << FLD (f_Rs) << ']' << ":=0x" << hex << opval << dec << "  ";
     current_cpu->h_gr_set (FLD (f_Rs), opval);