| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* Regression test for tcg optimize vs sign bit repetition counting. */ |
| 3 | |
| 4 | #include <assert.h> |
| 5 | |
| 6 | int main() |
| 7 | { |
| 8 | #ifndef __x86_64__ |
| 9 | char test; |
| 10 | |
| 11 | asm("movw $0x4000, %%ax\n\t" |
| 12 | "addw %%ax, %%ax\n\t" |
| 13 | "cwtl\n\t" |
| 14 | "shrl %%eax\n\t" |
| 15 | "cmpw $-0x3fff, %%ax\n\t" |
| 16 | "setnl %%al" |
| 17 | : "=a"(test)); |
| 18 | assert(!test); |
| 19 | #endif |
| 20 | return 0; |
| 21 | } |