diff mbox

pdp11: fix wrong code

Message ID 70885C3C-1D35-4F79-AD6D-E616917F5397@dell.com
State New
Headers show

Commit Message

Paul Koning Nov. 9, 2010, 1:11 a.m. UTC
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  <ni1d@arrl.net>

	* config/pdp11/pdp11.md (negsi2): Fix wrong code.
diff mbox

Patch

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 \"\";