Must use VOID expression in VOID context.
authorDoug Evans <dje@google.com>
Sat, 14 Nov 2009 19:48:57 +0000 (19:48 +0000)
committerDoug Evans <dje@google.com>
Sat, 14 Nov 2009 19:48:57 +0000 (19:48 +0000)
* xc16x.cpu (mov4): Fix mode of `sequence'.
(mov9, mov10): Ditto.
(movbsrr, moveb1, jmprel, jmpseg, jmps): Fix mode of `if'.
(callr, callseg, calls, trap, rets, reti): Ditto.
(jb, jbc, jnb, jnbs): Fix mode of `if'.  Comment out no-op `sll'.
(atomic, extr, extp, extp1, extpg1, extpr, extpr1): Fix mode of `cond'.
(exts, exts1, extsr, extsr1, prior): Ditto.

cpu/ChangeLog
cpu/xc16x.cpu

index 432540fc0010206725a788d65dfd23cb57adb526..a627b44032d44ee29bb637fb4c929af19b67f58b 100644 (file)
@@ -1,3 +1,14 @@
+2009-11-14  Doug Evans  <dje@sebabeach.org>
+
+       Must use VOID expression in VOID context.
+       * xc16x.cpu (mov4): Fix mode of `sequence'.
+       (mov9, mov10): Ditto.
+       (movbsrr, moveb1, jmprel, jmpseg, jmps): Fix mode of `if'.
+       (callr, callseg, calls, trap, rets, reti): Ditto.
+       (jb, jbc, jnb, jnbs): Fix mode of `if'.  Comment out no-op `sll'.
+       (atomic, extr, extp, extp1, extpg1, extpr, extpr1): Fix mode of `cond'.
+       (exts, exts1, extsr, extsr1, prior): Ditto.
+
 2009-10-23  Doug Evans  <dje@sebabeach.org>
 
        * m32c.opc (opc.h): cgen-types.h -> cgen/basic-modes.h.
index efa687d2b9f03f550e1a1737a8189fc7533343fe..1d2057a6135637a1a499ae59885452a2d514311e 100644 (file)
        ((PIPE OS) (IDOC MOVE))
        (.str insn " [-$"op2 "],$"op1)
        (+ opc1 opc2 op1 op2)
-       (sequence HI ()
+       (sequence ()
          (set op1 (sub op2 (const HI 2)))
          (set HI (mem HI op2) op1)
        )
        ((PIPE OS) (IDOC MOVE))
        (.str insn " $"op1 ",[$"op2"+$hash$"uimm16"]")
        (+ opc1 opc2 op1 op2 uimm16)
-       (sequence mode ((mode tmp1))
+       (sequence ((mode tmp1))
           (set mode tmp1 (add HI op2 uimm16))
           (set mode op1 (mem HI tmp1))
        )
        ((PIPE OS) (IDOC MOVE))
        (.str insn " [$"op2"+$hash$"uimm16 "],$"op1)
        (+ opc1 opc2 op1 op2 uimm16)
-       (sequence mode ((mode tmp1))
+       (sequence ((mode tmp1))
           (set mode tmp1 (add HI op1 uimm16))
           (set mode (mem HI tmp1) op1)
        )
      "movbs $sr,$drb"
      (+ OP1_13 OP2_0 drb sr)
      (sequence ()
-         (if QI (and QI drb (const 128))
-                (set HI sr (or HI (const HI 65280) drb)))
+         (if (and QI drb (const 128))
+            (set HI sr (or HI (const HI 65280) drb)))
          (set HI sr (and HI (const HI 255) drb)) 
      )
      ()
        (.str insn " $"op2 ",$"op1)
        (+ opc1 opc2 op1 op2)
        (sequence ()
-           (if QI (and QI op1 (const 128))
-                  (set HI op2 (or HI (const HI 65280) op1)))
+           (if (and QI op1 (const 128))
+              (set HI op2 (or HI (const HI 65280) op1)))
            (set HI op2 (and HI (const HI 255) op1)) 
        )
        ()
        (sequence ()
            (if (eq cond (const 1))
                (sequence ()
-                   (if QI (lt QI rel (const 0))
-                           (sequence ()
-                                ;; FIXME: (neg QI rel)
-                                ;; FIXME: (add QI rel (const 1))
-                                ;; FIXME: (mul QI rel (const 2))
-                                (set HI pc (sub HI pc rel))
-                           ))
+                   (if (lt QI rel (const 0))
+                       (sequence ()
+                                 ;; FIXME: (neg QI rel)
+                                 ;; FIXME: (add QI rel (const 1))
+                                 ;; FIXME: (mul QI rel (const 2))
+                                 (set HI pc (sub HI pc rel))
+                                 ))
                     (set HI pc (add HI pc (mul QI rel (const 2))))
                )
             )
      "jmps $hash$segm$useg8,$hash$sof$usof16"
      (+ OP1_15 OP2_10 seg usof16)
      (sequence ()
-          (if QI (eq BI sgtdisbit (const BI 0))
-                 (set QI (reg h-cr 10) useg8))
-                 (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+             (set QI (reg h-cr 10) useg8))
+         ;; FIXME: previous indentation suggested this nop was the `else'
+         ;; clause of the previous `if'.
+         (nop)
           (set HI pc usof16)
      )
      ()
      "jmps $seg,$caddr"
      (+ OP1_15 OP2_10 seg caddr)
      (sequence ()
-          (if QI (eq BI sgtdisbit (const BI 0))
-                 (set QI (reg h-cr 10) seg))
-                 (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+             (set QI (reg h-cr 10) seg))
+         ;; FIXME: previous indentation suggested this nop was the `else'
+         ;; clause of the previous `if'.
+         (nop)
           (set HI pc caddr)
      )
      ()
      (sequence ((HI tmp1) (HI tmp2))
           (set HI tmp1 genreg)
           (set HI tmp2 (const 1))
-          (sll HI tmp2 qlobit)
+          ;;(sll HI tmp2 qlobit) - FIXME: missing (set ...)
           (set HI tmp2 (and tmp1 tmp2))
-          (if (eq tmp2 (const 1))
+          (if (eq tmp2 (const 1)) ;; FIXME: (ne tmp2 0)?
              (sequence ()
-                (if QI (lt QI relhi (const 0))
-                       (set HI pc (add HI pc (mul QI relhi (const 2)))))
+                (if (lt QI relhi (const 0))
+                   (set HI pc (add HI pc (mul QI relhi (const 2)))))
              ))
-         (set HI pc (add HI pc (const 4))) 
+         (set HI pc (add HI pc (const 4))) ;; FIXME: Is this right?
      )
      ()
 )
      (sequence ((HI tmp1) (HI tmp2))
           (set HI tmp1 genreg)
           (set HI tmp2 (const 1))
-          (sll HI tmp2 qlobit)
+          ;;(sll HI tmp2 qlobit) - FIXME: missing (set ...)
           (set HI tmp2 (and tmp1 tmp2))
-          (if (eq tmp2 (const 1))
+          (if (eq tmp2 (const 1)) ;; FIXME: (ne tmp2 0)?
              (sequence ()
-                (if QI (lt QI relhi (const 0))
-                       (set tmp2 (const 1))
-                       (set tmp1 genreg)
-                       ;; FIXME: (sll tmp2 qlobit)
-                       ;; FIXME: (inv tmp2)
-                       (set HI tmp1(and tmp1 tmp2))
-                       (set HI genreg tmp1)
-                       (set HI pc (add HI pc (mul QI relhi (const 2)))))
+               ;; FIXME: The `else' clause has several statements.
+                (if (lt QI relhi (const 0))
+                   (set tmp2 (const 1))
+                   (set tmp1 genreg)
+                   ;; FIXME: (sll tmp2 qlobit)
+                   ;; FIXME: (inv tmp2)
+                   (set HI tmp1 (and tmp1 tmp2))
+                   (set HI genreg tmp1)
+                   (set HI pc (add HI pc (mul QI relhi (const 2)))))
              ))
