From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24777 invoked by alias); 13 Jul 2006 12:45:43 -0000 Received: (qmail 24765 invoked by uid 22791); 13 Jul 2006 12:45:42 -0000 X-Spam-Check-By: sourceware.org Received: from anchor-post-30.mail.demon.net (HELO anchor-post-30.mail.demon.net) (194.217.242.88) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Jul 2006 12:45:39 +0000 Received: from aph.demon.co.uk ([80.177.99.144] helo=mammoth.littlepinkcloud.com) by anchor-post-30.mail.demon.net with esmtp (Exim 4.42) id 1G10ZG-000Nmq-26 for gcc-help@gcc.gnu.org; Thu, 13 Jul 2006 12:45:27 +0000 Received: from zebedee.littlepinkcloud.COM (zebedee.pink [10.0.0.17]) by mammoth.littlepinkcloud.com (8.12.11.20060308/8.12.11) with ESMTP id k6DCjM70019154 for ; Thu, 13 Jul 2006 13:45:22 +0100 Received: from zebedee.littlepinkcloud.COM (localhost.localdomain [127.0.0.1]) by zebedee.littlepinkcloud.COM (8.13.6/8.13.5) with ESMTP id k6DCjKpq032659; Thu, 13 Jul 2006 13:45:20 +0100 Received: (from aph@localhost) by zebedee.littlepinkcloud.COM (8.13.6/8.13.5/Submit) id k6DCjJ5l032656; Thu, 13 Jul 2006 13:45:19 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17590.16479.369495.183622@zebedee.pink> Date: Thu, 13 Jul 2006 12:45:00 -0000 From: Andrew Haley To: "Petar Bajic" Cc: Subject: Re: register usage In-Reply-To: <001401c6a678$c5f12780$4900a8c0@niit.micronasnit.com> References: <44B4500F.4010406@unixevil.info> <44B48A2B.1000907@unixevil.info> <003401c6a591$774b43a0$4900a8c0@niit.micronasnit.com> <17588.61329.831556.736022@zebedee.pink> <001401c6a678$c5f12780$4900a8c0@niit.micronasnit.com> X-Mailer: VM 7.19 under Emacs 21.4.1 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00163.txt.bz2 Petar Bajic writes: > > > For this, I had to make two new register classes (machine has 32 regs and > basicly just one reg class GENERAL_REGS) > I added two new classes: HI_REGS, and LO_REGS to "enum reg_classes" wich are > lower and higher 16 regs of GENERAL_REGS. > REG_CLASS_CONTENTS is expanded with { 0xffff0000 } and { 0x0000ffff } > REG_CLASS_NAMES has two more names "HI_REGS" and "LO_REGS" > > in machine.c file I modified "reg_class_from_letter" making letter 'j' and > 'k' return HI_REGS and LO_REGS > > in machine.md I finally wrote a rule that uses j and k regs to distinct > input and output.... > (define_insn "*movsicc_insn" > [(set (match_operand:SI 0 "register_operand" "=j,j") > (if_then_else:SI (match_operator 1 "comparison_operator" [(match_operand:SI > 4 "register_operand" "=k,k") (const_int 0)]) > (match_operand:SI 2 "register_operand" "=d,d") > (match_operand:SI 3 "register_operand" "=d,d")))] > "" > "..." > > and the error is: > ../../gcc/libgcc2.c:785: internal compiler error: in copy_to_mode_reg, at > explow.c:581 > > what else do I have to do for this to work? I would look in the debugger to see what copy_to_mode_reg was trying to do. I suspect you haven't defined a pattern to move into one of the register classes. Andrew.