qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON
@ 2013-11-24 20:03 Bobby Bingham
  2013-11-25  7:52 ` Richard Henderson
  2013-12-09 15:59 ` Aurelien Jarno
  0 siblings, 2 replies; 3+ messages in thread
From: Bobby Bingham @ 2013-11-24 20:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Bobby Bingham, Aurelien Jarno

Everything before CPU_COMMON in the structure is cleared as part of a
CPU reset. This included the features flag, which indicates whether SH4A
instructions are supported or not. As a result, a CPU reset downgraded
the CPU from an SH4A to an SH4.

Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
---
 target-sh4/cpu.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h
index 276d295..c181dda 100644
--- a/target-sh4/cpu.h
+++ b/target-sh4/cpu.h
@@ -157,9 +157,6 @@ typedef struct CPUSH4State {
     /* float point status register */
     float_status fp_status;
 
-    /* The features that we should emulate. See sh_features above.  */
-    uint32_t features;
-
     /* Those belong to the specific unit (SH7750) but are handled here */
     uint32_t mmucr;		/* MMU control register */
     uint32_t pteh;		/* page table entry high register */
@@ -180,6 +177,9 @@ typedef struct CPUSH4State {
 
     int id;			/* CPU model */
 
+    /* The features that we should emulate. See sh_features above.  */
+    uint32_t features;
+
     void *intc_handle;
     int in_sleep;		/* SR_BL ignored during sleep */
     memory_content *movcal_backup;
-- 
1.8.4.3

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

* Re: [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON
  2013-11-24 20:03 [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON Bobby Bingham
@ 2013-11-25  7:52 ` Richard Henderson
  2013-12-09 15:59 ` Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2013-11-25  7:52 UTC (permalink / raw)
  To: Bobby Bingham, qemu-devel; +Cc: Aurelien Jarno

On 11/25/2013 06:03 AM, Bobby Bingham wrote:
> Everything before CPU_COMMON in the structure is cleared as part of a
> CPU reset. This included the features flag, which indicates whether SH4A
> instructions are supported or not. As a result, a CPU reset downgraded
> the CPU from an SH4A to an SH4.
> 
> Signed-off-by: Bobby Bingham <koorogi@koorogi.info>

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

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

* Re: [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON
  2013-11-24 20:03 [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON Bobby Bingham
  2013-11-25  7:52 ` Richard Henderson
@ 2013-12-09 15:59 ` Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2013-12-09 15:59 UTC (permalink / raw)
  To: Bobby Bingham; +Cc: qemu-devel

On Sun, Nov 24, 2013 at 02:03:05PM -0600, Bobby Bingham wrote:
> Everything before CPU_COMMON in the structure is cleared as part of a
> CPU reset. This included the features flag, which indicates whether SH4A
> instructions are supported or not. As a result, a CPU reset downgraded
> the CPU from an SH4A to an SH4.
> 
> Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
> ---
>  target-sh4/cpu.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h
> index 276d295..c181dda 100644
> --- a/target-sh4/cpu.h
> +++ b/target-sh4/cpu.h
> @@ -157,9 +157,6 @@ typedef struct CPUSH4State {
>      /* float point status register */
>      float_status fp_status;
>  
> -    /* The features that we should emulate. See sh_features above.  */
> -    uint32_t features;
> -
>      /* Those belong to the specific unit (SH7750) but are handled here */
>      uint32_t mmucr;		/* MMU control register */
>      uint32_t pteh;		/* page table entry high register */
> @@ -180,6 +177,9 @@ typedef struct CPUSH4State {
>  
>      int id;			/* CPU model */
>  
> +    /* The features that we should emulate. See sh_features above.  */
> +    uint32_t features;
> +
>      void *intc_handle;
>      int in_sleep;		/* SR_BL ignored during sleep */
>      memory_content *movcal_backup;

Thanks, applied.


-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

end of thread, other threads:[~2013-12-09 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-24 20:03 [Qemu-devel] [PATCH] target-sh4: move features flag after CPU_COMMON Bobby Bingham
2013-11-25  7:52 ` Richard Henderson
2013-12-09 15:59 ` Aurelien Jarno

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