From: Alexey Brodkin Date: Tue, 3 Feb 2015 13:58:09 +0300 Subject: [U-Boot] [PATCH 01/12] arc: memcmp - fix zero-delay loop utilization In-Reply-To: <1422961100-1618-1-git-send-email-abrodkin@synopsys.com> References: <1422961100-1618-1-git-send-email-abrodkin@synopsys.com> Message-ID: <1422961100-1618-2-git-send-email-abrodkin@synopsys.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Igor Guryanov It's prohibited to put branch instruction in the very end of zero-delay loop. On execution this causes "Illegal instruction" exception. Signed-off-by: Alexey Brodkin Signed-off-by: Igor Guryanov --- arch/arc/lib/memcmp.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arc/lib/memcmp.S b/arch/arc/lib/memcmp.S index fa5aac5..87bccab 100644 --- a/arch/arc/lib/memcmp.S +++ b/arch/arc/lib/memcmp.S @@ -29,6 +29,7 @@ memcmp: ld.a %r4, [%r0, 8] ld.a %r5, [%r1, 8] brne WORD2, %r12, .Lodd + nop .Loop_end: asl_s SHIFT, SHIFT, 3 bhs_s .Last_cmp @@ -105,6 +106,7 @@ memcmp: ldb.a %r4, [%r0, 2] ldb.a %r5, [%r1, 2] brne %r3, %r12, .Lbyte_odd + nop .Lbyte_end: bcc .Lbyte_even brne %r4, %r5, .Lbyte_even -- 2.1.0