xref: /aosp_15_r20/external/llvm/test/MC/AArch64/neon-scalar-recip.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker// Check that the assembler can handle the documented syntax for AArch64
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
6*9880d681SAndroid Build Coastguard Worker// Floating-point Reciprocal Step
7*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker    frecps h21, h16, h13
10*9880d681SAndroid Build Coastguard Worker    frecps s21, s16, s13
11*9880d681SAndroid Build Coastguard Worker    frecps d22, d30, d21
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker// CHECK: frecps  h21, h16, h13           // encoding: [0x15,0x3e,0x4d,0x5e]
14*9880d681SAndroid Build Coastguard Worker// CHECK: frecps s21, s16, s13   // encoding: [0x15,0xfe,0x2d,0x5e]
15*9880d681SAndroid Build Coastguard Worker// CHECK: frecps d22, d30, d21   // encoding: [0xd6,0xff,0x75,0x5e]
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
18*9880d681SAndroid Build Coastguard Worker// Floating-point Reciprocal Square Root Step
19*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker    frsqrts h21, h5, h12
22*9880d681SAndroid Build Coastguard Worker    frsqrts s21, s5, s12
23*9880d681SAndroid Build Coastguard Worker    frsqrts d8, d22, d18
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrts h21, h5, h12            // encoding: [0xb5,0x3c,0xcc,0x5e]
26*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrts s21, s5, s12   // encoding: [0xb5,0xfc,0xac,0x5e]
27*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrts d8, d22, d18   // encoding: [0xc8,0xfe,0xf2,0x5e]
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
30*9880d681SAndroid Build Coastguard Worker// Scalar Floating-point Reciprocal Estimate
31*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker    frecpe h19, h14
34*9880d681SAndroid Build Coastguard Worker    frecpe s19, s14
35*9880d681SAndroid Build Coastguard Worker    frecpe d13, d13
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Worker// CHECK: frecpe  h19, h14                // encoding: [0xd3,0xd9,0xf9,0x5e]
38*9880d681SAndroid Build Coastguard Worker// CHECK: frecpe s19, s14    // encoding: [0xd3,0xd9,0xa1,0x5e]
39*9880d681SAndroid Build Coastguard Worker// CHECK: frecpe d13, d13    // encoding: [0xad,0xd9,0xe1,0x5e]
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
42*9880d681SAndroid Build Coastguard Worker// Scalar Floating-point Reciprocal Exponent
43*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker    frecpx h18, h10
46*9880d681SAndroid Build Coastguard Worker    frecpx s18, s10
47*9880d681SAndroid Build Coastguard Worker    frecpx d16, d19
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Worker// CHECK: frecpx  h18, h10                // encoding: [0x52,0xf9,0xf9,0x5e]
50*9880d681SAndroid Build Coastguard Worker// CHECK: frecpx s18, s10    // encoding: [0x52,0xf9,0xa1,0x5e]
51*9880d681SAndroid Build Coastguard Worker// CHECK: frecpx d16, d19    // encoding: [0x70,0xfa,0xe1,0x5e]
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
54*9880d681SAndroid Build Coastguard Worker// Scalar Floating-point Reciprocal Square Root Estimate
55*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
56*9880d681SAndroid Build Coastguard Worker
57*9880d681SAndroid Build Coastguard Worker    frsqrte h22, h13
58*9880d681SAndroid Build Coastguard Worker    frsqrte s22, s13
59*9880d681SAndroid Build Coastguard Worker    frsqrte d21, d12
60*9880d681SAndroid Build Coastguard Worker
61*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrte h22, h13                // encoding: [0xb6,0xd9,0xf9,0x7e]
62*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrte s22, s13    // encoding: [0xb6,0xd9,0xa1,0x7e]
63*9880d681SAndroid Build Coastguard Worker// CHECK: frsqrte d21, d12    // encoding: [0x95,0xd9,0xe1,0x7e]
64