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
|
# mach: aarch64
# Check the FP Conditional Select instruction: fcsel.
# Check 1/1 eq/neg, and 1/2 lt/gt.
.include "testutils.inc"
start
fmov s0, #1.0
fmov s1, #1.0
fmov s2, #-1.0
fcmp s0, s1
fcsel s3, s0, s2, eq
fcmp s3, s0
bne .Lfailure
fcsel s3, s0, s2, ne
fcmp s3, s2
bne .Lfailure
fmov s0, #1.0
fmov s1, #2.0
fcmp s0, s1
fcsel s3, s0, s2, lt
fcmp s3, s0
bne .Lfailure
fcsel s3, s0, s2, gt
fcmp s3, s2
bne .Lfailure
fmov d0, #1.0
fmov d1, #1.0
fmov d2, #-1.0
fcmp d0, d1
fcsel d3, d0, d2, eq
fcmp d3, d0
bne .Lfailure
fcsel d3, d0, d2, ne
fcmp d3, d2
bne .Lfailure
fmov d0, #1.0
fmov d1, #2.0
fcmp d0, d1
fcsel d3, d0, d2, lt
fcmp d3, d0
bne .Lfailure
fcsel d3, d0, d2, gt
fcmp d3, d2
bne .Lfailure
pass
.Lfailure:
fail
|