qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-ppc: exception model of 603e inherits from 603
@ 2010-04-23  9:44 Thomas Monjalon
  2010-04-24 12:48 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2010-04-23  9:44 UTC (permalink / raw)
  To: qemu-devel

From: Thomas Monjalon <thomas@monjalon.net>

It appears that the exception handling of 603e is the same as 603.
So it could be removed safely.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 target-ppc/cpu.h            |    2 --
 target-ppc/helper.c         |    3 ---
 target-ppc/translate_init.c |    5 +----
 3 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 2ad4486..ba266cb 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -134,8 +134,6 @@ enum powerpc_excp_t {
     POWERPC_EXCP_602,
     /* PowerPC 603 exception model      */
     POWERPC_EXCP_603,
-    /* PowerPC 603e exception model     */
-    POWERPC_EXCP_603E,
     /* PowerPC G2 exception model       */
     POWERPC_EXCP_G2,
     /* PowerPC 604 exception model      */
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index c28223b..c290f77 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -2385,7 +2385,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
         switch (excp_model) {
         case POWERPC_EXCP_602:
         case POWERPC_EXCP_603:
-        case POWERPC_EXCP_603E:
         case POWERPC_EXCP_G2:
             goto tlb_miss_tgpr;
         case POWERPC_EXCP_7x5:
@@ -2404,7 +2403,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
         switch (excp_model) {
         case POWERPC_EXCP_602:
         case POWERPC_EXCP_603:
-        case POWERPC_EXCP_603E:
         case POWERPC_EXCP_G2:
             goto tlb_miss_tgpr;
         case POWERPC_EXCP_7x5:
@@ -2423,7 +2421,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
         switch (excp_model) {
         case POWERPC_EXCP_602:
         case POWERPC_EXCP_603:
-        case POWERPC_EXCP_603E:
         case POWERPC_EXCP_G2:
         tlb_miss_tgpr:
             /* Swap temporary saved registers with GPRs */
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index f3e266d..c88762e 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -4519,7 +4519,7 @@ static void init_proc_603 (CPUPPCState *env)
                               PPC_SEGMENT | PPC_EXTERN)
 #define POWERPC_MSRM_603E    (0x000000000007FF73ULL)
 #define POWERPC_MMU_603E     (POWERPC_MMU_SOFT_6xx)
-//#define POWERPC_EXCP_603E    (POWERPC_EXCP_603E)
+#define POWERPC_EXCP_603E    (POWERPC_EXCP_603)
 #define POWERPC_INPUT_603E   (PPC_FLAGS_INPUT_6xx)
 #define POWERPC_BFDM_603E    (bfd_mach_ppc_ec603e)
 #define POWERPC_FLAG_603E    (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE |           \
@@ -9589,9 +9589,6 @@ int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
         case POWERPC_EXCP_603:
             excp_model = "PowerPC 603";
             break;
-        case POWERPC_EXCP_603E:
-            excp_model = "PowerPC 603e";
-            break;
         case POWERPC_EXCP_604:
             excp_model = "PowerPC 604";
             break;
-- 
1.7.0.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc: exception model of 603e inherits from 603
  2010-04-23  9:44 [Qemu-devel] [PATCH] target-ppc: exception model of 603e inherits from 603 Thomas Monjalon
@ 2010-04-24 12:48 ` Andreas Färber
  2010-04-26  9:47   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2010-04-24 12:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: qemu-devel

Am 23.04.2010 um 11:44 schrieb Thomas Monjalon:

> From: Thomas Monjalon <thomas@monjalon.net>
>
> It appears that the exception handling of 603e is the same as 603.
> So it could be removed safely.

Are you referring to some ppc manual or to the current code base?

Andreas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc: exception model of 603e inherits from 603
  2010-04-24 12:48 ` Andreas Färber
@ 2010-04-26  9:47   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2010-04-26  9:47 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

Andreas Färber wrote:
> Am 23.04.2010 um 11:44 schrieb Thomas Monjalon:
> > It appears that the exception handling of 603e is the same as 603.
> > So it could be removed safely.
>
> Are you referring to some ppc manual or to the current code base?

I'm referring to the current code base.

I don't think there is a difference of exception handling between these two 
processors. So I think it's better to factorize the code and to refork it if 
a difference is needed one day. But I think we need to minimize special 
handling cases.
-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-26  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23  9:44 [Qemu-devel] [PATCH] target-ppc: exception model of 603e inherits from 603 Thomas Monjalon
2010-04-24 12:48 ` Andreas Färber
2010-04-26  9:47   ` Thomas Monjalon

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).