]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Add tests for fcvt, fcvtzs and fcvtzu
authorAlice Carlotti <alice.carlotti@arm.com>
Sun, 20 Apr 2025 22:23:42 +0000 (23:23 +0100)
committerAlice Carlotti <alice.carlotti@arm.com>
Fri, 9 May 2025 19:27:19 +0000 (20:27 +0100)
Other instructions in the encoding group are tested in float-fp16.d, so
add these instructions to the existing test file.

gas/testsuite/gas/aarch64/float-fp16.d
gas/testsuite/gas/aarch64/float-fp16.s

index 732a27669159c121d888935b9a40e4a9c461ee79..c7a1200486cadc69c8bf1ee1ae66121c1bd3e1a7 100644 (file)
@@ -41,6 +41,24 @@ Disassembly of section \.text:
  *[0-9a-f]+:   1ee1c020        fsqrt   h0, h1
  *[0-9a-f]+:   1e21c020        fsqrt   s0, s1
  *[0-9a-f]+:   1e61c020        fsqrt   d0, d1
+ *[0-9a-f]+:   1ee24000        fcvt    s0, h0
+ *[0-9a-f]+:   1ee2401f        fcvt    s31, h0
+ *[0-9a-f]+:   1ee243e0        fcvt    s0, h31
+ *[0-9a-f]+:   1ee2c000        fcvt    d0, h0
+ *[0-9a-f]+:   1ee2c01f        fcvt    d31, h0
+ *[0-9a-f]+:   1ee2c3e0        fcvt    d0, h31
+ *[0-9a-f]+:   1e23c000        fcvt    h0, s0
+ *[0-9a-f]+:   1e23c01f        fcvt    h31, s0
+ *[0-9a-f]+:   1e23c3e0        fcvt    h0, s31
+ *[0-9a-f]+:   1e22c000        fcvt    d0, s0
+ *[0-9a-f]+:   1e22c01f        fcvt    d31, s0
+ *[0-9a-f]+:   1e22c3e0        fcvt    d0, s31
+ *[0-9a-f]+:   1e63c000        fcvt    h0, d0
+ *[0-9a-f]+:   1e63c01f        fcvt    h31, d0
+ *[0-9a-f]+:   1e63c3e0        fcvt    h0, d31
+ *[0-9a-f]+:   1e624000        fcvt    s0, d0
+ *[0-9a-f]+:   1e62401f        fcvt    s31, d0
+ *[0-9a-f]+:   1e6243e0        fcvt    s0, d31
  *[0-9a-f]+:   1ee44020        frintn  h0, h1
  *[0-9a-f]+:   1e244020        frintn  s0, s1
  *[0-9a-f]+:   1e644020        frintn  d0, d1
@@ -151,6 +169,14 @@ Disassembly of section \.text:
  *[0-9a-f]+:   9e710001        fcvtmu  x1, d0
  *[0-9a-f]+:   1ef10001        fcvtmu  w1, h0
  *[0-9a-f]+:   9ef10001        fcvtmu  x1, h0
+ *[0-9a-f]+:   1e380001        fcvtzs  w1, s0
+ *[0-9a-f]+:   9e780001        fcvtzs  x1, d0
+ *[0-9a-f]+:   1ef80001        fcvtzs  w1, h0
+ *[0-9a-f]+:   9ef80001        fcvtzs  x1, h0
+ *[0-9a-f]+:   1e390001        fcvtzu  w1, s0
+ *[0-9a-f]+:   9e790001        fcvtzu  x1, d0
+ *[0-9a-f]+:   1ef90001        fcvtzu  w1, h0
+ *[0-9a-f]+:   9ef90001        fcvtzu  x1, h0
  *[0-9a-f]+:   1e220020        scvtf   s0, w1
  *[0-9a-f]+:   9e620020        scvtf   d0, x1
  *[0-9a-f]+:   1ee20020        scvtf   h0, w1
index 0c3003807ab33151a7c4b308c0f8aeee430dc078..e5d13bd24b4a0f4e7523448044f694108002a0e4 100644 (file)
        .endm
 
        .text
-       .irp op, fabs, fneg, fsqrt, frintn, frintp, frintm, frintz
+       .irp op, fabs, fneg, fsqrt
        sdp1src \op
        .endr
 
-       .irp op, frinta, frintx, frinti
+       fcvt s0, h0
+       fcvt s31, h0
+       fcvt s0, h31
+       fcvt d0, h0
+       fcvt d31, h0
+       fcvt d0, h31
+       fcvt h0, s0
+       fcvt h31, s0
+       fcvt h0, s31
+       fcvt d0, s0
+       fcvt d31, s0
+       fcvt d0, s31
+       fcvt h0, d0
+       fcvt h31, d0
+       fcvt h0, d31
+       fcvt s0, d0
+       fcvt s31, d0
+       fcvt s0, d31
+
+       .irp op, frintn, frintp, frintm, frintz, frinta, frintx, frinti
        sdp1src \op
        .endr
 
        scvt_fp2int \op
        .endr
 
+       .text
+       .irp op, fcvtzs, fcvtzu
+       scvt_fp2int \op
+       .endr
+
        .irp op, scvtf, ucvtf
        scvt_int2fp \op
        .endr