ph_asm.c
936 Bytes
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
////C: '-menable-packedhalf'
////A: '--has-fpack --has-fhalf'
typedef half phalf __attribute__((ext_vector_type(2)));
int main(void)
{
volatile phalf a,b;
volatile phalf o;
asm("fdivr.ph f0,f1,f2");
asm("fdiv.ph f0,f1,f2");
asm("fdivx.ph f0,f1,f2");
asm("fmulr.ph f0,f1,f2");
asm("fmul.ph f0,f1,f2");
asm("fmulx.ph f0,f1,f2");
asm("fsqrt.ph f0,f1");
asm("fmvuu.ph f0,f1,f2");
asm("fmvll.ph f0,f1,f2");
asm("fmvul.ph f0,f1,f2");
asm("fmvlu.ph f0,f1,f2");
asm("fswap.ph f0,f1");
asm("fmvzu.ph f0,f1");
asm("fmvzl.ph f0,f1");
asm("faddr.ph f0,f1,f2");
asm("fadd.ph f0,f1,f2");
asm("faddsubr.ph f0,f1,f2");
asm("faddx.ph f0,f1,f2");
asm("fsubr.ph f0,f1,f2");
asm("fsub.ph f0,f1,f2");
asm("fsubaddr.ph f0,f1,f2");
asm("fsubx.ph f0,f1,f2");
asm("feq.ph t0,f0,f1");
asm("flt.ph t0,f0,f1");
asm("fle.ph t0,f0,f1");
return 0;
}