qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/8] target-ppc: Add bctar Instructio


From: Alexander Graf
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/8] target-ppc: Add bctar Instruction
Date: Mon, 27 Jan 2014 22:44:35 +0100

On 27.01.2014, at 20:34, Tom Musta <address@hidden> wrote:

> On 1/27/2014 12:46 PM, Alexander Graf wrote:
>>> static inline void gen_bcond(DisasContext *ctx, int type)
>>>> {
>>>> @@ -3756,10 +3757,12 @@ static inline void gen_bcond(DisasContext *ctx, 
>>>> int type)
>>>>    TCGv target;
>>>> 
>>>>    ctx->exception = POWERPC_EXCP_BRANCH;
>>>> -    if (type == BCOND_LR || type == BCOND_CTR) {
>>>> +    if (type == BCOND_LR || type == BCOND_CTR || type == BCOND_TAR) {
>>>>        target = tcg_temp_local_new();
>>>>        if (type == BCOND_CTR)
>>>>            tcg_gen_mov_tl(target, cpu_ctr);
>>>> +        else if (type == BCOND_TAR)
>>>> +            gen_load_spr(target, SPR_TAR);
>> How frequently is this used in generated code? Would it make sense to make 
>> it a global TCG variable?
>> 
> 
> I have not yet seen a case of this being generated by the newer compilers.  
> But it is certainly not difficult
> or much more code to make it be a global.

Well, we shouldn't waste a global on a register that doesn't get used 
frequently, so I'd say we leave it like this for now and change it to a global 
if / when we see it used often.


Alex




reply via email to

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