qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH risu] ppc64: Fix patterns for rotate doubleword


From: G 3
Subject: Re: [Qemu-devel] [PATCH risu] ppc64: Fix patterns for rotate doubleword instructions
Date: Tue, 30 May 2017 10:21:36 -0400


On May 30, 2017, at 8:01 AM, Peter Maydell wrote:

On 25 May 2017 at 21:05,  <address@hidden> wrote:
What do you think about sharing the same ppc64.risu file to ppc
and ppc64/ppc64le. Then, instead of:

<NAME> PPC64LE 01111...

we'd have:

<NAME> PPC 01111...

So, specific instructions would be:

<NAME> PPC64LE 01111...
<NAME> PPC64 01111...
<NAME> PPC32 01111...

It will allow users to select the arch by using patterns like: ./ risugen
--pattern "PPC64*", or --pattern "PPC32*".

I think we should aim to share the files, but that we should
have a better mechanism than just a convention on the pattern
name (which is easy to make mistakes with and also makes it
harder to use the --pattern argument for the purpose it was
intended for, since you have to combine your desired pattern
with the pattern to select the right bit of the instruction set).
This isn't limited to PPC either -- for ARM we'd like to be
able to mark instructions as ARMv7/ARMv8/present in some
optional instruction set extension, etc.

Do you want to add an architecture option?

--pattern 'F.*' --arch PPC32

In this example only the instructions that begin with the letter F and have PPC32 as an encodingname are used.


We could perhaps do that with an optional field in the
lines in the risu file to mark what part of the instruction
set they're in, and a command line argument to select the
instruction set variant(s) desired.

I thought we already had this feature.

From the readme file:

insnname encodingname bitfield ... [ [ !blockname ] { blocktext } ]

Isn't the encodingname field the field we could use to select the variant we want?


Another possible approach would be to have the PPC32 insns
in their own file, and some sort of #include directive to
pull them into the PPC64 file.

This is all "adding extra features to risu", though, so I
don't insist it be done.

The #include directive does sound interesting but if you really want one PowerPC risu file then Jose's way would be the way to go. Risu as it is can handle this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]