From: Alexandre Oliva <oliva@gnu.org>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc@gcc.gnu.org, dj@redhat.com
Subject: Re: strub causing libgcc to fail to build on rl78-elf
Date: Wed, 06 Dec 2023 18:24:58 -0300 [thread overview]
Message-ID: <or34wfdnx1.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <7afbb6f4-bc43-4dc1-a691-c84b019bbf58@gmail.com> (Jeff Law's message of "Wed, 6 Dec 2023 09:48:13 -0700")
[adding gcc@]
Hi, Jeff,
On Dec 6, 2023, Jeff Law <jeffreyalaw@gmail.com> 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
next parent reply other threads:[~2023-12-06 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7afbb6f4-bc43-4dc1-a691-c84b019bbf58@gmail.com>
2023-12-06 21:24 ` Alexandre Oliva [this message]
2023-12-06 22:03 ` DJ Delorie
2023-12-08 0:28 ` Jeff Law
2023-12-09 2:18 ` [PATCH] strub: disable on rl78 Alexandre Oliva
2023-12-10 18:27 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=or34wfdnx1.fsf@lxoliva.fsfla.org \
--to=oliva@gnu.org \
--cc=dj@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).