some minor fixes
authorceriel <none@none>
Mon, 11 Apr 1988 11:41:50 +0000 (11:41 +0000)
committerceriel <none@none>
Mon, 11 Apr 1988 11:41:50 +0000 (11:41 +0000)
mach/i86/as/mach0.c
mach/i86/as/mach5.c

index b45cb62..59d58cf 100644 (file)
@@ -11,3 +11,6 @@
 #define        LISTING         /* enable listing facilities */
 #define RELOCATION     /* generate relocation info */
 #define DEBUG 0
+
+#undef valu_t
+#define valu_t long
index e3bf50a..4716c2e 100644 (file)
@@ -88,19 +88,18 @@ indexed() {
 
 branch(opc,exp) register opc; expr_t exp; {
        register sm,dist;
-       int saving;
+       int saving = opc == 0353 ? 1 : 3;
 
        dist = exp.val - (DOTVAL + 2);
        if (pass == PASS_2 && dist > 0 && !(exp.typ & S_DOT))
                dist -= DOTGAIN;
-       sm = fitb(dist);
+       sm = dist > 0 ? fitb(dist-saving) : fitb(dist);
        if ((exp.typ & ~S_DOT) != DOTTYP)
                sm = 0;
        if ((opc & 0370) == 0340) {
                fit(sm);
                sm = 1;
        } else {
-               saving = opc == 0353 ? 1 : 3;
                if ((sm = small(sm,saving)) == 0) {
                        if (opc != 0353) {
                                emit1(opc^1);