-          (set HI pc (add HI pc (const 4)))
+          (set HI pc (add HI pc (const 4))) ;; FIXME: Is this right?
      )
      ()
 )
      (sequence ((HI tmp1) (HI tmp2))
           (set HI tmp1 genreg)
           (set HI tmp2 (const 1))
-          (sll HI tmp2 qlobit)
+          ;;(sll HI tmp2 qlobit) - FIXME: missing (set ...)
           (set HI tmp2 (and tmp1 tmp2))
-          (if (eq tmp2 (const 0))
+          (if (eq tmp2 (const 0)) ;; FIXME: (ne tmp2 0)?
              (sequence ()
-                (if QI (lt QI relhi (const 0))
-                       (set HI pc (add HI pc (mul QI relhi (const 2)))))
+                (if (lt QI relhi (const 0))
+                   (set HI pc (add HI pc (mul QI relhi (const 2)))))
              ))
-          (set HI pc (add HI pc (const 4)))
+          (set HI pc (add HI pc (const 4))) ;; FIXME: Is this right?
      )
      ()
 )
      (sequence ((HI tmp1) (HI tmp2))
           (set HI tmp1 genreg)
           (set HI tmp2 (const 1))
-          (sll HI tmp2 qlobit)
+          ;;(sll HI tmp2 qlobit) - FIXME: missing (set ...)
           (set HI tmp2 (and tmp1 tmp2))
           (if (eq tmp2 (const 0))
              (sequence ()
-                (if QI (lt QI relhi (const 0))
-                       (set tmp2 (const 1))
-                       (set tmp1 reg8)
-                       ;; FIXME: (sll tmp2 qbit)
-                       (set BI tmp1(or tmp1 tmp2))
-                       (set HI reg8 tmp1)
-                       (set HI pc (add HI pc (mul QI relhi (const 2)))))
+               ;; FIXME: The `else' clause has several statements.
+                (if (lt QI relhi (const 0))
+                   (set tmp2 (const 1))
+                   (set tmp1 reg8)
+                   ;; FIXME: (sll tmp2 qbit)
+                   (set BI tmp1(or tmp1 tmp2))
+                   (set HI reg8 tmp1)
+                   (set HI pc (add HI pc (mul QI relhi (const 2)))))
              ))
-          (set HI pc (add HI pc (const 4)))
+          (set HI pc (add HI pc (const 4))) ;; FIXME: Is this right?
      )
      ()
 )
           (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
          (set HI (mem HI (reg h-cr 9)) pc)
           (sequence ()
-                (if QI (lt QI rel (const 0))
-                       (sequence ()
-                           ;; FIXME: (neg QI rel)
-                           ;; FIXME: (add QI rel (const 1))
-                           ;; FIXME: (mul QI rel (const 2))
-                           (set HI pc (sub HI pc rel))
-                       ))
+                (if (lt QI rel (const 0))
+                   (sequence ()
+                             ;; FIXME: (neg QI rel)
+                             ;; FIXME: (add QI rel (const 1))
+                             ;; FIXME: (mul QI rel (const 2))
+                             (set HI pc (sub HI pc rel))
+                   ))
                 (set HI pc (add HI pc (mul QI rel (const 2))))
           )
       )
           (set HI (mem HI (reg h-cr 9)) (reg h-cr 10))
           (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
           (set HI (mem HI (reg h-cr 9)) pc)
-          (if QI (eq BI sgtdisbit (const BI 0))
-                 (set QI (reg h-cr 10) useg8))
-                 (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+             (set QI (reg h-cr 10) useg8))
+         ;; FIXME: previous indentation suggested this nop was the `else'
+         ;; clause of the previous `if'.
+         (nop)
           (set HI pc usof16)
      )
      ()
           (set HI (mem HI (reg h-cr 9)) (reg h-cr 10))
           (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
           (set HI (mem HI (reg h-cr 9)) pc)
-          (if QI (eq BI sgtdisbit (const BI 0))
-                 (set QI (reg h-cr 10) seg))
-                 (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+             (set QI (reg h-cr 10) seg))
+         ;; FIXME: previous indentation suggested this nop was the `else'
+         ;; clause of the previous `if'.
+         (nop)
           (set HI pc caddr)
      )
      ()
        (sequence ()
            (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
             (set HI (mem HI (reg h-cr 9)) (reg h-cr 4))
-              (if QI (eq BI sgtdisbit (const BI 0))
-                     (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
-                     (set HI (mem HI (reg h-cr 9)) (reg h-cr 10) )
-              )
-              (nop)
+           (if (eq BI sgtdisbit (const BI 0))
+               (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
+               (set HI (mem HI (reg h-cr 9)) (reg h-cr 10) )
+           )
+           (nop)
             (set HI (reg h-cr 10) (reg h-cr 11))
             (set (reg h-cr 9) (sub HI (reg h-cr 9) (const 2)))
             (set HI (mem HI (reg h-cr 9)) pc)
        (sequence ()
            (set HI pc (mem HI (reg h-cr 9)))
            (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
-              (if QI (eq BI sgtdisbit (const BI 0))
-                     (set HI (reg h-cr 10) (mem HI (reg h-cr 9)))
-              )
-              (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+              (set HI (reg h-cr 10) (mem HI (reg h-cr 9)))
+           )
+          (nop)
           (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
        )
        ()
        (sequence ()
            (set HI pc (mem HI (reg h-cr 9)))
            (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
-              (if QI (eq BI sgtdisbit (const BI 0))
-                  (sequence ()
-                       (set HI (reg h-cr 10) (mem HI (reg h-cr 9)))
-                       (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
-                  )
-              )
-              (nop)
+          (if (eq BI sgtdisbit (const BI 0))
+              (sequence ()
+                        (set HI (reg h-cr 10) (mem HI (reg h-cr 9)))
+                        (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
+               )
+           )
+          (nop)
            (set HI (reg h-cr 4) (mem HI (reg h-cr 9)))
           (set (reg h-cr 9) (add HI (reg h-cr 9) (const 2)))
        )
      (+ OP1_13 OP2_1 (f-op-lbit2 0) uimm2 (f-op-bit4 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_1 (f-op-lbit2 2) uimm2 (f-op-bit4 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_12 (f-op-lbit2 1) uimm2 sr)
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_7 (f-op-lbit2 1) uimm2 (f-op-bit4 0) pagenum (f-qlobit 0) (f-qlobit2 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_7 (f-op-lbit2 1) uimm2 (f-op-bit4 0) upag16 )
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_12 (f-op-lbit2 3) uimm2 sr)
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_7 (f-op-lbit2 3) uimm2 (f-op-bit4 0) pagenum (f-qlobit 0) (f-qlobit2 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_12 (f-op-lbit2 0) uimm2 sr)
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_7 (f-op-lbit2 0) uimm2 (f-op-bit4 0) seghi8 (f-op-bit8 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_12 (f-op-lbit2 2) uimm2 sr)
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
      (+ OP1_13 OP2_7 (f-op-lbit2 2) uimm2 (f-op-bit4 0) seghi8 (f-op-bit8 0))
      (sequence ((HI count))
          (set HI count uimm2)
-          (cond HI
+          (cond
            ((ne HI count (const 0))
            (sequence ()
               (set HI pc (add HI pc (const 2)))
          (set HI count (const 0))
          (set HI tmp1 sr)
          (set HI tmp2 (and tmp1 (const 32768)))
-          (cond HI
-           ((ne HI tmp2 (const 1)) (ne HI sr (const 0))
-              (sll HI tmp1 (const 1))
+          (cond
+           ((ne HI tmp2 (const 1)) ;;(ne HI sr (const 0)) - FIXME: and? or?
+              ;;(sll HI tmp1 (const 1)) - FIXME: missing (set ...)
                (set HI tmp2 (and tmp1 (const 32768)))
                (set HI count (add HI count (const 1)))
             )
This page took 0.031716 seconds and 4 git commands to generate.