Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / aarch64 / fcvtl.s
blob8febc08673f53bac68285a22047fc809c4ef40a9
1 # mach: aarch64
3 # Check the FP convert to longer precision: fcvtl, fcvtl2.
4 # Test values 1.5, -1.5, INTMAX, and INT_MIN.
6 .include "testutils.inc"
8 .data
9 .align 4
10 input:
11 .word 1069547520
12 .word 3217031168
13 .word 1325400064
14 .word 3472883712
15 d1p5:
16 .word 0
17 .word 1073217536
18 dm1p5:
19 .word 0
20 .word -1074266112
21 dimax:
22 .word 0
23 .word 1105199104
24 dimin:
25 .word 0
26 .word -1042284544
28 start
29 adrp x0, input
30 add x0, x0, #:lo12:input
31 ld1 {v0.4s}, [x0]
33 fcvtl v1.2d, v0.2s
34 mov x1, v1.d[0]
35 adrp x2, d1p5
36 ldr x3, [x2, #:lo12:d1p5]
37 cmp x1, x3
38 bne .Lfailure
39 mov x1, v1.d[1]
40 adrp x2, dm1p5
41 ldr x3, [x2, #:lo12:dm1p5]
42 cmp x1, x3
43 bne .Lfailure
45 fcvtl2 v2.2d, v0.4s
46 mov x1, v2.d[0]
47 adrp x2, dimax
48 ldr x3, [x2, #:lo12:dimax]
49 cmp x1, x3
50 bne .Lfailure
51 mov x1, v2.d[1]
52 adrp x2, dimin
53 ldr x3, [x2, #:lo12:dimin]
54 cmp x1, x3
55 bne .Lfailure
57 pass
58 .Lfailure:
59 fail