From patchwork Tue Sep 12 20:24:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 813045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-461987-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ETdbAhIn"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xsGWC3kfCz9s7f for ; Wed, 13 Sep 2017 06:25:10 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=MJxL4z0qylWuVb0K YW6RKSstfxxIUuIoV9RcE6daG230VNgM99vvXA+pT56c0Od3BCfCxiUsZ8THbBL9 JNs175bENUhFdkUjWhoLBmnvQN4hIVT0esH5ogqQ3fd6bi7hdbaiMV15gUck6RqE Qez+B/KCSZUcKx4bjisGjf/olCI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=mFV6uHxD9DL23T8fECZbxA tTCCQ=; b=ETdbAhInsh4P5M1pewL7GPvbiU6LK0r7WuHSSyJ1qztPXTBoVJ5JPh FQWMAg7ADeVDo9aTywjuZXg1QLd8nAPLzee9eysFmLvNYJj1ErRRMlrj8gazJd/p pwD0BQaDqrD/Bu72Md2RsKbms/DYWJNQV1NobSq0CAktRhPHB2jYA= Received: (qmail 97827 invoked by alias); 12 Sep 2017 20:25:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 97781 invoked by uid 89); 12 Sep 2017 20:25:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Sep 2017 20:25:00 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 4A9978233B for ; Tue, 12 Sep 2017 22:24:58 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LgMGeqVuMc3R for ; Tue, 12 Sep 2017 22:24:58 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 2677E82338 for ; Tue, 12 Sep 2017 22:24:58 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Small source location information fix Date: Tue, 12 Sep 2017 22:24:57 +0200 Message-ID: <45629897.k4tzoDFJo3@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 output_return and output_sibcall manually emit the instruction present in the delay slot (if any) but fail to emit its source location information. Tested on SPARC64/Linux, applied on the mainline. 2017-09-12 Eric Botcazou * config/sparc/sparc.c (output_return): Output the source location of the insn in the delay slot, if any. (output_sibcall): Likewise. Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 251996) +++ config/sparc/sparc.c (working copy) @@ -6179,7 +6179,9 @@ output_return (rtx_insn *insn) if (final_sequence) { - rtx delay, pat; + rtx_insn *delay; + rtx pat; + int seen; delay = NEXT_INSN (insn); gcc_assert (delay); @@ -6194,9 +6196,15 @@ output_return (rtx_insn *insn) else { output_asm_insn ("jmp\t%%i7+%)", NULL); - output_restore (pat); + + /* We're going to output the insn in the delay slot manually. + Make sure to output its source location first. */ PATTERN (delay) = gen_blockage (); INSN_CODE (delay) = -1; + final_scan_insn (delay, asm_out_file, optimize, 0, &seen); + INSN_LOCATION (delay) = UNKNOWN_LOCATION; + + output_restore (pat); } } else @@ -6252,13 +6260,23 @@ output_sibcall (rtx_insn *insn, rtx call if (final_sequence) { - rtx_insn *delay = NEXT_INSN (insn); + rtx_insn *delay; + rtx pat; + int seen; + + delay = NEXT_INSN (insn); gcc_assert (delay); - output_restore (PATTERN (delay)); + pat = PATTERN (delay); + /* We're going to output the insn in the delay slot manually. + Make sure to output its source location first. */ PATTERN (delay) = gen_blockage (); INSN_CODE (delay) = -1; + final_scan_insn (delay, asm_out_file, optimize, 0, &seen); + INSN_LOCATION (delay) = UNKNOWN_LOCATION; + + output_restore (pat); } else output_restore (NULL_RTX);