From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8105 invoked by alias); 12 Dec 2007 12:53:34 -0000 Received: (qmail 8094 invoked by uid 22791); 12 Dec 2007 12:53:33 -0000 X-Spam-Check-By: sourceware.org Received: from uni12mr.unity.ncsu.edu (HELO uni12mr.unity.ncsu.edu) (152.1.1.171) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Dec 2007 12:53:23 +0000 Received: from lakshmi (lakshmi.ece.ncsu.edu [152.14.22.51]) by uni12mr.unity.ncsu.edu (8.13.7/8.13.8/Nv5.2006.1109) with ESMTP id lBCCrFU9025633; Wed, 12 Dec 2007 07:53:18 -0500 (EST) From: "Balaji V. Iyer" To: "'Revital1 Eres'" Cc: , References: <002601c83c7c$b3763960$33160e98@ece.ncsu.edu> Subject: RE: Help with another constraint Date: Wed, 12 Dec 2007 13:01:00 -0000 Message-ID: <002701c83cbd$f83c0e30$33160e98@ece.ncsu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: 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: 2007-12/txt/msg00369.txt.bz2 Hi Revital1, Thank you very much for your help. The ISA I am using (OpenRISC) does not provide an alternative for moving a constant into memory. The only way of doing this is to move the constant into a register (which i am doing) and then move that register value into memory. So what can I do in that case? Thanks, Baljai V. Iyer. -- Balaji V. Iyer PhD Student, Center for Efficient, Scalable and Reliable Computing, Department of Electrical and Computer Engineering, North Carolina State University. -----Original Message----- From: Revital1 Eres [mailto:ERES@il.ibm.com] Sent: Wednesday, December 12, 2007 7:14 AM To: Balaji V. Iyer Cc: gcc@gcc.gnu.org; openrisc@opencores.org; 'Rask Ingemann Lambertsen' Subject: RE: Help with another constraint Hello, I think you should add the pair of constraints m and I respectively to the description of the instruction in your md file (and a relevant case 8 to handle such instruction), i.e.: (define_insn "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "=p,q,m,m,p,q,p,q") - (match_operand:QI 1 "general_operand" "m,m,p,q,p,q,I,I"))] + [(set (match_operand:QI 0 "nonimmediate_operand" "=p,q,m,m,p,q,p,q,m") + (match_operand:QI 1 "general_operand" "m,m,p,q,p,q,I,I,I"))] "" "* switch(which_alternative) @@ -17,6 +17,8 @@ case 6: case 7: return \"l.addi \\t%0,r0,%1\\t # move immediate\";, + case 8: + return ...; default: return \"invalid alternative\"; } It seems that the pair m and I is missing (which indicate the memory = constant instruction). You could look for which_alternative variable in GCC internals for more details on this. Revital