1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Copyright 2024 Linaro, Ltd. */
3 /* See https://gitlab.com/qemu-project/qemu/-/issues/2413 */
7 void test(unsigned long *a
, unsigned long *d
, unsigned long c
)
9 asm("xorl %%eax, %%eax\n\t"
10 "xorl %%edx, %%edx\n\t"
11 "testb $0x20, %%cl\n\t"
14 "shll %%cl, %%eax\n\t"
15 "shll %%cl, %%edx\n\t"
22 unsigned long a
, c
, d
;
24 for (c
= 0; c
< 64; c
++) {
26 assert(a
== (c
& 0x20 ? 0 : 1u << (c
& 0x1f)));
27 assert(d
== (c
& 0x20 ? 1u << (c
& 0x1f) : 0));