aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bpf/xbpf-smod-1.c
blob: b3e5816b5cf4bb957fe52af6a7ba889538fbd613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Verify that smod instruction is used for xBPF. */
/* { dg-do compile } */
/* { dg-options "-O0 -mxbpf" } */

void
foo ()
{
  signed int x = 5;
  signed int y = 2;
  signed int z = x % y;
  signed int w = x % 3;
}

/* { dg-final { scan-assembler "smod(32)?\t%r" } } */