qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 05/21] target-arm: Add support for generating


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v4 05/21] target-arm: Add support for generating exceptions with syndrome information
Date: Mon, 17 Mar 2014 12:40:50 +0000

On 17 March 2014 03:19, Peter Crosthwaite <address@hidden> wrote:
> On Fri, Mar 7, 2014 at 5:32 AM, Peter Maydell <address@hidden> wrote:
>> -static void gen_exception(int excp)
>> +static void gen_exception_internal(int excp)
>>  {
>> -    TCGv_i32 tmp = tcg_temp_new_i32();
>> -    tcg_gen_movi_i32(tmp, excp);
>> -    gen_helper_exception(cpu_env, tmp);
>> -    tcg_temp_free_i32(tmp);
>> +    TCGv_i32 tcg_excp = tcg_const_i32(excp);
>> +
>> +    assert(excp_is_internal(excp));
>> +    gen_helper_exception_internal(cpu_env, tcg_excp);
>> +    tcg_temp_free_i32(tcg_excp);
>> +}
>> +
>
> AFAICT this is identical to gen_exception_internal in translate-a64.c.
> Can they be de-static'd and prototyped in internals.h?

This is true, but it would break the current situation we
have where translate.c and translate-a64.c are entirely
independent and you never have to worry about breaking
one if you make changes to the other, which is why I didn't
do it. Maybe that's not very important, but it didn't seem
worth going against for the sake of a couple of helpers just
a few lines long. (If we do make them common then translate.h
would be the right place for the prototypes.)

thanks
-- PMM



reply via email to

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