On Tue, Aug 23, 2011 at 06:55:43AM +0200, Alexander Graf wrote:
> When accessing an SPE instruction despite it being not available,
> throw an SPE exception instead of an APU exception. That way the
> guest knows what's going on and actually uses SPE.
> 
> Reported-by: Jason Wessel <jason.wes...@windriver.com>
> Signed-off-by: Alexander Graf <ag...@suse.de>
> ---
>  target-ppc/translate.c |   78 
> ++++++++++++++++++++++++------------------------
>  1 files changed, 39 insertions(+), 39 deletions(-)
> 
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index fd7c208..f36363a 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -6622,7 +6622,7 @@ static inline void gen_evmra(DisasContext *ctx)
>  {
>  
>      if (unlikely(!ctx->spe_enabled)) {
> -        gen_exception(ctx, POWERPC_EXCP_APU);
> +        gen_exception(ctx, POWERPC_EXCP_SPEU);
>          return;
>      }
>  
> @@ -6693,7 +6693,7 @@ static inline void gen_speundef(DisasContext *ctx)
>  static inline void gen_##name(DisasContext *ctx)                             
>  \
>  {                                                                            
>  \
>      if (unlikely(!ctx->spe_enabled)) {                                       
>  \
> -        gen_exception(ctx, POWERPC_EXCP_APU);                                
>  \
> +        gen_exception(ctx, POWERPC_EXCP_SPEU);                               
>   \

                                                                                
 ^^
I've applied this (with a minor whitespace change), thanks Alex.

Cheers

Reply via email to