From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14497 invoked by alias); 11 Jul 2008 15:47:37 -0000 Received: (qmail 14487 invoked by uid 22791); 11 Jul 2008 15:47:37 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jul 2008 15:47:17 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id m6BFl1tI031750; Fri, 11 Jul 2008 16:47:01 +0100 Received: from smtp.corp.google.com (spacemonkey1.corp.google.com [192.168.120.115]) by wpaz33.hot.corp.google.com with ESMTP id m6BFku2C002630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 11 Jul 2008 08:46:57 -0700 Received: from localhost.localdomain.google.com (user-64-9-234-133.googlewifi.com [64.9.234.133]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id m6BFkrsT011110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 11 Jul 2008 08:46:53 -0700 To: "Ruan Beihong" Cc: gcc-help@gcc.gnu.org Subject: Re: How to write this insn define? References: From: Ian Lance Taylor Date: Sat, 12 Jul 2008 02:14:00 -0000 In-Reply-To: (Ruan Beihong's message of "Thu\, 10 Jul 2008 08\:41\:06 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg00151.txt.bz2 "Ruan Beihong" writes: > There is a instruction: > mult rega,regb,regc > Lower 32-bit of sign-extended regb is multiplied by lower 32-bit of > sign-extended regc, and the lower 32-bit of product then sign-extends > to 64-bit and stores in rega. > How to write a (define_insn ) to describe this instruction? Something like this seems about right: (set (match_operand:DI 0 "register_operand" "constraints") (sign_extend:DI (mult:SI (match_operand:SI 1 "register_operand" "constraints") (match_operand:SI 2 "register_operand" "constraints")))) Ian