From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26774 invoked by alias); 27 Jul 2005 19:14:28 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 26760 invoked by uid 22791); 27 Jul 2005 19:14:24 -0000 Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 27 Jul 2005 19:14:24 +0000 Received: from specifix.com (duck.corp.specifix.com [192.168.1.1]) by duck.specifix.com (Postfix) with ESMTP id 7C2AF69C7; Wed, 27 Jul 2005 12:14:21 -0700 (PDT) Message-ID: <42E7DD0D.9050201@specifix.com> Date: Wed, 27 Jul 2005 19:14:00 -0000 From: James E Wilson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040114 MIME-Version: 1.0 To: Liu Haibin Cc: gcc@gcc.gnu.org Subject: Re: how to write a define_peephole2 that uses custom registers in nios2 References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-07/txt/msg01146.txt.bz2 Liu Haibin wrote: > (match_operand:SI 2 "register_operand" "r") > But the problem is it uses normal register, like r8, r9. How can I > write the define_peephole2 so that it uses custom registers? See the "Constraints" section of the documentation. "r" means a general register. If you want a custom register, then you need to use a contraint letter that maps to a custom register. If the port does not already support custom registers, then you need to modify many of the register allocation related macros to add support for the custom registers. See the "Registers" and "Register Classes" sections of the documentation. -- Jim Wilson, GNU Tools Support, http://www.specifix.com