summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/5149_cmm.cmm
blob: b1e3dd6c430091b6945a0fcc9b804c8cf7435639 (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
#include "Cmm.h"

/* This code is carefully arranged to tickle the bug reported in #5149 */
f5149
{
    D_ z;

    z = D1;

    W_ x,y;
    x = R1;
    y = R2;

    if (x > y) {
       goto a; /* this jump is shortcutted to g5149 */
    }  else {
       goto b;
    }

  a:
    jump g5149;
  b:
    RET_N(TO_W_(%f2i32(z)));
}

g5149
{
    jump %ENTRY_CODE(Sp(0));
}