From patchwork Tue Nov 9 01:11:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: pdp11: fix wrong code From: Paul Koning X-Patchwork-Id: 70483 Message-Id: <70885C3C-1D35-4F79-AD6D-E616917F5397@dell.com> To: gcc-patches Date: Mon, 8 Nov 2010 20:11:33 -0500 This patch fixes wrong assembly output for negsi2 (incorrect carry propagation from low to high half). Tested by build and inspection of output. Committed. paul ChangeLog: 2010-11-08 Paul Koning * config/pdp11/pdp11.md (negsi2): Fix wrong code. Index: config/pdp11/pdp11.md =================================================================== --- config/pdp11/pdp11.md (revision 166433) +++ config/pdp11/pdp11.md (working copy) @@ -1091,9 +1091,8 @@ lateoperands[1] = operands[1]; operands[1] = gen_rtx_REG (HImode, REGNO (operands[1]) + 1); - output_asm_insn (\"com %0\", operands); output_asm_insn (\"com %0\", lateoperands); - output_asm_insn (\"inc %0\", operands); + output_asm_insn (\"neg %0\", operands); output_asm_insn (\"adc %0\", lateoperands); return \"\";