From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 96CD53858C56 for ; Wed, 6 Dec 2023 21:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 96CD53858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 96CD53858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701897936; cv=none; b=L2gzu8oJnHHOgXOKLQq4TnFM2OzWnlEWt5sYLNXyq+VkLjViAQ2JyvwWRpTV3TUXXcRGbbrQHrYWviaKIvGuQDmQ7+Pe1ypJUNSGxE0nOmDL9wqJqRqmvrlcMfaS2LSiQDKtgysd0zZoVvppfuFvAB4srgRlGsx0ljPb60S0tec= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701897936; c=relaxed/simple; bh=CBnHZIoP2KLBxfJpMH8r9pS4DukEw8SSMYuQ4VaKD8g=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=FB80ZYUtb/nky+7ZKcgXNyXbfJP+Ud3mWycGBK5bQ23s5ITa0xhLUPP0BXuD4e04qMByHJhx73wunFabQufFKMoWbWVFhLPPbMScs0ONTw+IE0PlLU0wiNXynr6iJdbQYhXxz4FeBGI58uIwnqnjGh9QpYiEv5hNjzWbots0SB8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from linux-libre.fsfla.org ([2001:470:142:5::54] helo=free.home) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAzOg-0007c1-BM; Wed, 06 Dec 2023 16:25:34 -0500 Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 3B6LP0TT256753 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 6 Dec 2023 18:25:01 -0300 From: Alexandre Oliva To: Jeff Law Cc: gcc@gcc.gnu.org, dj@redhat.com Subject: Re: strub causing libgcc to fail to build on rl78-elf Organization: Free thinker, not speaking for the GNU Project References: <7afbb6f4-bc43-4dc1-a691-c84b019bbf58@gmail.com> Date: Wed, 06 Dec 2023 18:24:58 -0300 In-Reply-To: <7afbb6f4-bc43-4dc1-a691-c84b019bbf58@gmail.com> (Jeff Law's message of "Wed, 6 Dec 2023 09:48:13 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: [adding gcc@] Hi, Jeff, On Dec 6, 2023, Jeff Law wrote: > libgcc is currently failing to build on rl78, looks like it might be > strub related. Thanks for letting me know. >> /home/jlaw/test/gcc/libgcc/strub.c:149:1: error: unrecognizable insn: >> 149 | } >> | ^ >> (insn 30 64 33 4 (asm_operands/v ("") ("") 0 [ >> (mem/f:HI (reg:HI 8 r8) [1 *base_8+0 S2 A16]) >> ] >> [ >> (asm_input:HI ("m") /home/jlaw/test/gcc/libgcc/strub.c:147) >> ] >> [] /home/jlaw/test/gcc/libgcc/strub.c:147) "/home/jlaw/test/gcc/libgcc/strub.c":147:3 -1 >> (expr_list:REG_DEAD (reg:HI 8 r8) >> (nil))) >> during RTL pass: cprop_hardreg This looks like a latent bug in the port. This was just a plain asm insn in strub.c: /* Make sure the stack overwrites are not optimized away. */ asm ("" : : "m" (end[0])); whose constraint passes during reload, rl78_alloc_physical_registers leaves it alone and clears virt_insns_ok, so when cprog_hardreg attempts to extract constraints again, rl78_as_legitimate_address rejects r8 as the address because virt insns are no longer ok. I'm not at all familiar with this port, and I don't know what was supposed to happen here, but ISTM that either physical registers should be allocated for asms, or non-B0 regs should be accepted in asms. I don't see a maintainer listed for rl78; is there anyone familiar enough with it to confirm (or dispute ;-) my suspicions, and discuss possibilities to get this fixed? DJ, AFAICT was you who contributed the port. Do you have any wisdom about it to share? TIA, -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Think Assange & Stallman. The empires strike back