* [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
@ 2015-05-26 5:49 Peter Crosthwaite
2015-05-26 7:18 ` Peter Maydell
0 siblings, 1 reply; 8+ messages in thread
From: Peter Crosthwaite @ 2015-05-26 5:49 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, Peter Crosthwaite, Peter Crosthwaite,
Richard Henderson
From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
The "arm" variant for this case already contains everything needed
for aarch64. As aarch64 already uses arm as a base architecture, it
will already have the CONFIG_ARM_DIS defined meaning no functional
change. So just make the configure code simpler.
Following this patch:
$ ./configure --target-list=aarch64-softmmu,aarch64-linux-user
$ grep DIS aarch64-softmmu/config-target.mak
CONFIG_I386_DIS=y
CONFIG_ARM_DIS=y
CONFIG_ARM_A64_DIS=y
$ grep DIS aarch64-linux-user/config-target.mak
CONFIG_I386_DIS=y
CONFIG_ARM_DIS=y
CONFIG_ARM_A64_DIS=y
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---
Helps with multi-arch, less code paths to convert to multi-arch for
multi-arches many-way disas configury.
---
configure | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/configure b/configure
index f758f32..3145dd6 100755
--- a/configure
+++ b/configure
@@ -5405,13 +5405,7 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
echo "CONFIG_ALPHA_DIS=y" >> $config_target_mak
echo "CONFIG_ALPHA_DIS=y" >> config-all-disas.mak
;;
- aarch64)
- if test -n "${cxx}"; then
- echo "CONFIG_ARM_A64_DIS=y" >> $config_target_mak
- echo "CONFIG_ARM_A64_DIS=y" >> config-all-disas.mak
- fi
- ;;
- arm)
+ arm|aarch64)
echo "CONFIG_ARM_DIS=y" >> $config_target_mak
echo "CONFIG_ARM_DIS=y" >> config-all-disas.mak
if test -n "${cxx}"; then
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-05-26 5:49 [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury Peter Crosthwaite
@ 2015-05-26 7:18 ` Peter Maydell
2015-05-26 8:01 ` Peter Crosthwaite
0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2015-05-26 7:18 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: Peter Crosthwaite, QEMU Developers, Richard Henderson
On 26 May 2015 at 06:49, Peter Crosthwaite <crosthwaitepeter@gmail.com> wrote:
> From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
>
> The "arm" variant for this case already contains everything needed
> for aarch64. As aarch64 already uses arm as a base architecture, it
> will already have the CONFIG_ARM_DIS defined meaning no functional
> change. So just make the configure code simpler.
I'm wondering why we needed to put the A64 disassembler into
the "arm" variant at all...
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-05-26 7:18 ` Peter Maydell
@ 2015-05-26 8:01 ` Peter Crosthwaite
2015-05-26 8:24 ` Peter Maydell
0 siblings, 1 reply; 8+ messages in thread
From: Peter Crosthwaite @ 2015-05-26 8:01 UTC (permalink / raw)
To: Peter Maydell
Cc: Peter Crosthwaite, Richard Henderson, QEMU Developers,
Peter Crosthwaite
On Tue, May 26, 2015 at 12:18 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 26 May 2015 at 06:49, Peter Crosthwaite <crosthwaitepeter@gmail.com> wrote:
>> From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
>>
>> The "arm" variant for this case already contains everything needed
>> for aarch64. As aarch64 already uses arm as a base architecture, it
>> will already have the CONFIG_ARM_DIS defined meaning no functional
>> change. So just make the configure code simpler.
>
> I'm wondering why we needed to put the A64 disassembler into
> the "arm" variant at all...
>
That probably works too. I'm trying to get rid of the dup. respin it?
Regards,
Peter
> -- PMM
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-05-26 8:01 ` Peter Crosthwaite
@ 2015-05-26 8:24 ` Peter Maydell
2015-06-07 8:49 ` Peter Crosthwaite
0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2015-05-26 8:24 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: Peter Crosthwaite, Richard Henderson, QEMU Developers,
Peter Crosthwaite
On 26 May 2015 at 09:01, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
> On Tue, May 26, 2015 at 12:18 AM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>> On 26 May 2015 at 06:49, Peter Crosthwaite <crosthwaitepeter@gmail.com> wrote:
>>> From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
>>>
>>> The "arm" variant for this case already contains everything needed
>>> for aarch64. As aarch64 already uses arm as a base architecture, it
>>> will already have the CONFIG_ARM_DIS defined meaning no functional
>>> change. So just make the configure code simpler.
>>
>> I'm wondering why we needed to put the A64 disassembler into
>> the "arm" variant at all...
>>
>
> That probably works too. I'm trying to get rid of the dup. respin it?
I think it would look more like the other entries in the case statement,
so worth trying. Maybe we'll find out why it's done this way :-)
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-05-26 8:24 ` Peter Maydell
@ 2015-06-07 8:49 ` Peter Crosthwaite
2015-06-07 10:51 ` Peter Maydell
0 siblings, 1 reply; 8+ messages in thread
From: Peter Crosthwaite @ 2015-06-07 8:49 UTC (permalink / raw)
To: Peter Maydell, Paolo Bonzini
Cc: Peter Crosthwaite, Peter Crosthwaite, QEMU Developers,
Richard Henderson
On Tue, May 26, 2015 at 1:24 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 26 May 2015 at 09:01, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
>> On Tue, May 26, 2015 at 12:18 AM, Peter Maydell
>> <peter.maydell@linaro.org> wrote:
>>> On 26 May 2015 at 06:49, Peter Crosthwaite <crosthwaitepeter@gmail.com> wrote:
>>>> From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
>>>>
>>>> The "arm" variant for this case already contains everything needed
>>>> for aarch64. As aarch64 already uses arm as a base architecture, it
>>>> will already have the CONFIG_ARM_DIS defined meaning no functional
>>>> change. So just make the configure code simpler.
>>>
>>> I'm wondering why we needed to put the A64 disassembler into
>>> the "arm" variant at all...
>>>
>>
>> That probably works too. I'm trying to get rid of the dup. respin it?
>
> I think it would look more like the other entries in the case statement,
> so worth trying. Maybe we'll find out why it's done this way :-)
>
OK I am at the bottom of it. The case statement only handles the base
arch and the host arch not the actual target arch. This means the
"arm)" case is all that is called for aarch64 target. the "aarch64)"
case in existing code is presumably to handle an AArch64 host. So the
current code will produce the minimal working configury. My patch will
still work, but will unneedingly add AArch32 disas to AA64 host. A
solution would be to patch that loop to go through all of the base
arch, target arch and host arch. Anyone know of a reason not to do so?
Regards,
Peter
> -- PMM
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-06-07 8:49 ` Peter Crosthwaite
@ 2015-06-07 10:51 ` Peter Maydell
2015-06-07 19:19 ` Peter Crosthwaite
0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2015-06-07 10:51 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: Paolo Bonzini, Peter Crosthwaite, Peter Crosthwaite,
QEMU Developers, Richard Henderson
On 7 June 2015 at 09:49, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
> OK I am at the bottom of it. The case statement only handles the base
> arch and the host arch not the actual target arch.
Aha.
> This means the
> "arm)" case is all that is called for aarch64 target. the "aarch64)"
> case in existing code is presumably to handle an AArch64 host. So the
> current code will produce the minimal working configury. My patch will
> still work, but will unneedingly add AArch32 disas to AA64 host.
Presumably also the current code will unnecessarily add an A64
disassembler for all AArch32 host builds.
> A solution would be to patch that loop to go through all of the base
> arch, target arch and host arch. Anyone know of a reason not to do so?
Not offhand, but then I didn't figure out how the current code
worked when I looked at it :-) We'd get duplicate lines in
the config files, but we already have those when host==target.
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-06-07 10:51 ` Peter Maydell
@ 2015-06-07 19:19 ` Peter Crosthwaite
2015-06-08 7:52 ` Peter Maydell
0 siblings, 1 reply; 8+ messages in thread
From: Peter Crosthwaite @ 2015-06-07 19:19 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, Peter Crosthwaite, Richard Henderson,
QEMU Developers, Peter Crosthwaite
On Sun, Jun 7, 2015 at 3:51 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 7 June 2015 at 09:49, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
>> OK I am at the bottom of it. The case statement only handles the base
>> arch and the host arch not the actual target arch.
>
> Aha.
>
>> This means the
>> "arm)" case is all that is called for aarch64 target. the "aarch64)"
>> case in existing code is presumably to handle an AArch64 host. So the
>> current code will produce the minimal working configury. My patch will
>> still work, but will unneedingly add AArch32 disas to AA64 host.
>
> Presumably also the current code will unnecessarily add an A64
> disassembler for all AArch32 host builds.
>
>> A solution would be to patch that loop to go through all of the base
>> arch, target arch and host arch. Anyone know of a reason not to do so?
>
> Not offhand, but then I didn't figure out how the current code
> worked when I looked at it :-) We'd get duplicate lines in
> the config files, but we already have those when host==target.
>
Brute force it and sort -u? sort is considered a coreutil by at least
my manpages so I wonder if we can assume it is universally available.
Regards,
Peter
> -- PMM
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury
2015-06-07 19:19 ` Peter Crosthwaite
@ 2015-06-08 7:52 ` Peter Maydell
0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2015-06-08 7:52 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: Paolo Bonzini, Peter Crosthwaite, Richard Henderson,
QEMU Developers, Peter Crosthwaite
On 7 June 2015 at 20:19, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
> On Sun, Jun 7, 2015 at 3:51 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> worked when I looked at it :-) We'd get duplicate lines in
>> the config files, but we already have those when host==target.
>>
>
> Brute force it and sort -u? sort is considered a coreutil by at least
> my manpages so I wonder if we can assume it is universally available.
It's only a minor cosmetic thing in a file nobody looks at, so I'm
not sure it's worth the effort.
(We already use 'sort -u' in our Makefiles, incidentally.)
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-08 7:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26 5:49 [Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury Peter Crosthwaite
2015-05-26 7:18 ` Peter Maydell
2015-05-26 8:01 ` Peter Crosthwaite
2015-05-26 8:24 ` Peter Maydell
2015-06-07 8:49 ` Peter Crosthwaite
2015-06-07 10:51 ` Peter Maydell
2015-06-07 19:19 ` Peter Crosthwaite
2015-06-08 7:52 ` Peter Maydell
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 NNTP newsgroup(s).