summaryrefslogtreecommitdiff
path: root/utils/qc/swt.c
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2010-04-27 13:16:18 +0100
committerforsyth <forsyth@vitanuova.com>2010-04-27 13:16:18 +0100
commit983e672a40437a3c5dac0c6c4b929eef57e5f017 (patch)
tree35af731941c70ba169ae2be42126eb46eda22101 /utils/qc/swt.c
parentebd861fe7c7767f146017b35ca30bae1d39a0b26 (diff)
20100427-1316
Diffstat (limited to 'utils/qc/swt.c')
-rw-r--r--utils/qc/swt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/qc/swt.c b/utils/qc/swt.c
index 0170bad1..f0edacc8 100644
--- a/utils/qc/swt.c
+++ b/utils/qc/swt.c
@@ -1,6 +1,5 @@
#include "gc.h"
-int hasdoubled;
static int doubleflag;
void
@@ -370,12 +369,16 @@ zwrite(Biobuf *b, Prog *p, int sf, int st)
bf[0] = p->as;
bf[1] = p->as>>8;
bf[2] = p->reg;
+ if(p->from3.type != D_NONE)
+ bf[2] |= 0x40;
l = p->lineno;
bf[3] = l;
bf[4] = l>>8;
bf[5] = l>>16;
bf[6] = l>>24;
bp = zaddr(bf+7, &p->from, sf);
+ if(bf[2] & 0x40)
+ bp = zaddr(bp, &p->from3, 0);
bp = zaddr(bp, &p->to, st);
Bwrite(b, bf, bp-bf);
}