Commit 783cdf65 by James Van Artsdalen

(cmpstrsi): Rewrite expander to handle operands correctly.

From-SVN: r2060
parent 8888fada
...@@ -3938,20 +3938,28 @@ ...@@ -3938,20 +3938,28 @@
(define_expand "cmpstrsi" (define_expand "cmpstrsi"
[(parallel [(set (match_operand:QI 0 "general_operand" "") [(parallel [(set (match_operand:QI 0 "general_operand" "")
(compare:CC (compare:CC (match_operand:BLK 1 "general_operand" "")
(mem:BLK (match_operand:BLK 1 "address_operand" "")) (match_operand:BLK 2 "general_operand" "")))
(mem:BLK (match_operand:BLK 2 "address_operand" ""))))
(use (match_operand:SI 3 "general_operand" "")) (use (match_operand:SI 3 "general_operand" ""))
(use (match_operand:SI 4 "immediate_operand" "")) (use (match_operand:SI 4 "immediate_operand" ""))
(clobber (match_dup 1)) (clobber (match_dup 5))
(clobber (match_dup 2)) (clobber (match_dup 6))
(clobber (match_dup 3))])] (clobber (match_dup 3))])]
"" ""
" "
{ {
operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); rtx addr1, addr2;
operands[2] = copy_to_mode_reg (SImode, XEXP (operands[2], 0));
addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
addr2 = copy_to_mode_reg (Pmode, XEXP (operands[2], 0));
operands[3] = copy_to_mode_reg (SImode, operands[3]); operands[3] = copy_to_mode_reg (SImode, operands[3]);
operands[5] = addr1;
operands[6] = addr2;
operands[1] = gen_rtx (MEM, BLKmode, addr1);
operands[2] = gen_rtx (MEM, BLKmode, addr2);
}") }")
;; memcmp recognizers. The `cmpsb' opcode does nothing if the count is ;; memcmp recognizers. The `cmpsb' opcode does nothing if the count is
......
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