[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/16] target/arm: Handle watchpoints in sve_ld1_r
From: |
Peter Maydell |
Subject: |
Re: [PATCH 09/16] target/arm: Handle watchpoints in sve_ld1_r |
Date: |
Thu, 16 Apr 2020 14:29:11 +0100 |
On Wed, 11 Mar 2020 at 06:44, Richard Henderson
<address@hidden> wrote:
>
> Handle all of the watchpoints for active elements all at once,
> before we've modified the vector register. This removes the
> TLB_WATCHPOINT bit from page[].flags, which means that we can
> use the normal fast path via RAM.
>
> Signed-off-by: Richard Henderson <address@hidden>
> + if (flags0 & TLB_WATCHPOINT) {
> + mem_off = info->mem_off_first[0];
> + reg_off = info->reg_off_first[0];
> + reg_last = info->reg_off_last[0];
> +
> + while (reg_off <= reg_last) {
> + uint64_t pg = vg[reg_off >> 6];
> + do {
> + if ((pg >> (reg_off & 63)) & 1) {
> + cpu_check_watchpoint(env_cpu(env), addr + mem_off, msize,
> + info->page[0].attrs, wp_access,
> retaddr);
> + }
> + reg_off += esize;
> + mem_off += msize;
> + } while (reg_off <= reg_last && (reg_off & 63));
> + }
> + }
> +
> + mem_off = info->mem_off_split;
> + if (mem_off >= 0) {
> + cpu_check_watchpoint(env_cpu(env), addr + mem_off, msize,
> + info->page[0].attrs, wp_access, retaddr);
> + }
> +
> + mem_off = info->mem_off_first[1];
> + if ((flags1 & TLB_WATCHPOINT) && mem_off >= 0) {
> + reg_off = info->reg_off_first[1];
> + reg_last = info->reg_off_last[1];
> +
> + do {
> + uint64_t pg = vg[reg_off >> 6];
> + do {
> + if ((pg >> (reg_off & 63)) & 1) {
> + cpu_check_watchpoint(env_cpu(env), addr + mem_off, msize,
> + info->page[1].attrs, wp_access,
> retaddr);
> + }
> + reg_off += esize;
> + mem_off += msize;
> + } while (reg_off & 63);
> + } while (reg_off <= reg_last);
> + }
Another pair of almost-but-not-quite-the-same loops.
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 09/16] target/arm: Handle watchpoints in sve_ld1_r,
Peter Maydell <=