Debian Codegraph @

examples/mt19937arorc.orc

raw
1
2 .function mt19937ar_mix
3 .dest 4 mt
4 .source 4 mt1
5 .source 4 mt2
6 .temp 4 y
7 .temp 4 t1
8 .temp 4 t2
9 .const 4 c1 1
10 .const 4 UPPER_MASK 0x80000000
11 .const 4 LOWER_MASK 0x7fffffff
12 .const 4 MATRIX_A 0x9908b0df
13
14
15 loadl t1, mt
16 andl t1, t1, UPPER_MASK
17 loadl t2, mt1
18 andl t2, t2, LOWER_MASK
19 orl y, t1, t2
20 andl t1, y, c1
21 cmpeql t1, t1, c1
22 andl t1, t1, MATRIX_A
23 shrul y, y, c1
24 xorl y, y, t1
25 xorl mt, mt2, y
26
27
28 .function mt19937ar_temper
29 .dest 4 d
30 .source 4 s
31 .temp 4 y
32 .temp 4 t
33
34 loadl y, s
35 shrul t, y, 11
36 xorl y, y, t
37 shll t, y, 7
38 andl t, t, 0x9d2c5680
39 xorl y, y, t
40 shll t, y, 15
41 andl t, t, 0xefc60000
42 xorl y, y, t
43 shrul t, y, 18
44 xorl d, y, t
45
46
47 #.function mt19937ar_mix_temper
48 #.dest 4 d
49 #.dest 4 mt
50 #.source 4 mt1
51 #.source 4 mt2
52 #.temp 4 y
53 #.temp 4 t1
54 #.temp 4 t2
55 #.const 4 c1 1
56 #.const 4 UPPER_MASK 0x80000000
57 #.const 4 LOWER_MASK 0x7fffffff
58 #.const 4 MATRIX_A 0x9908b0df
59 #
60 #
61 #loadl t1, mt
62 #andl t1, t1, UPPER_MASK
63 #loadl t2, mt1
64 #andl t2, t2, LOWER_MASK
65 #orl y, t1, t2
66 #andl t1, y, c1
67 #cmpeql t1, t1, c1
68 #andl t1, t1, MATRIX_A
69 #shrul y, y, c1
70 #xorl y, y, t1
71 #xorl y, mt2, y
72 #storel mt, y
73 #shrul t1, y, 11
74 #xorl y, y, t1
75 #shll t1, y, 7
76 #andl t1, t1, 0x9d2c5680
77 #xorl y, y, t1
78 #shll t1, y, 15
79 #andl t1, t1, 0xefc60000
80 #xorl y, y, t1
81 #shrul t1, y, 18
82 #xorl d, y, t1
83
84
85