From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29906 invoked by alias); 4 May 2004 01:09:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29889 invoked from network); 4 May 2004 01:09:15 -0000 Received: from unknown (HELO mx2.redhat.com) (66.187.237.31) by sources.redhat.com with SMTP; 4 May 2004 01:09:15 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.12.10/8.12.10) with ESMTP id i4418ExF010636; Mon, 3 May 2004 21:08:14 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i4419Bw07300; Mon, 3 May 2004 21:09:11 -0400 Received: from [172.16.25.141] (dhcp-172-16-25-141.sfbay.redhat.com [172.16.25.141]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i4419AC13769; Mon, 3 May 2004 18:09:10 -0700 Subject: Re: [PATCH] From: Eric Christopher To: Ulrich Weigand Cc: gcc-patches@gcc.gnu.org, uweigand@de.ibm.com In-Reply-To: <200405040040.CAA06815@faui1d.informatik.uni-erlangen.de> References: <200405040040.CAA06815@faui1d.informatik.uni-erlangen.de> Content-Type: text/plain Message-Id: <1083632948.32152.57.camel@dzur.sfbay.redhat.com> Mime-Version: 1.0 Date: Tue, 04 May 2004 01:11:00 -0000 Content-Transfer-Encoding: 7bit X-RedHat-Spam-Score: 0 X-SW-Source: 2004-05/txt/msg00146.txt.bz2 > > We should have a (clobber (reg 1)) here at least ... I'll bow to your greater knowledge of the port for sure :) Done. -eric -- Eric Christopher Index: s390.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v retrieving revision 1.142 diff -u -p -w -r1.142 s390.c --- s390.c 30 Apr 2004 16:40:22 -0000 1.142 +++ s390.c 4 May 2004 01:06:00 -0000 @@ -5683,11 +5683,9 @@ s390_emit_prologue (void) { /* Generate a BAS instruction to serve as a function entry intercept to facilitate the use of tracing - algorithms located at the branch target. + algorithms located at the branch target. */ - This must use register 1. */ - s390_emit_call (GEN_INT (0xfe0), NULL_RTX, NULL_RTX, - gen_rtx_REG (Pmode, 1)); + emit_insn (gen_prologue_tpf ()); /* Emit a blockage here so that all code lies between the profiling mechanisms. */ @@ -5710,16 +5708,13 @@ s390_emit_epilogue (bool sibcall) /* Generate a BAS instruction to serve as a function entry intercept to facilitate the use of tracing - algorithms located at the branch target. - - This must use register 1. */ + algorithms located at the branch target. */ /* Emit a blockage here so that all code lies between the profiling mechanisms. */ emit_insn (gen_blockage ()); - s390_emit_call (GEN_INT (0xfe6), NULL_RTX, NULL_RTX, - gen_rtx_REG (Pmode, 1)); + emit_insn (gen_epilogue_tpf ()); } /* Check whether to use frame or stack pointer for restore. */ Index: s390.md =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v retrieving revision 1.108 diff -u -p -w -r1.108 s390.md --- s390.md 30 Apr 2004 16:40:22 -0000 1.108 +++ s390.md 4 May 2004 01:06:00 -0000 @@ -118,6 +118,10 @@ [; Blockage (UNSPECV_BLOCKAGE 0) + ; TPF Support + (UNSPECV_TPF_PROLOGUE 20) + (UNSPECV_TPF_EPILOGUE 21) + ; Literal pool (UNSPECV_POOL 200) (UNSPECV_POOL_START 201) @@ -7522,10 +7526,27 @@ "" "s390_emit_prologue (); DONE;") +(define_insn "prologue_tpf" + [(unspec_volatile [(const_int 0)] UNSPECV_TPF_PROLOGUE) + (clobber (reg:DI 1))] + "TARGET_TPF" + "bas\t%%r1,4064" + [(set_attr "type" "jsr") + (set_attr "op_type" "RX")]) + (define_expand "epilogue" [(use (const_int 1))] "" "s390_emit_epilogue (false); DONE;") + +(define_insn "epilogue_tpf" + [(unspec_volatile [(const_int 0)] UNSPECV_TPF_EPILOGUE) + (clobber (reg:DI 1))] + "TARGET_TPF" + "bas\t%%r1,4070" + [(set_attr "type" "jsr") + (set_attr "op_type" "RX")]) + (define_expand "sibcall_epilogue" [(use (const_int 0))]