This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cmpsi2 library calls?
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: Paul Koning <paulkoning at comcast dot net>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 26 Oct 2018 10:34:40 +0100
- Subject: Re: cmpsi2 library calls?
- References: <144DE420-EB2A-4B98-9C7F-D92A002EADDB@comcast.net>
On 26/10/2018 00:46, Paul Koning wrote:
> In my target (pdp11) which has 16 bit words, I see some test suite failures because of unresolved references to __cmpsi2. The strange thing is that most of the time 32 bit compares are expanded by GCC into a sequence of word compares and branches.
>
> Why would GCC sometimes generate library calls for this? Can I make it stop doing that by writing patterns (define_expand or define_insn) for cmpsi2? That may be useful because I think I can generate better code, but still it's puzzling that the behavior is inconsistent.
>
> paul
>
Yes. See, for example, the analogous case in the ARM port for cmpdi2.
R.