From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10120 invoked by alias); 10 Jan 2008 16:47:13 -0000 Received: (qmail 10111 invoked by uid 22791); 10 Jan 2008 16:47:12 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Jan 2008 16:46:53 +0000 Received: (qmail 397 invoked from network); 10 Jan 2008 16:46:51 -0000 Received: from unknown (HELO 81-178-67-39.dsl.pipex.com) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Jan 2008 16:46:51 -0000 From: Paul Brook To: gcc@gcc.gnu.org Subject: Re: Allocating scratch register Date: Thu, 10 Jan 2008 16:47:00 -0000 User-Agent: KMail/1.9.7 Cc: Boris Boesler , Ian Lance Taylor References: <35528597-A9DA-4D81-8EE4-4192FE591628@gmx.de> <97A81DD8-6B29-4F32-89D6-08B185E9E888@gmx.de> In-Reply-To: <97A81DD8-6B29-4F32-89D6-08B185E9E888@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200801101646.49703.paul@codesourcery.com> Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00120.txt.bz2 > Yes, I can remember that constraints in a mov-insn can not be > resolved by other/additional mov-insns. I think you're doing this the wrong way. You don't have a i->m mov=20 instruction, so why are you pretending you do? Why aren't you doing this the same way as pretty much every other target?=20 i.e.: (define_insn "*movqi_insn" =A0 =A0[(set (match_operand:QI 0 "reg_mem_operand" "=3Dr,m") =A0=A0=A0=A0=A0=A0=A0=A0(match_operand:QI 1 "rim_operand" =A0 =A0 " mi,r")) "" "mov %0,%1" ) (define_expand "movqi" [(set (match...) (match...)] "" " if (GET_CODE (operands[0]) =3D=3D MEM) operands[1] =3D force_reg (QImode, operands[1]); " ) Plus the appropriate *_RELOAD_CLASS macros to keep reload happy. Paul