diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-01-14 13:32:06 -1000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-02-27 09:18:55 +0100 |
commit | 9ad2ba6e8e7fc195d0dd0b76ab38bd2fceb1bdd4 (patch) | |
tree | 339144bbb157fe61573bcfa576af2385d253fed4 /tests | |
parent | 1270a3f57c9221080f3205a15964814ff8359ca9 (diff) | |
download | qemu-9ad2ba6e8e7fc195d0dd0b76ab38bd2fceb1bdd4.zip qemu-9ad2ba6e8e7fc195d0dd0b76ab38bd2fceb1bdd4.tar.gz qemu-9ad2ba6e8e7fc195d0dd0b76ab38bd2fceb1bdd4.tar.bz2 |
target/i386: Fix BZHI instruction
We did not correctly handle N >= operand size.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1374
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230114233206.3118472-1-richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tcg/i386/test-i386-bmi2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tcg/i386/test-i386-bmi2.c b/tests/tcg/i386/test-i386-bmi2.c index 982d4ab..0244df7 100644 --- a/tests/tcg/i386/test-i386-bmi2.c +++ b/tests/tcg/i386/test-i386-bmi2.c @@ -123,6 +123,9 @@ int main(int argc, char *argv[]) { result = bzhiq(mask, 0x1f); assert(result == (mask & ~(-1 << 30))); + result = bzhiq(mask, 0x40); + assert(result == mask); + result = rorxq(0x2132435465768798, 8); assert(result == 0x9821324354657687); |