Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 15:33, Nathan Whitehorn wrote: > On 06/05/11 04:00, Alexander Graf wrote: >> On 04.06.2011, at 21:28, Nathan Whitehorn wrote: >> >>> On 05/31/11 12:40, Richard Henderson wrote: On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: > #if defined(TARGET_PPC64) > -

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-05 Thread Nathan Whitehorn
On 06/05/11 08:33, Nathan Whitehorn wrote: On 06/05/11 04:00, Alexander Graf wrote: On 04.06.2011, at 21:28, Nathan Whitehorn wrote: On 05/31/11 12:40, Richard Henderson wrote: On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: #if defined(TARGET_PPC64) -if (!ctx->sf_mode) {

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-05 Thread Nathan Whitehorn
On 06/05/11 04:00, Alexander Graf wrote: On 04.06.2011, at 21:28, Nathan Whitehorn wrote: On 05/31/11 12:40, Richard Henderson wrote: On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: #if defined(TARGET_PPC64) -if (!ctx->sf_mode) { TCGv t0 = tcg_temp_new();

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-05 Thread Alexander Graf
On 04.06.2011, at 21:28, Nathan Whitehorn wrote: > On 05/31/11 12:40, Richard Henderson wrote: >> On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: >>> #if defined(TARGET_PPC64) >>> -if (!ctx->sf_mode) { >>> TCGv t0 = tcg_temp_new(); >>> TCGv t1 = tcg_temp_new();

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-04 Thread Nathan Whitehorn
On 05/31/11 12:40, Richard Henderson wrote: On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: #if defined(TARGET_PPC64) -if (!ctx->sf_mode) { TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); You're removing a scope in which these variables were defined. Th

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-05-31 Thread Richard Henderson
On 05/31/2011 07:56 AM, Nathan Whitehorn wrote: > #if defined(TARGET_PPC64) > -if (!ctx->sf_mode) { > TCGv t0 = tcg_temp_new(); > TCGv t1 = tcg_temp_new(); You're removing a scope in which these variables were defined. That seems wrong, at minimum. r~

Re: [Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-05-31 Thread Alexander Graf
On 31.05.2011, at 16:56, Nathan Whitehorn wrote: > The mtmsr instruction is required not to modify the upper 32-bits of the > machine state register, but checks the current value of MSR[SF] to decide > whether to do this. This has the effect of zeroing the upper 32 bits of the > MSR whenever m

[Qemu-devel] [PATCH] ppc64: fix mtmsr behavior on 64-bit targets

2011-05-31 Thread Nathan Whitehorn
The mtmsr instruction is required not to modify the upper 32-bits of the machine state register, but checks the current value of MSR[SF] to decide whether to do this. This has the effect of zeroing the upper 32 bits of the MSR whenever mtmsr is executed in 64-bit mode. Unconditionally preserve