Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / x86_64 / test-2175.c
blobaafd037bce2b5cd5db784cc1f22f5a6aeacc310b
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* See https://gitlab.com/qemu-project/qemu/-/issues/2185 */
4 #include <assert.h>
6 int test_setc(unsigned int x, unsigned int y)
8 asm("blsi %1, %0; setc %b0" : "+r"(x) : "r"(y));
9 return (unsigned char)x;
12 int test_pushf(unsigned int x, unsigned int y)
14 asm("blsi %1, %0; pushf; pop %q0" : "+r"(x) : "r"(y));
15 return x & 1;
18 int main()
20 assert(test_setc(1, 0xedbf530a));
21 assert(test_pushf(1, 0xedbf530a));
22 return 0;