Fix jump range checking in the addcmpb family of instructions.
authorDavid Given <dg@cowlark.com>
Wed, 26 Jun 2013 22:32:54 +0000 (23:32 +0100)
committerDavid Given <dg@cowlark.com>
Wed, 26 Jun 2013 22:32:54 +0000 (23:32 +0100)
--HG--
branch : dtrg-videocore

mach/vc4/as/mach5.c

index de2bda2..350806e 100644 (file)
@@ -394,7 +394,7 @@ static void branch_addcmp_common(quad opcode, int bits, struct expr_t* expr)
         d -= DOTGAIN;
     d /= 2;
 
-       if (!fitx(d, bits))
+       if ((pass == 2) && !fitx(d, bits))
                serror("target of branch is too far away");
 
        emit2(opcode | maskx(d, bits));