mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
1270a3f57c
commit
9ad2ba6e8e
2 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue