[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/21] target-mips: Status.UX/SX/KX enable 32-bi
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH 11/21] target-mips: Status.UX/SX/KX enable 32-bit address wrapping |
Date: |
Mon, 2 Jun 2014 09:52:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 |
On 30/05/14 23:41, Aurelien Jarno wrote:
>> In R6 the special behaviour for data references is also specified for Kernel
>> and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic
>> MIPS_HFLAG_X
>> indicating whether 64-bit mode is enabled in current operating mode.
>
> I haven't found any indication of that in the MIPS64R6 manual (MD00091
> version 6.00). Section 4.10 still only mentions the user mode.
>
> Did I miss something?
You can find it in the Volume-II document (MD00087): Section "2.2.2.4.3
memory_address". It seems that some parts of MD00091 document haven't
been fully updated yet.
>> +#if defined(TARGET_MIPS64)
>> +static inline int is_wrapping_needed(DisasContext *ctx)
>> +{
>> + if (!(ctx->hflags & MIPS_HFLAG_X)) {
>> + /* If not R6 then wrap only in User Mode */
>> + if ((ctx->insn_flags & ISA_MIPS64R6) ||
>> + ((ctx->hflags & MIPS_HFLAG_KSU) == MIPS_HFLAG_UM)) {
>> + return 1;
>> + }
>> + }
>> + return 0;
>> +}
>> +#endif
>
> As Richard said, this code should be moved above, and the HFLAG semantic
> should be changed to "address wrapping needed". The current code is
> already wrong (and I am afraid I am the author...).
>
> So this could be done by renaming the HFLAG to for exemple
> MIPS_HFLAG_AWRAP, and checking only for this flag in gen_op_addr_add.
> Then the checks have to be adapted in compute_hflags, including the R6
> case.
I'll correct this. Thanks for the suggestion.
Leon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 11/21] target-mips: Status.UX/SX/KX enable 32-bit address wrapping,
Leon Alrae <=