From patchwork Tue Aug 25 14:11:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 510508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 18CE31401CB for ; Wed, 26 Aug 2015 00:12:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=HlIsMT3a; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=IYrl3Op676Y78ZvuzsFLCX/idJdLK/okQzN3aTBFxirm/06jn0 20g9CTf4dL2nTXRyGyQcJuwamk+jntBMH166yfQVWkB1y4+Q9bwrvDRwEZ+6juj6 7AuUc2cro6acWckw7NA/uoezhLWRryd+O76uY+BAgSav+gAmP5Bp73PfE= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=yofVzMcac7x7Fn+1h04c7ZUnFY8=; b=HlIsMT3aQEAAOeZmnPA7 0SZZH0UmmEhvEXuq4mmp14f9uipLl95zlV6UvC8J5eCCTTVxyVWdd0VHnwRzakSh YOkAKn/XX3c6VjuobOQGPDjnQi8m2ArGF7BL0rbu0du92NlsX4U5MVi49dG7wysh 2zl3Rve1nGY9EAxA4UauKg0= Received: (qmail 1774 invoked by alias); 25 Aug 2015 14:12:05 -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 1764 invoked by uid 89); 25 Aug 2015 14:12:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f44.google.com Received: from mail-qg0-f44.google.com (HELO mail-qg0-f44.google.com) (209.85.192.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 25 Aug 2015 14:12:03 +0000 Received: by qgj62 with SMTP id 62so106835186qgj.2 for ; Tue, 25 Aug 2015 07:12:01 -0700 (PDT) X-Received: by 10.140.150.3 with SMTP id 3mr70273484qhw.94.1440511921122; Tue, 25 Aug 2015 07:12:01 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id c60sm13849294qgc.27.2015.08.25.07.12.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Aug 2015 07:12:00 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: Indirect jumps Message-ID: <55DC77AF.8060802@acm.org> Date: Tue, 25 Aug 2015 10:11:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Ptx is one of those rare (unique?) machines that doesn't have an indirect branch. optabs is prepared for such a target and emits a sorry when an indirect branch is needed. However it then goes on to try and emit such an instruction and ends up ICEing. Fixed thusly, ok? (Or is the right solution to define a dummy indirect branch in the PTX md file?) nathan 2015-08-25 Nathan Sidwell * optabs (emit_indirect_jump): Don't try an emit a jump if the target doesn't have one. Index: gcc/optabs.c =================================================================== --- gcc/optabs.c (revision 227128) +++ gcc/optabs.c (working copy) @@ -4488,11 +4488,13 @@ emit_indirect_jump (rtx loc) { if (!targetm.have_indirect_jump ()) sorry ("indirect jumps are not available on this target"); - - struct expand_operand ops[1]; - create_address_operand (&ops[0], loc); - expand_jump_insn (targetm.code_for_indirect_jump, 1, ops); - emit_barrier (); + else + { + struct expand_operand ops[1]; + create_address_operand (&ops[0], loc); + expand_jump_insn (targetm.code_for_indirect_jump, 1, ops); + emit_barrier (); + } }