summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/m68k/pr39726.c
blob: 94d41ba2159957482e3fb53bee2fed53560fc751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* { dg-do assemble } /*
/* { dg-options "-O2 -fomit-frame-pointer" } */
/* { dg-final { object-size text <= 228 } } */

unsigned char v;

int a0bs (unsigned char u, unsigned char w)
{
  if ((u - w) & 0x80)
    v = 1;
}

int a1bs (unsigned char u, unsigned char w)
{
  if ((u + w) & 0x80)
    v = 1;
}

int a0b (unsigned char u, unsigned char w)
{
  if ((u - w) & 0x22)
    v = 1;
}

int a1b (unsigned char u, unsigned char w)
{
  if ((u + w) & 0x22)
    v = 1;
}

int a0ws (unsigned short u, unsigned short w)
{
  if ((u - w) & 0x8000)
    v = 1;
}

int a1ws (unsigned short u, unsigned short w)
{
  if ((u + w) & 0x8000)
    v = 1;
}

int a0wbs (unsigned short u, unsigned short w)
{
  if ((u - w) & 0x80)
    v = 1;
}

int a1wbs (unsigned short u, unsigned short w)
{
  if ((u + w) & 0x80)
    v = 1;
}

int a0w (unsigned short u, unsigned short w)
{
  if ((u - w) & 0x8421)
    v = 1;
}

int a1w (unsigned short u, unsigned short w)
{
  if ((u + w) & 0x8421)
    v = 1;
}