]> Cypherpunks repositories - gostls13.git/commitdiff
8l: add AIMULW
authorRuss Cox <rsc@golang.org>
Sat, 6 Jun 2009 06:52:43 +0000 (23:52 -0700)
committerRuss Cox <rsc@golang.org>
Sat, 6 Jun 2009 06:52:43 +0000 (23:52 -0700)
R=ken
OCL=29972
CL=29972

src/cmd/8l/span.c

index 6adf5295abb0b35e2979ba329db1169047f450f3..50b5bc0f8bb8728ede67af9297a5ffba906a09a4 100644 (file)
@@ -823,6 +823,7 @@ uchar       ymovtab[] =
        ASHRL,  Ycol,   Yml,    6,      0xac,0xad,0,0,
 
 /* extra imul */
+       AIMULW, Yml,    Yrl,    7,      Pq,0xaf,0,0,
        AIMULL, Yml,    Yrl,    7,      Pm,0xaf,0,0,
        0
 };
@@ -1281,7 +1282,11 @@ mfound:
                break;
 
        case 7: /* imul rm,r */
-               *andptr++ = t[4];
+               if(t[4] == Pq) {
+                       *andptr++ = Pe;
+                       *andptr++ = Pm;
+               } else
+                       *andptr++ = t[4];
                *andptr++ = t[5];
                asmand(&p->from, reg[p->to.type]);
                break;