From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2632 invoked by alias); 18 Dec 2009 13:46:39 -0000 Received: (qmail 2623 invoked by uid 22791); 18 Dec 2009 13:46:37 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-iw0-f192.google.com (HELO mail-iw0-f192.google.com) (209.85.223.192) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Dec 2009 13:46:17 +0000 Received: by iwn30 with SMTP id 30so2267328iwn.0 for ; Fri, 18 Dec 2009 05:46:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.123.41 with SMTP id n41mr1826998ibr.46.1261143975380; Fri, 18 Dec 2009 05:46:15 -0800 (PST) Reply-To: fanqifei@gmail.com In-Reply-To: <7511306b0912180300t3dc6f0fek5db84416a49a9868@mail.gmail.com> References: <7511306b0912180300t3dc6f0fek5db84416a49a9868@mail.gmail.com> Date: Fri, 18 Dec 2009 13:58:00 -0000 Message-ID: Subject: Re: ins instruction is not produced in the assembly code (mips32r2) From: fanqifei To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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: 2009-12/txt/msg00272.txt.bz2 The instruction sequence generated by gcc can be simply rewritten by three instructions. Apparently gcc should find the expression storing to bit-field and use pattern insv. But it didn't. gcc: 10: 3c03fff3 lui v1,0xfff3 14: 3463ffff ori v1,v1,0xffff 18: 8ca20000 lw v0,0(a1) 1c: 3c040008 lui a0,0x8 20: 00431824 and v1,v0,v1 24: 00641825 or v1,v1,a0 with ins: lw v0,0(a1) ori a0, $0, 2 ins v0,v0,19,18 2009/12/18 Ineiev : > On 12/18/09, fanqifei wrote: >> Is there anyone can help? >> I am curious about how the insv pattern can be used in the compiling >> process. >> Otherwise, I have to write inline assembly code. > > Out of curiosity --- why do you think your executable has to use this pattern? > > Regards, > Ineiev > -- Qifei Fan