From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19973 invoked by alias); 7 Apr 2008 20:50:09 -0000 Received: (qmail 19957 invoked by uid 22791); 7 Apr 2008 20:50:08 -0000 X-Spam-Check-By: sourceware.org Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Apr 2008 20:49:49 +0000 Received: by fg-out-1718.google.com with SMTP id d23so1254840fga.28 for ; Mon, 07 Apr 2008 13:49:34 -0700 (PDT) Received: by 10.86.59.2 with SMTP id h2mr3759224fga.78.1207601374274; Mon, 07 Apr 2008 13:49:34 -0700 (PDT) Received: by 10.86.73.11 with HTTP; Mon, 7 Apr 2008 13:49:34 -0700 (PDT) Message-ID: <178adb870804071349p62932c37h3c67d236a12795b3@mail.gmail.com> Date: Mon, 07 Apr 2008 22:00:00 -0000 From: Omar To: gcc-help@gcc.gnu.org Subject: Understanding Predicate and Constrains MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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-04/txt/msg00084.txt.bz2 Hi, I am trying to understand predicate and constraints. To this end, I created a simple define_insn : (define_insn "movqi" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r,r,>,<,r") (match_operand:QI 1 "general_operand" "r,m,r,>,<,r,r,i"))] "" "@ move.b %0,%1; move.b %0,%1; move.b %0,%1; move.b %0,%1; move.b %0,%1; move.b %0,%1; move.b %0,%1; move.b %0,%1; ") My questions are: 1) How '>' really work, am i using it correctly or do I need to use it with another another constraint (like 'm>')? 1.1) Which file should I load while debugging to understand how constrains are being use? 2) How I limit the 'i' constraint so that only constants below or equal to 255 are allowed? Thanks in advance for your help! Regards, -Omar