|
From: | Richard Henderson |
Subject: | Re: [PATCH 28/37] target/i386: reimplement 0x0f 0x38, add AVX |
Date: | Thu, 15 Sep 2022 07:50:25 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 9/14/22 18:04, Paolo Bonzini wrote:
+void glue(helper_vpgatherdd, SUFFIX)(CPUX86State *env, + Reg *d, Reg *v, Reg *s, target_ulong a0, unsigned scale) +{ + int i; + for (i = 0; i < (2 << SHIFT); i++) { + if (v->L(i) >> 31) { + target_ulong addr = a0 + + ((target_ulong)(int32_t)s->L(i) << scale); + d->L(i) = cpu_ldl_data_ra(env, addr, GETPC()); + } + v->L(i) = 0; + } +}Better to not modify registers until all potential #GP are raised.This is actually intentional: elements of v are zeroes whenever an element is read successfully, so that values are not reread when the instruction restarts. The manual says "If a fault is triggered by an element and delivered, all elements closer to the LSB of the destination zmm will be completed".
Ooo, I had never noticed that. r~
[Prev in Thread] | Current Thread | [Next in Thread] |