diff mbox

[07/17] ppc: fix result of DLMZB when no zero bytes are found

Message ID 1409246113-6519-8-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Aug. 28, 2014, 5:15 p.m. UTC
It must return 8 and place 8 in XER, but the current code uses
i directly which is 9 at this point of the code.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-ppc/int_helper.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Musta Sept. 3, 2014, 6:28 p.m. UTC | #1
On 8/28/2014 12:15 PM, Paolo Bonzini wrote:
> It must return 8 and place 8 in XER, but the current code uses
> i directly which is 9 at this point of the code.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  target-ppc/int_helper.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
> index 9c1c5cd..7955bf7 100644
> --- a/target-ppc/int_helper.c
> +++ b/target-ppc/int_helper.c
> @@ -2573,6 +2573,7 @@ target_ulong helper_dlmzb(CPUPPCState *env, target_ulong high,
>          }
>          i++;
>      }
> +    i = 8;
>      if (update_Rc) {
>          env->crf[0] = 0x2;
>      }
> 

Reviewed-by: Tom Musta <tommusta@gmail.com>
Alexander Graf Sept. 5, 2014, 7:26 a.m. UTC | #2
On 03.09.14 20:28, Tom Musta wrote:
> On 8/28/2014 12:15 PM, Paolo Bonzini wrote:
>> It must return 8 and place 8 in XER, but the current code uses
>> i directly which is 9 at this point of the code.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  target-ppc/int_helper.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
>> index 9c1c5cd..7955bf7 100644
>> --- a/target-ppc/int_helper.c
>> +++ b/target-ppc/int_helper.c
>> @@ -2573,6 +2573,7 @@ target_ulong helper_dlmzb(CPUPPCState *env, target_ulong high,
>>          }
>>          i++;
>>      }
>> +    i = 8;
>>      if (update_Rc) {
>>          env->crf[0] = 0x2;
>>      }
>>
> 
> Reviewed-by: Tom Musta <tommusta@gmail.com>

Thanks, applied to ppc-next.


Alex
diff mbox

Patch

diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 9c1c5cd..7955bf7 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -2573,6 +2573,7 @@  target_ulong helper_dlmzb(CPUPPCState *env, target_ulong high,
         }
         i++;
     }
+    i = 8;
     if (update_Rc) {
         env->crf[0] = 0x2;
     }