From: Baojun Wang <wangbj@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x
Date: Fri, 3 Jul 2009 19:27:39 +0800 [thread overview]
Message-ID: <3cdfa5bc0907030427k719eca7ax21457cec7ab657e9@mail.gmail.com> (raw)
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 | \
next reply other threads:[~2009-07-03 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 11:27 Baojun Wang [this message]
2009-07-03 11:47 ` [Qemu-devel] [patch 2/2] ppc tcg: enable PPC_MFTB for 44x malc
2009-07-03 11:53 ` Baojun Wang
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=3cdfa5bc0907030427k719eca7ax21457cec7ab657e9@mail.gmail.com \
--to=wangbj@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).