From patchwork Thu Nov 3 18:36:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 123491 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 ADB63B6F76 for ; Fri, 4 Nov 2011 05:43:33 +1100 (EST) Received: (qmail 5616 invoked by alias); 3 Nov 2011 18:43:30 -0000 Received: (qmail 5606 invoked by uid 22791); 3 Nov 2011 18:43:29 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MEDICAL_SUBJECT, RCVD_IN_DNSWL_LOW, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-gy0-f175.google.com (HELO mail-gy0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Nov 2011 18:43:15 +0000 Received: by gyh4 with SMTP id 4so396452gyh.20 for ; Thu, 03 Nov 2011 11:43:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.136.70 with SMTP id v46mr14678407yhi.114.1320345373997; Thu, 03 Nov 2011 11:36:13 -0700 (PDT) Received: by 10.147.114.16 with HTTP; Thu, 3 Nov 2011 11:36:13 -0700 (PDT) Date: Thu, 3 Nov 2011 19:36:13 +0100 Message-ID: Subject: [PATCH, i386]: Use operands[N] consistently in i386.md From: Uros Bizjak To: gcc-patches@gcc.gnu.org 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 Hello! For some reason, several expanders use operandN internal variable instead of operands[N] from the array. Attached patch fixes this oversight. 2011-11-03 Uros Bizjak * config/i386/i386.md (lround2, rint2, floor2, lfloor2, btrunc2, lwp_lwpval3): Use operands[N] instead of operandN. Tested on x86_64-pc-linux-gnu, committed to mainline. Similar patch will be committed to 4.6 branch. Uros. Index: i386.md =================================================================== --- i386.md (revision 180832) +++ i386.md (working copy) @@ -14663,7 +14663,7 @@ else if (optimize_insn_for_size_p ()) FAIL; else - ix86_expand_rint (operand0, operand1); + ix86_expand_rint (operands[0], operands[1]); } else { @@ -14863,7 +14863,7 @@ && mode != HImode && ((mode != DImode) || TARGET_64BIT) && !flag_trapping_math && !flag_rounding_math) - ix86_expand_lround (operand0, operand1); + ix86_expand_lround (operands[0], operands[1]); else ix86_emit_i387_round (operands[0], operands[1]); DONE; @@ -14939,9 +14939,9 @@ else if (optimize_insn_for_size_p ()) FAIL; else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_floorceil (operand0, operand1, true); + ix86_expand_floorceil (operands[0], operands[1], true); else - ix86_expand_floorceildf_32 (operand0, operand1, true); + ix86_expand_floorceildf_32 (operands[0], operands[1], true); } else { @@ -15123,7 +15123,7 @@ { if (TARGET_64BIT && optimize_insn_for_size_p ()) FAIL; - ix86_expand_lfloorceil (operand0, operand1, true); + ix86_expand_lfloorceil (operands[0], operands[1], true); DONE; }) @@ -15197,9 +15197,9 @@ else if (optimize_insn_for_size_p ()) FAIL; else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_floorceil (operand0, operand1, false); + ix86_expand_floorceil (operands[0], operands[1], false); else - ix86_expand_floorceildf_32 (operand0, operand1, false); + ix86_expand_floorceildf_32 (operands[0], operands[1], false); } else { @@ -15379,7 +15379,7 @@ "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH && !flag_trapping_math" { - ix86_expand_lfloorceil (operand0, operand1, false); + ix86_expand_lfloorceil (operands[0], operands[1], false); DONE; }) @@ -15453,9 +15453,9 @@ else if (optimize_insn_for_size_p ()) FAIL; else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_trunc (operand0, operand1); + ix86_expand_trunc (operands[0], operands[1]); else - ix86_expand_truncdf_32 (operand0, operand1); + ix86_expand_truncdf_32 (operands[0], operands[1]); } else { @@ -18106,7 +18106,7 @@ UNSPECV_LWPVAL_INTRINSIC)] "TARGET_LWP" ;; Avoid unused variable warning. - "(void) operand0;") + "(void) operands[0];") (define_insn "*lwp_lwpval3_1" [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")