From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23337 invoked by alias); 26 Aug 2011 12:47:59 -0000 Received: (qmail 23328 invoked by uid 22791); 26 Aug 2011 12:47:58 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-masked.atl.sa.earthlink.net (HELO elasmtp-masked.atl.sa.earthlink.net) (209.86.89.68) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Aug 2011 12:47:45 +0000 Received: from [24.41.5.239] (helo=[192.168.1.103]) by elasmtp-masked.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from ) id 1Qwvp2-0004hN-Ln for cgen@sourceware.org; Fri, 26 Aug 2011 08:47:44 -0400 From: Alan Lehotsky Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: Alan Lehotsky Subject: re: expanding 1 insn into 2 Date: Fri, 26 Aug 2011 12:47:00 -0000 Message-Id: <6EBEA0C6-B72E-4471-BFC7-9C4398DE3790@earthlink.net> To: cgen@sourceware.org Mime-Version: 1.0 (Apple Message framework v1084) X-ELNK-Trace: 9e0cfd4f457cc6ab94f5150ab1c16ac0719b5486e6c9e1aab3bdedad71553d03a1a8282ddddf5c79350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00006.txt.bz2 It's possible (and documented in the cgen manua)l to do this inside cgen - = see section 5.4.14 Writing define-macro-insn. and section 3.17 Macro-instru= ctions You could also do this in the assembler. I assume use used cgen to build a= gas assembler from the binutils distribution. You can either define a .macro that will do what you want assuming that you= r addressing is simple enough, or you can tweak the md_assemble() function = in your assember to parse the operands and break them down appropriately if= you need. I've found that having a machine-readable copy of the manual suitable for s= earching to be invaluable when writing CGEN models. Regards, Al Lehotsky On Aug 26, 2011, at 7:59 AM, cgen-digest-help@sourceware.org wrote: >=20 > From: Aurelien Buhrig > Date: August 26, 2011 7:59:27 AM EDT > To: cgen@sources.redhat.com > Subject: Re: expanding 1 insn into 2 >=20 >=20 > Is there anybody here ? > Any idea ? >=20 > 2011/8/11 Aurelien Buhrig : >> Hi, >>=20 >> I would like to define a pseudo instruction such as the mips "la" >> instruction to load a 32-bit address using 2 16-bit move >> instructions with different operands to differentiate bfd howtos... >>=20 >> How to handle this using cgen ? >>=20 >> Thanks, >> Aur=E9lien >>=20 >=20 >=20