From patchwork Tue Jan 8 19:10:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1022106 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-493656-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="PhwTX7Bw"; 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 43Z20R6c2zz9sD9 for ; Wed, 9 Jan 2019 06:10:46 +1100 (AEDT) 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=TPZj3bGWZvGKN/nn EQSdTAKAF8MZovIVcimf4taysIWPRebGSB/W563KEOKBVrQSnsLYOrJzrSq+vXzH toGuARBhXWA/M45btfcyOhwNavqmHtJz8gtkbvtPhjvxm+U8H4MYGPL1wK0iXYdZ /sEwMseWCkj8cwLZ9O2SvkijbAY= 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=l4qNpq0fVz6NFm+ZT5M7l/ 8atpY=; b=PhwTX7BwvOVa877pJJN9grq5Yae/tWFrXTk7/L5UEhOgqbVJppkhJh MXJEZPUjf0ohSS1NqeECTRO4pqef/arm3f84AzAP7f+ZEh6S+oTBZukaYHSVo/Wk mUDPU28okZHR1HpZItGOOiXq4C9Q8eQxFSkrrr2lr+TpQPinNNsA4= Received: (qmail 101443 invoked by alias); 8 Jan 2019 19:10:37 -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 101332 invoked by uid 89); 8 Jan 2019 19:10:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=cum, HX-Envelope-From:sk:ebotcaz, H*F:U*ebotcazou, U*ebotcazou 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, 08 Jan 2019 19:10:34 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 29BE781380 for ; Tue, 8 Jan 2019 20:10:31 +0100 (CET) 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 oXzwi8_yk5gn for ; Tue, 8 Jan 2019 20:10:31 +0100 (CET) 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 E874981353 for ; Tue, 8 Jan 2019 20:10:30 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix a couple of PRs Date: Tue, 08 Jan 2019 20:10:28 +0100 Message-ID: <44202342.ZRcWqpgPH2@polaris> MIME-Version: 1.0 Although they are already fixed, the first one because it didn't fail for me and the second one thanks to Jakub's patch. Tested on SPARC/Solaris 11, applied on the mainline. 2019-01-08 Eric Botcazou PR bootstrap/88721 * config/sparc/sparc.c (function_arg_slotno): Set *PPREGNO & *PPADDING to -1 on entry. PR debug/88723 * config/sparc/sparc.c (sparc_delegitimize_address): Deal with naked UNSPECs and UNSPEC_MOVE_GOTDATA specifically. Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 267574) +++ config/sparc/sparc.c (working copy) @@ -4949,12 +4949,19 @@ sparc_delegitimize_address (rtx x) { x = delegitimize_mem_from_attrs (x); - if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC) - switch (XINT (XEXP (x, 1), 1)) + if (GET_CODE (x) == LO_SUM) + x = XEXP (x, 1); + + if (GET_CODE (x) == UNSPEC) + switch (XINT (x, 1)) { case UNSPEC_MOVE_PIC: case UNSPEC_TLSLE: - x = XVECEXP (XEXP (x, 1), 0, 0); + x = XVECEXP (x, 0, 0); + gcc_assert (GET_CODE (x) == SYMBOL_REF); + break; + case UNSPEC_MOVE_GOTDATA: + x = XVECEXP (x, 0, 2); gcc_assert (GET_CODE (x) == SYMBOL_REF); break; default: @@ -6873,6 +6880,10 @@ function_arg_slotno (const struct sparc_ int slotno = cum->words, regno; enum mode_class mclass = GET_MODE_CLASS (mode); + /* Silence warnings in the callers. */ + *pregno = -1; + *ppadding = -1; + if (type && TREE_ADDRESSABLE (type)) return -1;