From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10270 invoked by alias); 28 Nov 2012 18:37:38 -0000 Received: (qmail 10074 invoked by uid 22791); 28 Nov 2012 18:37:36 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qa0-f47.google.com (HELO mail-qa0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Nov 2012 18:37:32 +0000 Received: by mail-qa0-f47.google.com with SMTP id t11so4955695qaa.20 for ; Wed, 28 Nov 2012 10:37:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.4.168 with SMTP id l8mr24929569qel.57.1354127850994; Wed, 28 Nov 2012 10:37:30 -0800 (PST) Received: by 10.49.2.105 with HTTP; Wed, 28 Nov 2012 10:37:30 -0800 (PST) Date: Wed, 28 Nov 2012 18:37:00 -0000 Message-ID: Subject: GO_IF_LEGITIMATE_ADDRESS handling different addressing modes for load/store From: Ayonam Ray To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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: 2012-11/txt/msg00212.txt.bz2 Hi, My architecture allows base + immed and base + index for loads but allows only base + immed for stores. How do I differentiate between them in the macro GO_IF_LEGITIMATE_ADDRESS? I only get the MEM rtx in that macro and have no clue whether the operand is an address for a load or a store. Is there any other way that I can differentiate between them? Thanks and regards Ayonam