* config/mips/pdp11.md (negsi2): Fix wrong code.
authorPaul Koning <ni1d@arrl.net>
Sun, 21 Nov 2010 16:55:51 +0000 (11:55 -0500)
committerPaul Koning <pkoning@gcc.gnu.org>
Sun, 21 Nov 2010 16:55:51 +0000 (11:55 -0500)
From-SVN: r167006

gcc/ChangeLog
gcc/config/pdp11/pdp11.md

index 09544e1..285c59c 100644 (file)
@@ -1,5 +1,9 @@
 2010-11-21  Paul Koning  <ni1d@arrl.net>
 
+       * config/mips/pdp11.md (negsi2): Fix wrong code.
+
+2010-11-21  Paul Koning  <ni1d@arrl.net>
+
        * config/mips/pdp11.c (pdp11_legitimate_address_p): New function.
        * config/mips/pdp11.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
 
index 6f76458..2d4eb8a 100644 (file)
   operands[1] = gen_rtx_REG (HImode, REGNO (operands[1]) + 1);
 
   output_asm_insn (\"com %0\", lateoperands);
-  output_asm_insn (\"neg %0\", operands);
+  output_asm_insn (\"com %0\", operands);
+  output_asm_insn (\"add $1, %0\", operands);
   output_asm_insn (\"adc %0\", lateoperands);
 
   return \"\";
 }
-  [(set_attr "length" "10")])
+  [(set_attr "length" "14")])
 
 (define_insn "neghi2"
   [(set (match_operand:HI 0 "nonimmediate_operand" "=rR,Q")