From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13646 invoked by alias); 30 Sep 2009 20:31:28 -0000 Received: (qmail 13637 invoked by uid 22791); 30 Sep 2009 20:31:27 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f203.google.com (HELO mail-pz0-f203.google.com) (209.85.222.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Sep 2009 20:31:22 +0000 Received: by pzk41 with SMTP id 41so4689235pzk.0 for ; Wed, 30 Sep 2009 13:31:20 -0700 (PDT) Received: by 10.114.23.4 with SMTP id 4mr444393waw.28.1254342680047; Wed, 30 Sep 2009 13:31:20 -0700 (PDT) Received: from Paullaptop (124-170-16-182.dyn.iinet.net.au [124.170.16.182]) by mx.google.com with ESMTPS id 21sm161566pzk.15.2009.09.30.13.31.16 (version=SSLv3 cipher=RC4-MD5); Wed, 30 Sep 2009 13:31:18 -0700 (PDT) Message-ID: <36D486ECFFC04FBD8318DFDD333FD206@Paullaptop> From: "Paul Edwards" To: "Richard Henderson" Cc: References: <200909251516.n8PFGPYn014618@d12av02.megacenter.de.ibm.com> <4F1842D6879348899E3A1999066969F5@Paullaptop> <4AC39435.8010902@redhat.com> In-Reply-To: <4AC39435.8010902@redhat.com> Subject: Re: i370 port - constructing compile script Date: Wed, 30 Sep 2009 21:40:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2009-09/txt/msg00651.txt.bz2 >> What is the best way to go from this: >> >> Makefile: > > The easy way to convert a Makefile to a shell script is "make -n". That > will print out all of the commands that make would run. From there it's a > Mere Matter of Programming to have perl (or whatever) edit that down into > your JCL scripts. Hi Richard. Thanks for your reply. 1. That would include a lot of irrelevant commands - compiles and links of the generator files interspersed with what I actually need to go into the stage 1 executable on the target machine. Maybe a variable STAGE1_OBJS would be suitable? 2. If the normal way to do things is to parse the make -n output with perl etc, that's fine, I'll do it that way. I was just wondering if the proper way was to incorporate the logic into a Makefile rule and get that rule repeatedly executed rather than just having a simple "echo". It seems to me that having a generic rule to execute an external script would be neater??? BTW, I remember your name from the i370 md. Why were you interested in i370 at the time (probably many years ago)? Or was someone else just asking a public question and you answered it (like now)? BFN. Paul. else { /* implementation suggested by Richard Henderson */ rtx reg1 = gen_reg_rtx (DImode); rtx reg2 = gen_reg_rtx (DImode); rtx result = operands[0]; rtx mem1 = operands[1]; rtx mem2 = operands[2]; rtx len = operands[3]; if (!CONSTANT_P (len)) len = force_reg (SImode, len); /* Load up the address+length pairs. */ emit_insn (gen_rtx_CLOBBER (VOIDmode, reg1)); emit_move_insn (gen_rtx_SUBREG (SImode, reg1, 0), force_operand (XEXP (mem1, 0), NULL_RTX)); emit_move_insn (gen_rtx_SUBREG (SImode, reg1, GET_MODE_SIZE (SImode)), emit_insn (gen_rtx_CLOBBER (VOIDmode, reg2)); emit_move_insn (gen_rtx_SUBREG (SImode, reg2, 0), force_operand (XEXP (mem2, 0), NULL_RTX)); emit_move_insn (gen_rtx_SUBREG (SImode, reg2, GET_MODE_SIZE (SImode)), /* Compare! */ emit_insn (gen_cmpmemsi_1 (result, reg1, reg2)); } DONE; }")