From: Luis Machado <luis.machado@arm.com>
To: Alan Modra <amodra@gmail.com>, Hans-Peter Nilsson <hp@axis.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] Don't define ARCH_cris for BFD64
Date: Thu, 5 May 2022 10:01:08 +0100 [thread overview]
Message-ID: <e657de8e-4a5c-90f1-1c6e-5d10a3adb168@arm.com> (raw)
In-Reply-To: <YnMAEzJFbSnDmJIV@squeak.grove.modra.org>
On 5/4/22 23:37, Alan Modra wrote:
> On Wed, May 04, 2022 at 04:37:03PM +0200, Hans-Peter Nilsson wrote:
>>> From: Alan Modra <amodra@gmail.com>
>>> Date: Wed, 4 May 2022 10:39:58 +0200
>>
>>> On Wed, May 04, 2022 at 09:15:43AM +0100, Luis Machado wrote:
>>>> On 5/4/22 09:08, Alan Modra wrote:
>>>>> On Wed, May 04, 2022 at 08:56:28AM +0100, Luis Machado via Binutils wrote:
>>>>>> I believe it is a mistake to define ARCH_cris when BFD64 is defined. It is
>>>>>> a 32-bit architecture, so should be placed outside of the BFD64 block.
>>>>>
>>>>> No. cris may be 32-bit but the bfd support requires a 64-bit bfd.
>>>>> See config.bfd.
>>>>>
>>>>
>>>> Interesting, I missed that. So I suppose GDB will need to move these cris
>>>> files from ALL_TARGET_OBS to ALL_64_TARGET_OBS.
>>>>
>>>> I see opcodes/Makefile.am also puts the cris files into
>>>> TARGET32_LIBOPCODES_CFILES. Is that a mistake?
>>>
>>> Hmm, maybe config.bfd is wrong. I see cris files in bfd/Makefile.am
>>> BFD32_BACKENDS. Hans-Peter, do you know what is going on here?
>>
>> I didn't remember that I had changed anything 32/64-related
>> in that area, so I had to consult git blame. The most
>> recent change I did was in 2017, so whatever 32/64-changes
>> is probably related to 56fbd041853a "Fix gas/22304 by
>> forcing a 64-bit bfd for cris*-*" (TL;DR: expressions
>> overflow). That commit *could* be slightly wrong; perhaps
>> it shouldn't be wrapped in #ifdef BFD64?
>>
>> Adding CRIS files to BFD32_BACKENDS happened when the port
>> was added, back in 2000. If it's wrong for a 32-bit target
>> to be there, then I don't want to be right! :)
>
> OK, so this means we have two slightly different versions of cris
> support. Configured to support cris directly with --target or
> --enable-targets mentioning one of the cris tuples will always give
> you a 64-bit bfd. On a 32-bit host configured with
> --enable-targets=all you'll get a 32-bit bfd, and miss some support
> for explicitly choosing and displaying targets. (The #ifdef comments
> in config.bfd are used to generate targmatch.h, which gets included
> into targets.c.)
>
> I'm going to apply the following, and Luis, please apply your
> disassemble.c change.
Pushed now. Thanks!
next prev parent reply other threads:[~2022-05-05 9:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 7:56 Luis Machado
2022-05-04 8:08 ` Alan Modra
2022-05-04 8:15 ` Luis Machado
2022-05-04 8:39 ` Alan Modra
2022-05-04 14:37 ` Hans-Peter Nilsson
2022-05-04 22:37 ` Alan Modra
2022-05-05 9:01 ` Luis Machado [this message]
2022-05-05 11:11 ` Pedro Alves
2022-05-05 12:56 ` Hans-Peter Nilsson
2022-05-06 0:56 ` Alan Modra
2022-05-06 2:35 ` Hans-Peter Nilsson
2022-05-06 9:09 ` Luis Machado
2022-05-06 9:00 ` 32-bit archs, want64=true, and gas integers (Re: [PATCH] Don't define ARCH_cris for BFD64) Pedro Alves
2022-05-06 9:55 ` 32-bit archs, want64=true, and gas integers Jan Beulich
2022-05-06 10:01 ` Pedro Alves
2022-05-06 10:17 ` Jan Beulich
2022-05-06 10:43 ` Pedro Alves
2022-05-06 11:55 ` Jan Beulich
2022-05-06 12:04 ` Pedro Alves
2022-05-06 14:32 ` Hans-Peter Nilsson
2022-05-06 14:44 ` Pedro Alves
2022-05-07 20:19 ` Hans-Peter Nilsson
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=e657de8e-4a5c-90f1-1c6e-5d10a3adb168@arm.com \
--to=luis.machado@arm.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=hp@axis.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).