From: Maciej W. Rozycki Date: Sat, 5 Dec 2020 18:26:25 +0000 (+0000) Subject: VAX: Add a test for the SImode `ffs' operation X-Git-Tag: upstream/12.2.0~11176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65eee57a8cccc77a1bfd5ad5cde53460ad564124;p=platform%2Fupstream%2Fgcc.git VAX: Add a test for the SImode `ffs' operation gcc/testsuite/ * gcc.target/vax/ffssi.c: New test. --- diff --git a/gcc/testsuite/gcc.target/vax/ffssi.c b/gcc/testsuite/gcc.target/vax/ffssi.c new file mode 100644 index 0000000..3e7a3c2 --- /dev/null +++ b/gcc/testsuite/gcc.target/vax/ffssi.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ + +int +ffssi (int x) +{ + return __builtin_ffs (x); +} + +/* Expect assembly like: + + ffs $0,$32,%r1,%r0 + jneq .L2 + mnegl $1,%r0 +.L2: + incl %r0 + + */ + +/* { dg-final { scan-assembler "\tffs \\\$0,\\\$32," } } */