Commit e8375399 by Michael Meissner

Do cld before each string move/compare.

From-SVN: r2125
parent 7436f435
...@@ -3912,6 +3912,7 @@ ...@@ -3912,6 +3912,7 @@
{ {
rtx xops[2]; rtx xops[2];
output_asm_insn (\"cld\", operands);
if (GET_CODE (operands[2]) == CONST_INT) if (GET_CODE (operands[2]) == CONST_INT)
{ {
if (INTVAL (operands[2]) & ~0x03) if (INTVAL (operands[2]) & ~0x03)
...@@ -3989,6 +3990,7 @@ ...@@ -3989,6 +3990,7 @@
label = gen_label_rtx (); label = gen_label_rtx ();
output_asm_insn (\"cld\", operands);
output_asm_insn (AS2 (xor%B0,%0,%0), operands); output_asm_insn (AS2 (xor%B0,%0,%0), operands);
output_asm_insn (\"repz\;cmps%B2\", operands); output_asm_insn (\"repz\;cmps%B2\", operands);
output_asm_insn (\"je %l0\", &label); output_asm_insn (\"je %l0\", &label);
...@@ -4022,6 +4024,7 @@ ...@@ -4022,6 +4024,7 @@
xops[0] = gen_rtx (REG, QImode, 0); xops[0] = gen_rtx (REG, QImode, 0);
xops[1] = CONST0_RTX (QImode); xops[1] = CONST0_RTX (QImode);
output_asm_insn (\"cld\", operands);
output_asm_insn (AS2 (test%B0,%1,%0), xops); output_asm_insn (AS2 (test%B0,%1,%0), xops);
return \"repz\;cmps%B2\"; return \"repz\;cmps%B2\";
}") }")
...@@ -4183,6 +4186,7 @@ ...@@ -4183,6 +4186,7 @@
xops[0] = operands[0]; xops[0] = operands[0];
xops[1] = constm1_rtx; xops[1] = constm1_rtx;
output_asm_insn (\"cld\", operands);
output_asm_insn (AS2 (mov%L0,%1,%0), xops); output_asm_insn (AS2 (mov%L0,%1,%0), xops);
return \"repnz\;scas%B2\"; return \"repnz\;scas%B2\";
}") }")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment