summaryrefslogtreecommitdiff
path: root/reference/problem/0ad-frag.asm
blob: 588e4b21441d81f3990d0f9117fe0d111cee74ce (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
; options:
; FRAG: new compiler
@in(r0.x)	in0
@in(r0.y)	in1
@out(r1.x)	out0
@out(r1.y)	out1
@out(r1.z)	out2
@out(r1.w)	out3
@const(c5.x)	0x3a03126f, 0x3f000000, 0x3f800000, 0x40000000
@const(c6.x)	0x3f800000, 0xbf000000, 0x3de38866, 0x00000000
(sy)(ss)bary.f r0.z, 10, r0.x
bary.f r0.w, 11, r0.x
bary.f r2.y, 9, r0.x
bary.f (ei)r1.y, 8, r0.x
mov.f32f32 r0.x, r0.z
mov.f32f32 r0.y, r0.w
mov.f32f32 r1.x, r2.y
mov.f32f32 r2.w, r1.y
mov.f32f32 r1.w, r0.x
mov.f32f32 r1.z, r0.y
mov.f32f32 r3.x, r1.x
mov.f32f32 r2.x, r0.z
mov.f32f32 r3.y, r1.w
mov.f32f32 r2.z, r1.w
mov.f32f32 r1.x, r1.w
nop
sam.s (f32)(y)r1.x, r1.y, s#2, t#2
(rpt2)nop
(ss)nop
sam.s (f32)(w)r1.x, r2.w, s#2, t#2
nop
sam.s (f32)(z)r1.x, r2.x, s#2, t#2
nop
sam.s (f32)(x)r1.x, r0.z, s#2, t#2
end
nop
nop
nop
; FRAG: outputs: r1.x (1:0)
; FRAG: inputs: r0.x (1:0,cm=f,il=8,b=1) r1.x (5:0,cm=f,il=12,b=1) r0.x (5:2,cm=f,il=16,b=1) r3.x (5:3,cm=f,il=20,b=1)
; FRAG: 27 instructions, 0 half, 4 full