From patchwork Sun Nov 21 16:57:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Koning X-Patchwork-Id: 72446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 97931B7153 for ; Mon, 22 Nov 2010 03:57:30 +1100 (EST) Received: (qmail 30542 invoked by alias); 21 Nov 2010 16:57:27 -0000 Received: (qmail 30534 invoked by uid 22791); 21 Nov 2010 16:57:26 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 21 Nov 2010 16:57:21 +0000 X-Loopcount0: from 10.152.240.141 From: Paul Koning Subject: [PATCH] pdp11: fix wrong code Date: Sun, 21 Nov 2010 11:57:19 -0500 Message-Id: <849AE7BD-B6DC-4BAF-A05C-3C60793F79BF@dell.com> To: gcc-patches Mime-Version: 1.0 (Apple Message framework v1081) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch corrects mishandling the carry between words in negsi. Tested by build and make check. Committed. paul ChangeLog: 2010-11-21 Paul Koning * config/mips/pdp11.md (negsi2): Fix wrong code. Index: config/pdp11/pdp11.md =================================================================== --- config/pdp11/pdp11.md (revision 166978) +++ config/pdp11/pdp11.md (working copy) @@ -1149,12 +1149,13 @@ 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")