Message ID | 1400854860-47207-1-git-send-email-agraf@suse.de |
---|---|
State | New |
Headers | show |
On 5/23/2014 9:21 AM, Alexander Graf wrote: > The popcntb opcode is at 31/122 according to the spec. In QEMU's internal > opcode representation that sums up to 1f/1a/03. > > Fix the opcode definition to match on the correct ID. > > This fixes booting Linux with -cpu POWER7,compat=power6 in TCG mode for me. > > Signed-off-by: Alexander Graf <agraf@suse.de> > --- > target-ppc/translate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index 0cf1417..02e006a 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -10124,7 +10124,7 @@ GEN_HANDLER(ori, 0x18, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), > GEN_HANDLER(oris, 0x19, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), > GEN_HANDLER(xori, 0x1A, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), > GEN_HANDLER(xoris, 0x1B, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), > -GEN_HANDLER(popcntb, 0x1F, 0x03, 0x03, 0x0000F801, PPC_POPCNTB), > +GEN_HANDLER(popcntb, 0x1F, 0x1A, 0x03, 0x0000F801, PPC_POPCNTB), > GEN_HANDLER(popcntw, 0x1F, 0x1A, 0x0b, 0x0000F801, PPC_POPCNTWD), > GEN_HANDLER_E(prtyw, 0x1F, 0x1A, 0x04, 0x0000F801, PPC_NONE, PPC2_ISA205), > #if defined(TARGET_PPC64) > Seems to the a duplicate of what I had done here: http://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02851.html So ... Reviewed-By: Tom Musta <tommusta@gmail.com> Tested-by: Tom Musta <tommusta@gmail.com>
On 05/27/2014 01:26 PM, Tom Musta wrote: > On 5/23/2014 9:21 AM, Alexander Graf wrote: >> The popcntb opcode is at 31/122 according to the spec. In QEMU's internal >> opcode representation that sums up to 1f/1a/03. >> >> Fix the opcode definition to match on the correct ID. >> >> This fixes booting Linux with -cpu POWER7,compat=power6 in TCG mode for me. >> >> Signed-off-by: Alexander Graf <agraf@suse.de> >> --- >> target-ppc/translate.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/target-ppc/translate.c b/target-ppc/translate.c >> index 0cf1417..02e006a 100644 >> --- a/target-ppc/translate.c >> +++ b/target-ppc/translate.c >> @@ -10124,7 +10124,7 @@ GEN_HANDLER(ori, 0x18, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), >> GEN_HANDLER(oris, 0x19, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), >> GEN_HANDLER(xori, 0x1A, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), >> GEN_HANDLER(xoris, 0x1B, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), >> -GEN_HANDLER(popcntb, 0x1F, 0x03, 0x03, 0x0000F801, PPC_POPCNTB), >> +GEN_HANDLER(popcntb, 0x1F, 0x1A, 0x03, 0x0000F801, PPC_POPCNTB), >> GEN_HANDLER(popcntw, 0x1F, 0x1A, 0x0b, 0x0000F801, PPC_POPCNTWD), >> GEN_HANDLER_E(prtyw, 0x1F, 0x1A, 0x04, 0x0000F801, PPC_NONE, PPC2_ISA205), >> #if defined(TARGET_PPC64) >> > Seems to the a duplicate of what I had done here: http://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02851.html > > So ... > > Reviewed-By: Tom Musta <tommusta@gmail.com> > Tested-by: Tom Musta <tommusta@gmail.com> Ugh, sorry. I've applied yours instead. Alex
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0cf1417..02e006a 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -10124,7 +10124,7 @@ GEN_HANDLER(ori, 0x18, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), GEN_HANDLER(oris, 0x19, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), GEN_HANDLER(xori, 0x1A, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), GEN_HANDLER(xoris, 0x1B, 0xFF, 0xFF, 0x00000000, PPC_INTEGER), -GEN_HANDLER(popcntb, 0x1F, 0x03, 0x03, 0x0000F801, PPC_POPCNTB), +GEN_HANDLER(popcntb, 0x1F, 0x1A, 0x03, 0x0000F801, PPC_POPCNTB), GEN_HANDLER(popcntw, 0x1F, 0x1A, 0x0b, 0x0000F801, PPC_POPCNTWD), GEN_HANDLER_E(prtyw, 0x1F, 0x1A, 0x04, 0x0000F801, PPC_NONE, PPC2_ISA205), #if defined(TARGET_PPC64)
The popcntb opcode is at 31/122 according to the spec. In QEMU's internal opcode representation that sums up to 1f/1a/03. Fix the opcode definition to match on the correct ID. This fixes booting Linux with -cpu POWER7,compat=power6 in TCG mode for me. Signed-off-by: Alexander Graf <agraf@suse.de> --- target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)