qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/


From: Alexey Baturo
Subject: Re: [PATCH 5/5] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions
Date: Wed, 14 Oct 2020 23:13:58 +0300

> The if is redundant, since that will have been done in cpu_get_tb_cpu_state while assigning pm_enabled.
I totally agree here, however I tried to do explicit checks, so this functionality is available only if a special option is supplied.
But if you think that's too much and I could do just mov(dst, src) in case PM is disabled, I'd gladly fix that.

> I suggest you drop apply_pointer_masking and just use gen_pm_adjust_address.
Sure, will do.

Thanks!



ср, 14 окт. 2020 г. в 22:24, Richard Henderson <richard.henderson@linaro.org>:
On 10/14/20 10:01 AM, Alexey Baturo wrote:
> +    if (has_ext(ctx, RVJ)) {
> +        src1 = apply_pointer_masking(ctx, src1);
> +    }

The if is redundant, since that will have been done in cpu_get_tb_cpu_state
while assigning pm_enabled.

The test for pm_enabled is in gen_pm_adjust_address.

The final thing is that the API for apply_pointer_masking is misleading.  Here,
it appears as if you are allocating a new temporary and assigning it to src1.
Which is not the case.

I suggest you drop apply_pointer_masking and just use gen_pm_adjust_address.


r~

reply via email to

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