[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
- [Qemu-devel] [PATCH v4 20/21] target-arm: Add Cortex-A57 processor, (continued)
- [Qemu-devel] [PATCH v4 20/21] target-arm: Add Cortex-A57 processor, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 03/21] target-arm: Define exception record for AArch64 exceptions, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 15/21] target-arm: Add AArch64 ELR_EL1 register., Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 02/21] target-arm: Implement AArch64 DAIF system register, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 05/21] target-arm: Add support for generating exceptions with syndrome information, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 07/21] target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 13/21] target-arm: Use dedicated CPU state fields for ARM946 access bit registers, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 08/21] target-arm: A64: Add assertion that FP access was checked, Peter Maydell, 2014/03/06
- Re: [Qemu-devel] [PATCH v4 00/21] AArch64 system emulation (boots a kernel!), Xuebing Wang, 2014/03/06