]> git.lizzy.rs Git - plan9front.git/commitdiff
7c: don't emit SXTW for non-register source operand
authorcinap_lenrek <cinap_lenrek@felloff.net>
Thu, 25 Apr 2019 17:44:16 +0000 (19:44 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Thu, 25 Apr 2019 17:44:16 +0000 (19:44 +0200)
sys/src/cmd/7c/txt.c

index 96a9eaf86776d754c685bb76417b01ffac2e8e9d..8aa7d1630d8d60ad36e4077f1a202505189f2694 100644 (file)
@@ -764,7 +764,7 @@ gmove(Node *f, Node *t)
                        if(typeu[ft])
                                a = AMOVWU;
                        else
-                               a = ASXTW;
+                               a = (f->op == OREGISTER) ? ASXTW : AMOVW;
                        break;
                }
                break;