From eeb513ba31b9f1237b99a59ed3d74d7d985de478 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 27 Jun 2006 03:35:42 +0000 Subject: blackfin needs NOPs after the loop end when the last statement in the loop is an if/jump --- libc/string/bfin/memchr.S | 2 +- libc/string/bfin/strcmp.S | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/string/bfin') diff --git a/libc/string/bfin/memchr.S b/libc/string/bfin/memchr.S index 6ecaf37a1..23626d6a4 100644 --- a/libc/string/bfin/memchr.S +++ b/libc/string/bfin/memchr.S @@ -37,8 +37,8 @@ byte_loop_s: R3 = B[P0++](Z); CC = R3 == R1; IF CC JUMP found; - NOP; byte_loop_e: + NOP; failed: R0=0; diff --git a/libc/string/bfin/strcmp.S b/libc/string/bfin/strcmp.S index 6365024ec..823fb16b5 100644 --- a/libc/string/bfin/strcmp.S +++ b/libc/string/bfin/strcmp.S @@ -65,6 +65,7 @@ beginloop: cc |= az; // true if either is zero if cc jump zero4; // leave if a zero somewhere endloop: + NOP; cc = r1 == r2; // loop exits @@ -103,6 +104,7 @@ beginloop1: cc &= an; if !cc jump exitloop1; endloop1: + NOP; r2 = B[p2++] (Z); exitloop1: // here means we found a zero or a difference. -- cgit v1.2.3