From: Tom Musta <tommusta@gmail.com>
To: Alexander Graf <agraf@suse.de>, Scott Wood <scottwood@freescale.com>
Cc: qemu-ppc <qemu-ppc@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/18] target-ppc: Add Flag for Power ISA V2.06
Date: Thu, 19 Dec 2013 09:35:41 -0600 [thread overview]
Message-ID: <52B3124D.9060907@gmail.com> (raw)
In-Reply-To: <2F157106-9586-4331-A7CB-A16CA00CEBE1@suse.de>
On 12/18/2013 4:37 PM, Alexander Graf wrote:
>
>
>> Am 18.12.2013 um 23:11 schrieb Scott Wood <scottwood@freescale.com>:
>>
>>> On Wed, 2013-12-18 at 23:09 +0100, Alexander Graf wrote:
>>>> On 18.12.2013, at 23:02, Scott Wood <scottwood@freescale.com> wrote:
>>>>
>>>>> On Mon, 2013-12-09 at 09:46 -0600, Tom Musta wrote:
>>>>> This patch adds a flag for base instruction additions to Power ISA
>>>>> 2.06B. The flag will be used to identify/select basic Book I and
>>>>> Book II instructions that were newly added in that revision of the
>>>>> architecture. The flag will not be used for VSX or Altivec.
>>>>>
>>>>> Signed-off-by: Tom Musta <tommusta@gmail.com>
>>>>> ---
>>>>> target-ppc/cpu.h | 4 +++-
>>>>> target-ppc/translate_init.c | 6 ++++--
>>>>> 2 files changed, 7 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
>>>>> index 0abc848..fe3aace 100644
>>>>> --- a/target-ppc/cpu.h
>>>>> +++ b/target-ppc/cpu.h
>>>>> @@ -1877,9 +1877,11 @@ enum {
>>>>> PPC2_ISA205 = 0x0000000000000020ULL,
>>>>> /* VSX additions in ISA 2.07 */
>>>>> PPC2_VSX207 = 0x0000000000000040ULL,
>>>>> + /* Book I 2.06B PowerPC specification (base instructions) */
>>>>> + PPC2_ISA206 = 0x0000000000000080ULL,
>>>>>
>>>>> #define PPC_TCG_INSNS2 (PPC2_BOOKE206 | PPC2_VSX | PPC2_PRCNTL | PPC2_DBRX | \
>>>>> - PPC2_ISA205 | PPC2_VSX207)
>>>>> + PPC2_ISA205 | PPC2_VSX207 | PPC2_ISA206)
>>>>> };
>>>>>
>>>>> /*****************************************************************************/
>>>>> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
>>>>> index e14ab63..491e56c 100644
>>>>> --- a/target-ppc/translate_init.c
>>>>> +++ b/target-ppc/translate_init.c
>>>>> @@ -7234,7 +7234,8 @@ POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data)
>>>>> PPC_64B | PPC_ALTIVEC |
>>>>> PPC_SEGMENT_64B | PPC_SLBI |
>>>>> PPC_POPCNTB | PPC_POPCNTWD;
>>>>> - pcc->insns_flags2 = PPC2_VSX | PPC2_DFP | PPC2_DBRX | PPC2_ISA205;
>>>>> + pcc->insns_flags2 = PPC2_VSX | PPC2_DFP | PPC2_DBRX | PPC2_ISA205 |
>>>>> + PPC2_ISA206;
>>>>> pcc->msr_mask = 0x800000000284FF37ULL;
>>>>> pcc->mmu_model = POWERPC_MMU_2_06;
>>>>> #if defined(CONFIG_SOFTMMU)
>>>>> @@ -7270,7 +7271,8 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
>>>>> PPC_64B | PPC_ALTIVEC |
>>>>> PPC_SEGMENT_64B | PPC_SLBI |
>>>>> PPC_POPCNTB | PPC_POPCNTWD;
>>>>> - pcc->insns_flags2 = PPC2_VSX | PPC2_VSX207 | PPC2_DFP | PPC2_DBRX;
>>>>> + pcc->insns_flags2 = PPC2_VSX | PPC2_VSX207 | PPC2_DFP | PPC2_DBRX |
>>>>> + PPC2_ISA206;
>>>>> pcc->msr_mask = 0x800000000284FF36ULL;
>>>>> pcc->mmu_model = POWERPC_MMU_2_06;
>>>>> #if defined(CONFIG_SOFTMMU)
>>>>
>>>> e500mc/e5500 are also ISA 2.06 (minus some of these new instructions,
>>>> but not all of them -- better to emulate instructions that don't exist
>>>> than to not emulate instructions that do exist).
>>>
>>> Well, that's what the nice categories in the ISA are there for, no?
>>> They should tell us quite explicitly which instructions are available
>>> in embedded and which are not.
>>
>> They should, but they don't. In the core reference manual for e500mc
>> and derivatives, it lists the ISA categories supported... and then has a
>> table that says "oh, except for these instructions".
>
> Hooray :). Can we please split the feature bit nevertheless?
>
> Alex
>
>>
>> -Scott
>>
>>
It turns out that all of the instructions added in this series are *not* implemented
in e500mc. So the patch, as is, is correct for e500mc as well as P7/P8.
The problem with this patch series seems to be that previously implemented ISA2.06
instructions were given their own flags (e.g. PPC_POPCNTWD). But this series attempted
to use a single flag for all of base ISA 2.06.
Based on Alex's suggestion, I propose that I re-implement, eliminating PPC2_ISA206 and
replacing it with the following new flags:
- PPC2_PERMUTE_206 (bpermd)
- PPC2_DIV_EXT_206 (div[wd]e[u])
- PPC2_ATOMIC_206 (l[bh]arx, st[bh]cx.)
- PPC2_FP_CVT_206 (fcfid*, fcti[dw]u[z], lfiwzx)
- PPC2_FP_TEST_206 (ftdiv, ftsqrt)
Comments?
next prev parent reply other threads:[~2013-12-19 15:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 15:46 [Qemu-devel] [PATCH 00/18] target-ppc: Base ISA V2.06 for Power7/Power8 Tom Musta
2013-12-09 15:46 ` [Qemu-devel] [PATCH 01/18] target-ppc: Add Flag for Power ISA V2.06 Tom Musta
2013-12-18 22:02 ` Scott Wood
2013-12-18 22:09 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2013-12-18 22:11 ` Scott Wood
2013-12-18 22:37 ` Alexander Graf
2013-12-19 15:35 ` Tom Musta [this message]
2013-12-19 17:17 ` Scott Wood
2013-12-09 15:46 ` [Qemu-devel] [PATCH 02/18] target-ppc: Add ISA2.06 bpermd Instruction Tom Musta
2013-12-10 0:01 ` Richard Henderson
2013-12-10 17:47 ` Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 03/18] target-ppc: Add ISA2.06 divdeu[o] Instructions Tom Musta
2013-12-10 0:05 ` Richard Henderson
2013-12-09 15:47 ` [Qemu-devel] [PATCH 04/18] target-ppc: Add ISA2.06 divde[o] Instructions Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 05/18] target-ppc: Add ISA 2.06 divwe[u][o] Instructions Tom Musta
2013-12-10 0:26 ` Richard Henderson
2013-12-10 17:58 ` Tom Musta
2013-12-10 18:30 ` Richard Henderson
2013-12-09 15:47 ` [Qemu-devel] [PATCH 06/18] target-ppc: Add ISA2.06 lbarx, lharx Instructions Tom Musta
2013-12-10 0:31 ` Richard Henderson
2013-12-09 15:47 ` [Qemu-devel] [PATCH 07/18] target-ppc: Add ISA 2.06 stbcx. and sthcx. Instructions Tom Musta
2013-12-10 0:41 ` Richard Henderson
2013-12-09 15:47 ` [Qemu-devel] [PATCH 08/18] target-ppc: Add ISA2.06 Float to Integer Instructions Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 09/18] softfloat: Fix Handling of Small Negatives in float64_to_uint64 Tom Musta
2013-12-13 0:13 ` Peter Maydell
2013-12-16 15:20 ` Tom Musta
2013-12-16 15:24 ` Peter Maydell
2013-12-16 15:26 ` Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 10/18] softfloat: Fix float64_to_uint64_round_to_zero Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 11/18] softfloat: Fix float64_to_uint32 Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 12/18] softfloat: Fix float64_to_uint32_round_to_zero Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 13/18] target-ppc: Add ISA 2.06 fcfid[u][s] Instructions Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 14/18] target-ppc: Fix and enable fri[mnpz] Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 15/18] target-ppc: Add ISA 2.06 ftdiv Instruction Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 16/18] target-ppc: Add ISA 2.06 ftsqrt Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 17/18] target-ppc: Enable frsqrtes on Power7 and Power8 Tom Musta
2013-12-09 15:47 ` [Qemu-devel] [PATCH 18/18] target-ppc: Add ISA2.06 lfiwzx Instruction Tom Musta
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=52B3124D.9060907@gmail.com \
--to=tommusta@gmail.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=scottwood@freescale.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 NNTP newsgroup(s).