* [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x
@ 2009-07-03 11:27 Baojun Wang
2009-07-03 11:47 ` malc
0 siblings, 1 reply; 3+ messages in thread
From: Baojun Wang @ 2009-07-03 11:27 UTC (permalink / raw)
To: qemu-devel
According to PPC440 user manual, PPC 440 supports ``mftb'' even it's a
preserved instruction:
PPC440_UM2013.pdf, p.445, table A-3
when I compile a kernel (2.6.30, bamboo_defconfig/440EP &
canyonlands/460EX), I can see ``mftb'' by using ppc-xxx-objdump
vmlinux
I have also checked the ppc 440x[456], 460S, 464, they also should support mftb.
The following patch enable mftb for all ppc 440 variants, including:
440EP, 440GP, 440x4, 440x5 and 460
Signed-off-by: Baojun Wang <wangbj@gmail.com>
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 04225e5..96ba2e5 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -3381,7 +3381,7 @@ static void init_proc_405 (CPUPPCState *env)
PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
PPC_CACHE | PPC_CACHE_ICBI | \
PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
- PPC_MEM_TLBSYNC | \
+ PPC_MEM_TLBSYNC | PPC_MFTB | \
PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
PPC_440_SPEC)
#define POWERPC_MSRM_440EP (0x000000000006D630ULL)
@@ -3461,7 +3461,7 @@ static void init_proc_440EP (CPUPPCState *env)
PPC_DCR | PPC_DCRX | PPC_WRTEE | PPC_MFAPIDI | \
PPC_CACHE | PPC_CACHE_ICBI | \
PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
- PPC_MEM_TLBSYNC | PPC_TLBIVA | \
+ PPC_MEM_TLBSYNC | PPC_TLBIVA | PPC_MFTB | \
PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
PPC_440_SPEC)
#define POWERPC_MSRM_440GP (0x000000000006FF30ULL)
@@ -3523,7 +3523,7 @@ static void init_proc_440GP (CPUPPCState *env)
PPC_DCR | PPC_WRTEE | \
PPC_CACHE | PPC_CACHE_ICBI | \
PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
- PPC_MEM_TLBSYNC | \
+ PPC_MEM_TLBSYNC | PPC_MFTB | \
PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
PPC_440_SPEC)
#define POWERPC_MSRM_440x4 (0x000000000006FF30ULL)
@@ -3585,7 +3585,7 @@ static void init_proc_440x4 (CPUPPCState *env)
PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
PPC_CACHE | PPC_CACHE_ICBI | \
PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
- PPC_MEM_TLBSYNC | \
+ PPC_MEM_TLBSYNC | PPC_MFTB | \
PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
PPC_440_SPEC)
#define POWERPC_MSRM_440x5 (0x000000000006FF30ULL)
@@ -3663,7 +3663,7 @@ static void init_proc_440x5 (CPUPPCState *env)
/* PowerPC 460 (guessed) */
#define POWERPC_INSNS_460 (PPC_INSNS_BASE | PPC_STRING | \
PPC_DCR | PPC_DCRX | PPC_DCRUX | \
- PPC_WRTEE | PPC_MFAPIDI | \
+ PPC_WRTEE | PPC_MFAPIDI | PPC_MFTB | \
PPC_CACHE | PPC_CACHE_ICBI | \
PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
PPC_MEM_TLBSYNC | PPC_TLBIVA | \
@@ -3750,7 +3750,7 @@ static void init_proc_460 (CPUPPCState *env)
#define POWERPC_INSNS_460F (PPC_INSNS_BASE | PPC_STRING | \
PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
- PPC_FLOAT_STFIWX | \
+ PPC_FLOAT_STFIWX | PPC_MFTB | \
PPC_DCR | PPC_DCRX | PPC_DCRUX | \
PPC_WRTEE | PPC_MFAPIDI | \
PPC_CACHE | PPC_CACHE_ICBI | \
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x
2009-07-03 11:27 [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x Baojun Wang
@ 2009-07-03 11:47 ` malc
2009-07-03 11:53 ` Baojun Wang
0 siblings, 1 reply; 3+ messages in thread
From: malc @ 2009-07-03 11:47 UTC (permalink / raw)
To: Baojun Wang; +Cc: qemu-devel
On Fri, 3 Jul 2009, Baojun Wang wrote:
> According to PPC440 user manual, PPC 440 supports ``mftb'' even it's a
> preserved instruction:
This is the second patch with the subject that contains "ppc tcg", i guess
it's a matter of how you look at it but in my view you are fixing ppc
translation issues not ppc tcg (which lives in tcg/ppc) bugs.
[..snip..]
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x
2009-07-03 11:47 ` malc
@ 2009-07-03 11:53 ` Baojun Wang
0 siblings, 0 replies; 3+ messages in thread
From: Baojun Wang @ 2009-07-03 11:53 UTC (permalink / raw)
To: malc; +Cc: qemu-devel
yes, it is ppc translation.
actually this is the first time for me to sending patch against qemu
maillist list, Sorry for the mistake & thanks for correction.
Best Regards,
- Wang
On Fri, Jul 3, 2009 at 7:47 PM, malc<av1474@comtv.ru> wrote:
> On Fri, 3 Jul 2009, Baojun Wang wrote:
>
>> According to PPC440 user manual, PPC 440 supports ``mftb'' even it's a
>> preserved instruction:
>
> This is the second patch with the subject that contains "ppc tcg", i guess
> it's a matter of how you look at it but in my view you are fixing ppc
> translation issues not ppc tcg (which lives in tcg/ppc) bugs.
>
> [..snip..]
>
> --
> mailto:av1474@comtv.ru
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-03 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-03 11:27 [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x Baojun Wang
2009-07-03 11:47 ` malc
2009-07-03 11:53 ` Baojun Wang
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).