aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/fbranch_template.h
blob: e6bf9a269ab8ad9ec01707e7bdb212c7bbc987a5 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* FCC1:FCC0: 0 =, 1 <, 2 >, 3 u */

void OPPROTO glue(op_eval_fbne, FCC)(void)
{
// !0
    T2 = FFLAG_SET(FSR_FCC0) | FFLAG_SET(FSR_FCC1); /* L or G or U */
}

void OPPROTO glue(op_eval_fblg, FCC)(void)
{
// 1 or 2
    T2 = FFLAG_SET(FSR_FCC0) ^ FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbul, FCC)(void)
{
// 1 or 3
    T2 = FFLAG_SET(FSR_FCC0);
}

void OPPROTO glue(op_eval_fbl, FCC)(void)
{
// 1
    T2 = FFLAG_SET(FSR_FCC0) & !FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbug, FCC)(void)
{
// 2 or 3
    T2 = FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbg, FCC)(void)
{
// 2
    T2 = !FFLAG_SET(FSR_FCC0) & FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbu, FCC)(void)
{
// 3
    T2 = FFLAG_SET(FSR_FCC0) & FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbe, FCC)(void)
{
// 0
    T2 = !FFLAG_SET(FSR_FCC0) & !FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbue, FCC)(void)
{
// 0 or 3
    T2 = !(FFLAG_SET(FSR_FCC1) ^ FFLAG_SET(FSR_FCC0));
    FORCE_RET();
}

void OPPROTO glue(op_eval_fbge, FCC)(void)
{
// 0 or 2
    T2 = !FFLAG_SET(FSR_FCC0);
}

void OPPROTO glue(op_eval_fbuge, FCC)(void)
{
// !1
    T2 = !(FFLAG_SET(FSR_FCC0) & !FFLAG_SET(FSR_FCC1));
}

void OPPROTO glue(op_eval_fble, FCC)(void)
{
// 0 or 1
    T2 = !FFLAG_SET(FSR_FCC1);
}

void OPPROTO glue(op_eval_fbule, FCC)(void)
{
// !2
    T2 = !(!FFLAG_SET(FSR_FCC0) & FFLAG_SET(FSR_FCC1));
}

void OPPROTO glue(op_eval_fbo, FCC)(void)
{
// !3
    T2 = !(FFLAG_SET(FSR_FCC0) & FFLAG_SET(FSR_FCC1));
}

#undef FCC
#undef FFLAG_SET