[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] target-mips: Misaligned Memory Accesses for
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] target-mips: Misaligned Memory Accesses for MSA |
Date: |
Tue, 5 May 2015 15:51:16 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 01/05/2015 16:43, Peter Maydell wrote:
>> +#if !defined(CONFIG_USER_ONLY)
>> +static bool cpu_mips_validate_msa_block_access(CPUMIPSState *env,
>> + target_ulong address, int df, int
>> rw)
>> +{
>> + int i;
>> + for (i = 0; i < DF_ELEMENTS(df); i++) {
>> + if (!cpu_mips_validate_access(env, address + (i << df),
>> + address, (1 << df), rw)) {
>> + CPUState *cs = CPU(mips_env_get_cpu(env));
>> + helper_raise_exception_err(env, cs->exception_index,
>> + env->error_code);
>
> I was wondering if this would get the correct PC in the exception
> case, but we always call save_cpu_state() before calling the
> msa_ld/st_df helpers, so it will.
FYI, quite recently Richard suggested a clean-up for this (and all other
MIPS load/store instructions using helpers), so save_cpu_state()
wouldn’t be required. I haven’t got round to it yet but sounds like a
nice improvement.
Leon