From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5738 invoked by alias); 29 Jan 2014 09:50:12 -0000 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 Received: (qmail 5728 invoked by uid 89); 29 Jan 2014 09:50:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f176.google.com Received: from mail-vc0-f176.google.com (HELO mail-vc0-f176.google.com) (209.85.220.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 29 Jan 2014 09:50:11 +0000 Received: by mail-vc0-f176.google.com with SMTP id la4so987718vcb.7 for ; Wed, 29 Jan 2014 01:50:08 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.221.26.10 with SMTP id rk10mr5897621vcb.0.1390989008868; Wed, 29 Jan 2014 01:50:08 -0800 (PST) Received: by 10.58.108.104 with HTTP; Wed, 29 Jan 2014 01:50:08 -0800 (PST) Date: Wed, 29 Jan 2014 20:12:00 -0000 Message-ID: Subject: type promotion From: Umesh Kalappa To: "gcc@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00313.txt.bz2 Hi All, Was porting gcc 4.8.1 to the private target which has 8 bit regs and can be used as pair for 16bit like AB ,CD but not BC or AD. I was stuck in the type promotion like int i; unsigned char c; int test () { i =c; } defined the zero_extendqihi2 pattern for the above c construct like (define_expand zero_extendqihi2 [(set (operand:hi 0 "" """) (zero_extend:hi (operand:qi 1)))] "" if(!reload_completed) { if(operands[1] != REG) operands[1]= force_reg(QI,operands[1]); /* Here i need to enforce gcc to use the next consective paired reg like B if operands[1] is in A reg or D if operands[1] is in C */ } ) How do i module the above reguirement in the backend ? Thank you ~Umesh