QEMU main repository: Please see https://www.qemu.org/docs/master/devel/submitting-a-patch.html for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website. http://www.qemu.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
596 B
28 lines
596 B
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* See https://gitlab.com/qemu-project/qemu/-/issues/2248 */
|
|
|
|
#include <assert.h>
|
|
|
|
__attribute__((noinline))
|
|
long test(long x, long y, long sh)
|
|
{
|
|
long r;
|
|
asm("cmp %1, %2\n\t"
|
|
"cset x12, lt\n\t"
|
|
"and w11, w12, #0xff\n\t"
|
|
"cmp w11, #0\n\t"
|
|
"csetm x14, ne\n\t"
|
|
"lsr x13, x14, %3\n\t"
|
|
"sxtb %0, w13"
|
|
: "=r"(r)
|
|
: "r"(x), "r"(y), "r"(sh)
|
|
: "x11", "x12", "x13", "x14");
|
|
return r;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
long r = test(0, 1, 2);
|
|
assert(r == -1);
|
|
return 0;
|
|
}
|
|
|