qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH target-arm] Don' use T[x] in helper


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH target-arm] Don' use T[x] in helper
Date: Wed, 8 Apr 2009 00:48:26 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Mar 24, 2009 at 08:59:16PM +0100, Torbjörn Andersson wrote:
> Hi all!
> 
> I hit a strange issue with add_cc, can't really explain how it appeared but
> it did. The patch below solved my problem.
> 
> Can someone make a qualified guess why? I'm compling with gcc 4.
> 
> However, T0 and T1 in a helper should not be used, because it creates a
> unnecessary dependency between translate.c and op_helper.c. Am I correct?
> 
> Further, if we cannot trust T0 and T1 in a helper, what about the global
> env-variable?

Thanks, I applied your patch.

> /Best regards Torbjörn Andersson
> 
> Index: op_helper.c
> ===================================================================
> --- op_helper.c       (revision 6883)
> +++ op_helper.c       (working copy)
> @@ -307,7 +307,7 @@
>  uint32_t HELPER (add_cc)(uint32_t a, uint32_t b)
>  {
>      uint32_t result;
> -    result = T0 + T1;
> +    result = a + b;
>      env->NF = env->ZF = result;
>      env->CF = result < a;
>      env->VF = (a ^ b ^ -1) & (a ^ result);
> 
> 
> 
> 

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]