1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s 2 3 // Check that the assembler can handle the documented syntax for AArch64 4 5 //---------------------------------------------------------------------- 6 // Scalar Signed Integer Convert To Floating-point 7 //---------------------------------------------------------------------- 8 9 scvtf s22, s13 10 scvtf d21, d12 11 12 // CHECK: scvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x5e] 13 // CHECK: scvtf d21, d12 // encoding: [0x95,0xd9,0x61,0x5e] 14 15 //---------------------------------------------------------------------- 16 // Scalar Unsigned Integer Convert To Floating-point 17 //---------------------------------------------------------------------- 18 19 ucvtf s22, s13 20 ucvtf d21, d14 21 22 // CHECK: ucvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x7e] 23 // CHECK: ucvtf d21, d14 // encoding: [0xd5,0xd9,0x61,0x7e] 24 25 //---------------------------------------------------------------------- 26 // Scalar Signed Fixed-point Convert To Floating-Point (Immediate) 27 //---------------------------------------------------------------------- 28 29 scvtf s22, s13, #32 30 scvtf d21, d12, #64 31 32 // CHECK: scvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x5f] 33 // CHECK: scvtf d21, d12, #64 // encoding: [0x95,0xe5,0x40,0x5f] 34 35 //---------------------------------------------------------------------- 36 // Scalar Unsigned Fixed-point Convert To Floating-Point (Immediate) 37 //---------------------------------------------------------------------- 38 39 ucvtf s22, s13, #32 40 ucvtf d21, d14, #64 41 42 // CHECK: ucvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x7f] 43 // CHECK: ucvtf d21, d14, #64 // encoding: [0xd5,0xe5,0x40,0x7f] 44 45 //---------------------------------------------------------------------- 46 // Scalar Floating-point Convert To Signed Fixed-point (Immediate) 47 //---------------------------------------------------------------------- 48 49 fcvtzs s21, s12, #1 50 fcvtzs d21, d12, #1 51 52 // CHECK: fcvtzs s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x5f] 53 // CHECK: fcvtzs d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x5f] 54 55 //---------------------------------------------------------------------- 56 // Scalar Floating-point Convert To Unsigned Fixed-point (Immediate) 57 //---------------------------------------------------------------------- 58 59 fcvtzu s21, s12, #1 60 fcvtzu d21, d12, #1 61 62 // CHECK: fcvtzu s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x7f] 63 // CHECK: fcvtzu d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x7f] 64 65 //---------------------------------------------------------------------- 66 // Scalar Floating-point Convert To Lower Precision Narrow, Rounding To 67 // Odd 68 //---------------------------------------------------------------------- 69 70 fcvtxn s22, d13 71 72 // CHECK: fcvtxn s22, d13 // encoding: [0xb6,0x69,0x61,0x7e] 73 74 //---------------------------------------------------------------------- 75 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest 76 // With Ties To Away 77 //---------------------------------------------------------------------- 78 79 fcvtas s12, s13 80 fcvtas d21, d14 81 82 // CHECK: fcvtas s12, s13 // encoding: [0xac,0xc9,0x21,0x5e] 83 // CHECK: fcvtas d21, d14 // encoding: [0xd5,0xc9,0x61,0x5e] 84 85 //---------------------------------------------------------------------- 86 // Scalar Floating-point Convert To Unsigned Integer, Rounding To 87 // Nearest With Ties To Away 88 //---------------------------------------------------------------------- 89 90 fcvtau s12, s13 91 fcvtau d21, d14 92 93 // CHECK: fcvtau s12, s13 // encoding: [0xac,0xc9,0x21,0x7e] 94 // CHECK: fcvtau d21, d14 // encoding: [0xd5,0xc9,0x61,0x7e] 95 96 //---------------------------------------------------------------------- 97 // Scalar Floating-point Convert To Signed Integer, Rounding Toward 98 // Minus Infinity 99 //---------------------------------------------------------------------- 100 101 fcvtms s22, s13 102 fcvtms d21, d14 103 104 // CHECK: fcvtms s22, s13 // encoding: [0xb6,0xb9,0x21,0x5e] 105 // CHECK: fcvtms d21, d14 // encoding: [0xd5,0xb9,0x61,0x5e] 106 107 //---------------------------------------------------------------------- 108 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward 109 // Minus Infinity 110 //---------------------------------------------------------------------- 111 112 fcvtmu s12, s13 113 fcvtmu d21, d14 114 115 // CHECK: fcvtmu s12, s13 // encoding: [0xac,0xb9,0x21,0x7e] 116 // CHECK: fcvtmu d21, d14 // encoding: [0xd5,0xb9,0x61,0x7e] 117 118 //---------------------------------------------------------------------- 119 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest 120 // With Ties To Even 121 //---------------------------------------------------------------------- 122 123 fcvtns s22, s13 124 fcvtns d21, d14 125 126 // CHECK: fcvtns s22, s13 // encoding: [0xb6,0xa9,0x21,0x5e] 127 // CHECK: fcvtns d21, d14 // encoding: [0xd5,0xa9,0x61,0x5e] 128 129 //---------------------------------------------------------------------- 130 // Scalar Floating-point Convert To Unsigned Integer, Rounding To 131 // Nearest With Ties To Even 132 //---------------------------------------------------------------------- 133 134 fcvtnu s12, s13 135 fcvtnu d21, d14 136 137 // CHECK: fcvtnu s12, s13 // encoding: [0xac,0xa9,0x21,0x7e] 138 // CHECK: fcvtnu d21, d14 // encoding: [0xd5,0xa9,0x61,0x7e] 139 140 //---------------------------------------------------------------------- 141 // Scalar Floating-point Convert To Signed Integer, Rounding Toward 142 // Positive Infinity 143 //---------------------------------------------------------------------- 144 145 fcvtps s22, s13 146 fcvtps d21, d14 147 148 // CHECK: fcvtps s22, s13 // encoding: [0xb6,0xa9,0xa1,0x5e] 149 // CHECK: fcvtps d21, d14 // encoding: [0xd5,0xa9,0xe1,0x5e] 150 151 //---------------------------------------------------------------------- 152 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward 153 // Positive Infinity 154 //---------------------------------------------------------------------- 155 156 fcvtpu s12, s13 157 fcvtpu d21, d14 158 159 // CHECK: fcvtpu s12, s13 // encoding: [0xac,0xa9,0xa1,0x7e] 160 // CHECK: fcvtpu d21, d14 // encoding: [0xd5,0xa9,0xe1,0x7e] 161 162 //---------------------------------------------------------------------- 163 // Scalar Floating-point Convert To Signed Integer, Rounding Toward Zero 164 //---------------------------------------------------------------------- 165 166 fcvtzs s12, s13 167 fcvtzs d21, d14 168 169 // CHECK: fcvtzs s12, s13 // encoding: [0xac,0xb9,0xa1,0x5e] 170 // CHECK: fcvtzs d21, d14 // encoding: [0xd5,0xb9,0xe1,0x5e] 171 172 //---------------------------------------------------------------------- 173 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward 174 // Zero 175 //---------------------------------------------------------------------- 176 177 fcvtzu s12, s13 178 fcvtzu d21, d14 179 180 // CHECK: fcvtzu s12, s13 // encoding: [0xac,0xb9,0xa1,0x7e] 181 // CHECK: fcvtzu d21, d14 // encoding: [0xd5,0xb9,0xe1,0x7e] 182