aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/beam_validator_SUITE_data/stack.S
blob: e4356a9d009fe4c4ef85d5de5462fd216efd71c7 (plain) (blame)
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
{module, stack}.  %% version = 0

{exports, [{a,2},{b,2},{c,2},{d,2},{e,2},{bad_1,0},{bad_2,0},{foo,0}]}.

{attributes, []}.

{labels, 17}.


{function, a, 2, 2}.
  {label,1}.
    {func_info,{atom,t},{atom,a},2}.
  {label,2}.
    {allocate,2,2}.
    {move,{x,1},{y,1}}.
    {move,{x,0},{y,0}}.
    {'%live',0}.
    {call,0,{f,16}}.
    {bif,'+',{f,0},[{y,0},{y,1}],{x,0}}.
    {'%live',1}.
    return.


{function, b, 2, 4}.
  {label,3}.
    {func_info,{atom,t},{atom,b},2}.
  {label,4}.
    {deallocate,2}.
    return.


{function, c, 2, 6}.
  {label,5}.
    {func_info,{atom,t},{atom,c},2}.
  {label,6}.
    {allocate,2,2}.
    {move,{x,1},{y,1}}.
    {move,{x,0},{y,0}}.
    {'%live',0}.
    {call,0,{f,16}}.
    {bif,'+',{f,0},[{y,0},{y,1}],{x,0}}.
    {'%live',1}.
    {deallocate,2}.
    {deallocate,2}.
    return.


{function, d, 2, 8}.
  {label,7}.
    {func_info,{atom,t},{atom,d},2}.
  {label,8}.
    {allocate,2,2}.
    {allocate,2,2}.
    {deallocate,2}.
    return.

{function, e, 2, 14}.
  {label,13}.
    {func_info,{atom,t},{atom,e},2}.
  {label,14}.
    {allocate,2,2}.
    {move,{atom,ok},{x,0}}.
    {deallocate,5}.
    return.

	
{function, bad_1, 0, 10}.
  {label,9}.
    {func_info,{atom,t},{atom,bad_1},0}.
  {label,10}.
    {allocate_zero,2,10}.
    {move,{y,0},{x,0}}.
    return.


{function, bad_2, 0, 12}.
  {label,11}.
    {func_info,{atom,t},{atom,bad_2},0}.
  {label,12}.
    {allocate_zero,2,0}.
    {move,{y,0},{x,0}}.
    return.

{function, foo, 0, 16}.
  {label,15}.
    {func_info,{atom,t},{atom,foo},0}.
  {label,16}.
    {move,{atom,ok},{x,0}}.
    return.