浏览代码

blackfin needs NOPs after the loop end when the last statement in the loop is an if/jump

Mike Frysinger 19 年之前
父节点
当前提交
eeb513ba31
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      libc/string/bfin/memchr.S
  2. 2 0
      libc/string/bfin/strcmp.S

+ 1 - 1
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;

+ 2 - 0
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.