1; RUN: not llvm-mc -triple arm64-apple-darwin -mattr=neon -show-encoding -output-asm-variant=1 < %s 2>%t | FileCheck %s 2; RUN: FileCheck %s < %t --check-prefix=NO-FP16 3; RUN: llvm-mc -triple arm64-apple-darwin -mattr=neon,v8.2a,fullfp16 -show-encoding -output-asm-variant=1 < %s | FileCheck %s --check-prefix=CHECK --check-prefix=FP16 4 5foo: 6;----------------------------------------------------------------------------- 7; Floating-point arithmetic 8;----------------------------------------------------------------------------- 9 10 fabs h1, h2 11 fabs s1, s2 12 fabs d1, d2 13 14; FP16: fabs h1, h2 ; encoding: [0x41,0xc0,0xe0,0x1e] 15; NO-FP16: error: instruction requires: 16; NO-FP16-NEXT: fabs h1, h2 17; CHECK: fabs s1, s2 ; encoding: [0x41,0xc0,0x20,0x1e] 18; CHECK: fabs d1, d2 ; encoding: [0x41,0xc0,0x60,0x1e] 19 20 fadd h1, h2, h3 21 fadd s1, s2, s3 22 fadd d1, d2, d3 23 24; FP16: fadd h1, h2, h3 ; encoding: [0x41,0x28,0xe3,0x1e] 25; NO-FP16: error: instruction requires: 26; NO-FP16-NEXT: fadd h1, h2, h3 27; CHECK: fadd s1, s2, s3 ; encoding: [0x41,0x28,0x23,0x1e] 28; CHECK: fadd d1, d2, d3 ; encoding: [0x41,0x28,0x63,0x1e] 29 30 fdiv h1, h2, h3 31 fdiv s1, s2, s3 32 fdiv d1, d2, d3 33 34; FP16: fdiv h1, h2, h3 ; encoding: [0x41,0x18,0xe3,0x1e] 35; NO-FP16: error: instruction requires: 36; NO-FP16-NEXT: fdiv h1, h2, h3 37; CHECK: fdiv s1, s2, s3 ; encoding: [0x41,0x18,0x23,0x1e] 38; CHECK: fdiv d1, d2, d3 ; encoding: [0x41,0x18,0x63,0x1e] 39 40 fmadd h1, h2, h3, h4 41 fmadd s1, s2, s3, s4 42 fmadd d1, d2, d3, d4 43 44; FP16: fmadd h1, h2, h3, h4 ; encoding: [0x41,0x10,0xc3,0x1f] 45; NO-FP16: error: instruction requires: 46; NO-FP16-NEXT: fmadd h1, h2, h3, h4 47; CHECK: fmadd s1, s2, s3, s4 ; encoding: [0x41,0x10,0x03,0x1f] 48; CHECK: fmadd d1, d2, d3, d4 ; encoding: [0x41,0x10,0x43,0x1f] 49 50 fmax h1, h2, h3 51 fmax s1, s2, s3 52 fmax d1, d2, d3 53 fmaxnm h1, h2, h3 54 fmaxnm s1, s2, s3 55 fmaxnm d1, d2, d3 56 57; FP16: fmax h1, h2, h3 ; encoding: [0x41,0x48,0xe3,0x1e] 58; NO-FP16: error: instruction requires: 59; NO-FP16-NEXT: fmax h1, h2, h3 60; CHECK: fmax s1, s2, s3 ; encoding: [0x41,0x48,0x23,0x1e] 61; CHECK: fmax d1, d2, d3 ; encoding: [0x41,0x48,0x63,0x1e] 62; FP16: fmaxnm h1, h2, h3 ; encoding: [0x41,0x68,0xe3,0x1e] 63; NO-FP16: error: instruction requires: 64; NO-FP16-NEXT: fmaxnm h1, h2, h3 65; CHECK: fmaxnm s1, s2, s3 ; encoding: [0x41,0x68,0x23,0x1e] 66; CHECK: fmaxnm d1, d2, d3 ; encoding: [0x41,0x68,0x63,0x1e] 67 68 fmin h1, h2, h3 69 fmin s1, s2, s3 70 fmin d1, d2, d3 71 fminnm h1, h2, h3 72 fminnm s1, s2, s3 73 fminnm d1, d2, d3 74 75; FP16: fmin h1, h2, h3 ; encoding: [0x41,0x58,0xe3,0x1e] 76; NO-FP16: error: instruction requires: 77; NO-FP16-NEXT: fmin h1, h2, h3 78; CHECK: fmin s1, s2, s3 ; encoding: [0x41,0x58,0x23,0x1e] 79; CHECK: fmin d1, d2, d3 ; encoding: [0x41,0x58,0x63,0x1e] 80; FP16: fminnm h1, h2, h3 ; encoding: [0x41,0x78,0xe3,0x1e] 81; NO-FP16: error: instruction requires: 82; NO-FP16-NEXT: fminnm h1, h2, h3 83; CHECK: fminnm s1, s2, s3 ; encoding: [0x41,0x78,0x23,0x1e] 84; CHECK: fminnm d1, d2, d3 ; encoding: [0x41,0x78,0x63,0x1e] 85 86 fmsub h1, h2, h3, h4 87 fmsub s1, s2, s3, s4 88 fmsub d1, d2, d3, d4 89 90; FP16: fmsub h1, h2, h3, h4 ; encoding: [0x41,0x90,0xc3,0x1f] 91; NO-FP16: error: instruction requires: 92; NO-FP16-NEXT: fmsub h1, h2, h3, h4 93; CHECK: fmsub s1, s2, s3, s4 ; encoding: [0x41,0x90,0x03,0x1f] 94; CHECK: fmsub d1, d2, d3, d4 ; encoding: [0x41,0x90,0x43,0x1f] 95 96 fmul h1, h2, h3 97 fmul s1, s2, s3 98 fmul d1, d2, d3 99 100; FP16: fmul h1, h2, h3 ; encoding: [0x41,0x08,0xe3,0x1e] 101; NO-FP16: error: instruction requires: 102; NO-FP16-NEXT: fmul h1, h2, h3 103; CHECK: fmul s1, s2, s3 ; encoding: [0x41,0x08,0x23,0x1e] 104; CHECK: fmul d1, d2, d3 ; encoding: [0x41,0x08,0x63,0x1e] 105 106 fneg h1, h2 107 fneg s1, s2 108 fneg d1, d2 109 110; FP16: fneg h1, h2 ; encoding: [0x41,0x40,0xe1,0x1e] 111; NO-FP16: error: instruction requires: 112; NO-FP16-NEXT: fneg h1, h2 113; CHECK: fneg s1, s2 ; encoding: [0x41,0x40,0x21,0x1e] 114; CHECK: fneg d1, d2 ; encoding: [0x41,0x40,0x61,0x1e] 115 116 fnmadd h1, h2, h3, h4 117 fnmadd s1, s2, s3, s4 118 fnmadd d1, d2, d3, d4 119 120; FP16: fnmadd h1, h2, h3, h4 ; encoding: [0x41,0x10,0xe3,0x1f] 121; NO-FP16: error: instruction requires: 122; NO-FP16-NEXT: fnmadd h1, h2, h3, h4 123; CHECK: fnmadd s1, s2, s3, s4 ; encoding: [0x41,0x10,0x23,0x1f] 124; CHECK: fnmadd d1, d2, d3, d4 ; encoding: [0x41,0x10,0x63,0x1f] 125 126 fnmsub h1, h2, h3, h4 127 fnmsub s1, s2, s3, s4 128 fnmsub d1, d2, d3, d4 129 130; FP16: fnmsub h1, h2, h3, h4 ; encoding: [0x41,0x90,0xe3,0x1f] 131; NO-FP16: error: instruction requires: 132; NO-FP16-NEXT: fnmsub h1, h2, h3, h4 133; CHECK: fnmsub s1, s2, s3, s4 ; encoding: [0x41,0x90,0x23,0x1f] 134; CHECK: fnmsub d1, d2, d3, d4 ; encoding: [0x41,0x90,0x63,0x1f] 135 136 fnmul h1, h2, h3 137 fnmul s1, s2, s3 138 fnmul d1, d2, d3 139 140; FP16: fnmul h1, h2, h3 ; encoding: [0x41,0x88,0xe3,0x1e] 141; NO-FP16: error: instruction requires: 142; NO-FP16-NEXT: fnmul h1, h2, h3 143; CHECK: fnmul s1, s2, s3 ; encoding: [0x41,0x88,0x23,0x1e] 144; CHECK: fnmul d1, d2, d3 ; encoding: [0x41,0x88,0x63,0x1e] 145 146 fsqrt h1, h2 147 fsqrt s1, s2 148 fsqrt d1, d2 149 150; FP16: fsqrt h1, h2 ; encoding: [0x41,0xc0,0xe1,0x1e] 151; NO-FP16: error: instruction requires: 152; NO-FP16-NEXT: fsqrt h1, h2 153; CHECK: fsqrt s1, s2 ; encoding: [0x41,0xc0,0x21,0x1e] 154; CHECK: fsqrt d1, d2 ; encoding: [0x41,0xc0,0x61,0x1e] 155 156 fsub h1, h2, h3 157 fsub s1, s2, s3 158 fsub d1, d2, d3 159 160; FP16: fsub h1, h2, h3 ; encoding: [0x41,0x38,0xe3,0x1e] 161; NO-FP16: error: instruction requires: 162; NO-FP16-NEXT: fsub h1, h2, h3 163; CHECK: fsub s1, s2, s3 ; encoding: [0x41,0x38,0x23,0x1e] 164; CHECK: fsub d1, d2, d3 ; encoding: [0x41,0x38,0x63,0x1e] 165 166;----------------------------------------------------------------------------- 167; Floating-point comparison 168;----------------------------------------------------------------------------- 169 170 fccmp h1, h2, #0, eq 171 fccmp s1, s2, #0, eq 172 fccmp d1, d2, #0, eq 173 fccmpe h1, h2, #0, eq 174 fccmpe s1, s2, #0, eq 175 fccmpe d1, d2, #0, eq 176 177; FP16: fccmp h1, h2, #0, eq ; encoding: [0x20,0x04,0xe2,0x1e] 178; NO-FP16: error: instruction requires: 179; NO-FP16-NEXT: fccmp h1, h2, #0, eq 180; CHECK: fccmp s1, s2, #0, eq ; encoding: [0x20,0x04,0x22,0x1e] 181; CHECK: fccmp d1, d2, #0, eq ; encoding: [0x20,0x04,0x62,0x1e] 182; FP16: fccmpe h1, h2, #0, eq ; encoding: [0x30,0x04,0xe2,0x1e] 183; NO-FP16: error: instruction requires: 184; NO-FP16-NEXT: fccmpe h1, h2, #0, eq 185; CHECK: fccmpe s1, s2, #0, eq ; encoding: [0x30,0x04,0x22,0x1e] 186; CHECK: fccmpe d1, d2, #0, eq ; encoding: [0x30,0x04,0x62,0x1e] 187 188 fcmp h1, h2 189 fcmp s1, s2 190 fcmp d1, d2 191 fcmp h1, #0.0 192 fcmp s1, #0.0 193 fcmp d1, #0.0 194 fcmpe h1, h2 195 fcmpe s1, s2 196 fcmpe d1, d2 197 fcmpe h1, #0.0 198 fcmpe s1, #0.0 199 fcmpe d1, #0.0 200 201; FP16: fcmp h1, h2 ; encoding: [0x20,0x20,0xe2,0x1e] 202; NO-FP16: error: instruction requires: 203; NO-FP16-NEXT: fcmp h1, h2 204; CHECK: fcmp s1, s2 ; encoding: [0x20,0x20,0x22,0x1e] 205; CHECK: fcmp d1, d2 ; encoding: [0x20,0x20,0x62,0x1e] 206; FP16: fcmp h1, #0.0 ; encoding: [0x28,0x20,0xe0,0x1e] 207; NO-FP16: error: instruction requires: 208; NO-FP16-NEXT: fcmp h1, #0.0 209; CHECK: fcmp s1, #0.0 ; encoding: [0x28,0x20,0x20,0x1e] 210; CHECK: fcmp d1, #0.0 ; encoding: [0x28,0x20,0x60,0x1e] 211; FP16: fcmpe h1, h2 ; encoding: [0x30,0x20,0xe2,0x1e] 212; NO-FP16: error: instruction requires: 213; NO-FP16-NEXT: fcmpe h1, h2 214; CHECK: fcmpe s1, s2 ; encoding: [0x30,0x20,0x22,0x1e] 215; CHECK: fcmpe d1, d2 ; encoding: [0x30,0x20,0x62,0x1e] 216; FP16: fcmpe h1, #0.0 ; encoding: [0x38,0x20,0xe0,0x1e] 217; NO-FP16: error: instruction requires: 218; NO-FP16-NEXT: fcmpe h1, #0.0 219; CHECK: fcmpe s1, #0.0 ; encoding: [0x38,0x20,0x20,0x1e] 220; CHECK: fcmpe d1, #0.0 ; encoding: [0x38,0x20,0x60,0x1e] 221 222;----------------------------------------------------------------------------- 223; Floating-point conditional select 224;----------------------------------------------------------------------------- 225 226 fcsel h1, h2, h3, eq 227 fcsel s1, s2, s3, eq 228 fcsel d1, d2, d3, eq 229 230; FP16: fcsel h1, h2, h3, eq ; encoding: [0x41,0x0c,0xe3,0x1e] 231; NO-FP16: error: instruction requires: 232; NO-FP16-NEXT: fcsel h1, h2, h3, eq 233; CHECK: fcsel s1, s2, s3, eq ; encoding: [0x41,0x0c,0x23,0x1e] 234; CHECK: fcsel d1, d2, d3, eq ; encoding: [0x41,0x0c,0x63,0x1e] 235 236;----------------------------------------------------------------------------- 237; Floating-point convert 238;----------------------------------------------------------------------------- 239 240 fcvt h1, d2 241 fcvt s1, d2 242 fcvt d1, h2 243 fcvt s1, h2 244 fcvt d1, s2 245 fcvt h1, s2 246 247; CHECK: fcvt h1, d2 ; encoding: [0x41,0xc0,0x63,0x1e] 248; CHECK: fcvt s1, d2 ; encoding: [0x41,0x40,0x62,0x1e] 249; CHECK: fcvt d1, h2 ; encoding: [0x41,0xc0,0xe2,0x1e] 250; CHECK: fcvt s1, h2 ; encoding: [0x41,0x40,0xe2,0x1e] 251; CHECK: fcvt d1, s2 ; encoding: [0x41,0xc0,0x22,0x1e] 252; CHECK: fcvt h1, s2 ; encoding: [0x41,0xc0,0x23,0x1e] 253 254 fcvtas w1, d2 255 fcvtas x1, d2 256 fcvtas w1, s2 257 fcvtas x1, s2 258 fcvtas w1, h2 259 fcvtas x1, h2 260 261; CHECK: fcvtas w1, d2 ; encoding: [0x41,0x00,0x64,0x1e] 262; CHECK: fcvtas x1, d2 ; encoding: [0x41,0x00,0x64,0x9e] 263; CHECK: fcvtas w1, s2 ; encoding: [0x41,0x00,0x24,0x1e] 264; CHECK: fcvtas x1, s2 ; encoding: [0x41,0x00,0x24,0x9e] 265; FP16: fcvtas w1, h2 ; encoding: [0x41,0x00,0xe4,0x1e] 266; NO-FP16: error: instruction requires: 267; NO-FP16-NEXT: fcvtas w1, h2 268; FP16: fcvtas x1, h2 ; encoding: [0x41,0x00,0xe4,0x9e] 269; NO-FP16: error: instruction requires: 270; NO-FP16-NEXT: fcvtas x1, h2 271 272 fcvtau w1, h2 273 fcvtau w1, s2 274 fcvtau w1, d2 275 fcvtau x1, h2 276 fcvtau x1, s2 277 fcvtau x1, d2 278 279; FP16: fcvtau w1, h2 ; encoding: [0x41,0x00,0xe5,0x1e] 280; NO-FP16: error: instruction requires: 281; NO-FP16-NEXT: fcvtau w1, h2 282; CHECK: fcvtau w1, s2 ; encoding: [0x41,0x00,0x25,0x1e] 283; CHECK: fcvtau w1, d2 ; encoding: [0x41,0x00,0x65,0x1e] 284; FP16: fcvtau x1, h2 ; encoding: [0x41,0x00,0xe5,0x9e] 285; NO-FP16: error: instruction requires: 286; NO-FP16-NEXT: fcvtau x1, h2 287; CHECK: fcvtau x1, s2 ; encoding: [0x41,0x00,0x25,0x9e] 288; CHECK: fcvtau x1, d2 ; encoding: [0x41,0x00,0x65,0x9e] 289 290 fcvtms w1, h2 291 fcvtms w1, s2 292 fcvtms w1, d2 293 fcvtms x1, h2 294 fcvtms x1, s2 295 fcvtms x1, d2 296 297; FP16: fcvtms w1, h2 ; encoding: [0x41,0x00,0xf0,0x1e] 298; NO-FP16: error: instruction requires: 299; NO-FP16-NEXT: fcvtms w1, h2 300; CHECK: fcvtms w1, s2 ; encoding: [0x41,0x00,0x30,0x1e] 301; CHECK: fcvtms w1, d2 ; encoding: [0x41,0x00,0x70,0x1e] 302; FP16: fcvtms x1, h2 ; encoding: [0x41,0x00,0xf0,0x9e] 303; NO-FP16: error: instruction requires: 304; NO-FP16-NEXT: fcvtms x1, h2 305; CHECK: fcvtms x1, s2 ; encoding: [0x41,0x00,0x30,0x9e] 306; CHECK: fcvtms x1, d2 ; encoding: [0x41,0x00,0x70,0x9e] 307 308 fcvtmu w1, h2 309 fcvtmu w1, s2 310 fcvtmu w1, d2 311 fcvtmu x1, h2 312 fcvtmu x1, s2 313 fcvtmu x1, d2 314 315; FP16: fcvtmu w1, h2 ; encoding: [0x41,0x00,0xf1,0x1e] 316; NO-FP16: error: instruction requires: 317; NO-FP16-NEXT: fcvtmu w1, h2 318; CHECK: fcvtmu w1, s2 ; encoding: [0x41,0x00,0x31,0x1e] 319; CHECK: fcvtmu w1, d2 ; encoding: [0x41,0x00,0x71,0x1e] 320; FP16: fcvtmu x1, h2 ; encoding: [0x41,0x00,0xf1,0x9e] 321; NO-FP16: error: instruction requires: 322; NO-FP16-NEXT: fcvtmu x1, h2 323; CHECK: fcvtmu x1, s2 ; encoding: [0x41,0x00,0x31,0x9e] 324; CHECK: fcvtmu x1, d2 ; encoding: [0x41,0x00,0x71,0x9e] 325 326 fcvtns w1, h2 327 fcvtns w1, s2 328 fcvtns w1, d2 329 fcvtns x1, h2 330 fcvtns x1, s2 331 fcvtns x1, d2 332 333; FP16: fcvtns w1, h2 ; encoding: [0x41,0x00,0xe0,0x1e] 334; NO-FP16: error: instruction requires: 335; NO-FP16-NEXT: fcvtns w1, h2 336; CHECK: fcvtns w1, s2 ; encoding: [0x41,0x00,0x20,0x1e] 337; CHECK: fcvtns w1, d2 ; encoding: [0x41,0x00,0x60,0x1e] 338; FP16: fcvtns x1, h2 ; encoding: [0x41,0x00,0xe0,0x9e] 339; NO-FP16: error: instruction requires: 340; NO-FP16-NEXT: fcvtns x1, h2 341; CHECK: fcvtns x1, s2 ; encoding: [0x41,0x00,0x20,0x9e] 342; CHECK: fcvtns x1, d2 ; encoding: [0x41,0x00,0x60,0x9e] 343 344 fcvtnu w1, h2 345 fcvtnu w1, s2 346 fcvtnu w1, d2 347 fcvtnu x1, h2 348 fcvtnu x1, s2 349 fcvtnu x1, d2 350 351; FP16: fcvtnu w1, h2 ; encoding: [0x41,0x00,0xe1,0x1e] 352; NO-FP16: error: instruction requires: 353; NO-FP16-NEXT: fcvtnu w1, h2 354; CHECK: fcvtnu w1, s2 ; encoding: [0x41,0x00,0x21,0x1e] 355; CHECK: fcvtnu w1, d2 ; encoding: [0x41,0x00,0x61,0x1e] 356; FP16: fcvtnu x1, h2 ; encoding: [0x41,0x00,0xe1,0x9e] 357; NO-FP16: error: instruction requires: 358; NO-FP16-NEXT: fcvtnu x1, h2 359; CHECK: fcvtnu x1, s2 ; encoding: [0x41,0x00,0x21,0x9e] 360; CHECK: fcvtnu x1, d2 ; encoding: [0x41,0x00,0x61,0x9e] 361 362 fcvtps w1, h2 363 fcvtps w1, s2 364 fcvtps w1, d2 365 fcvtps x1, h2 366 fcvtps x1, s2 367 fcvtps x1, d2 368 369; FP16: fcvtps w1, h2 ; encoding: [0x41,0x00,0xe8,0x1e] 370; NO-FP16: error: instruction requires: 371; NO-FP16-NEXT: fcvtps w1, h2 372; CHECK: fcvtps w1, s2 ; encoding: [0x41,0x00,0x28,0x1e] 373; CHECK: fcvtps w1, d2 ; encoding: [0x41,0x00,0x68,0x1e] 374; FP16: fcvtps x1, h2 ; encoding: [0x41,0x00,0xe8,0x9e] 375; NO-FP16: error: instruction requires: 376; NO-FP16-NEXT: fcvtps x1, h2 377; CHECK: fcvtps x1, s2 ; encoding: [0x41,0x00,0x28,0x9e] 378; CHECK: fcvtps x1, d2 ; encoding: [0x41,0x00,0x68,0x9e] 379 380 fcvtpu w1, h2 381 fcvtpu w1, s2 382 fcvtpu w1, d2 383 fcvtpu x1, h2 384 fcvtpu x1, s2 385 fcvtpu x1, d2 386 387; FP16: fcvtpu w1, h2 ; encoding: [0x41,0x00,0xe9,0x1e] 388; NO-FP16: error: instruction requires: 389; NO-FP16-NEXT: fcvtpu w1, h2 390; CHECK: fcvtpu w1, s2 ; encoding: [0x41,0x00,0x29,0x1e] 391; CHECK: fcvtpu w1, d2 ; encoding: [0x41,0x00,0x69,0x1e] 392; FP16: fcvtpu x1, h2 ; encoding: [0x41,0x00,0xe9,0x9e] 393; NO-FP16: error: instruction requires: 394; NO-FP16-NEXT: fcvtpu x1, h2 395; CHECK: fcvtpu x1, s2 ; encoding: [0x41,0x00,0x29,0x9e] 396; CHECK: fcvtpu x1, d2 ; encoding: [0x41,0x00,0x69,0x9e] 397 398 fcvtzs w1, h2 399 fcvtzs w1, h2, #1 400 fcvtzs w1, s2 401 fcvtzs w1, s2, #1 402 fcvtzs w1, d2 403 fcvtzs w1, d2, #1 404 fcvtzs x1, h2 405 fcvtzs x1, h2, #1 406 fcvtzs x1, s2 407 fcvtzs x1, s2, #1 408 fcvtzs x1, d2 409 fcvtzs x1, d2, #1 410 411; FP16: fcvtzs w1, h2 ; encoding: [0x41,0x00,0xf8,0x1e] 412; NO-FP16: error: instruction requires: 413; NO-FP16-NEXT: fcvtzs w1, h2 414; FP16: fcvtzs w1, h2, #1 ; encoding: [0x41,0xfc,0xd8,0x1e] 415; NO-FP16: error: instruction requires: 416; NO-FP16-NEXT: fcvtzs w1, h2, #1 417; CHECK: fcvtzs w1, s2 ; encoding: [0x41,0x00,0x38,0x1e] 418; CHECK: fcvtzs w1, s2, #1 ; encoding: [0x41,0xfc,0x18,0x1e] 419; CHECK: fcvtzs w1, d2 ; encoding: [0x41,0x00,0x78,0x1e] 420; CHECK: fcvtzs w1, d2, #1 ; encoding: [0x41,0xfc,0x58,0x1e] 421; FP16: fcvtzs x1, h2 ; encoding: [0x41,0x00,0xf8,0x9e] 422; NO-FP16: error: instruction requires: 423; NO-FP16-NEXT: fcvtzs x1, h2 424; FP16: fcvtzs x1, h2, #1 ; encoding: [0x41,0xfc,0xd8,0x9e] 425; NO-FP16: error: instruction requires: 426; NO-FP16-NEXT: fcvtzs x1, h2, #1 427; CHECK: fcvtzs x1, s2 ; encoding: [0x41,0x00,0x38,0x9e] 428; CHECK: fcvtzs x1, s2, #1 ; encoding: [0x41,0xfc,0x18,0x9e] 429; CHECK: fcvtzs x1, d2 ; encoding: [0x41,0x00,0x78,0x9e] 430; CHECK: fcvtzs x1, d2, #1 ; encoding: [0x41,0xfc,0x58,0x9e] 431 432 fcvtzu w1, h2 433 fcvtzu w1, h2, #1 434 fcvtzu w1, s2 435 fcvtzu w1, s2, #1 436 fcvtzu w1, d2 437 fcvtzu w1, d2, #1 438 fcvtzu x1, h2 439 fcvtzu x1, h2, #1 440 fcvtzu x1, s2 441 fcvtzu x1, s2, #1 442 fcvtzu x1, d2 443 fcvtzu x1, d2, #1 444 445; FP16: fcvtzu w1, h2 ; encoding: [0x41,0x00,0xf9,0x1e] 446; NO-FP16: error: instruction requires: 447; NO-FP16-NEXT: fcvtzu w1, h2 448; FP16: fcvtzu w1, h2, #1 ; encoding: [0x41,0xfc,0xd9,0x1e] 449; NO-FP16: error: instruction requires: 450; NO-FP16-NEXT: fcvtzu w1, h2, #1 451; CHECK: fcvtzu w1, s2 ; encoding: [0x41,0x00,0x39,0x1e] 452; CHECK: fcvtzu w1, s2, #1 ; encoding: [0x41,0xfc,0x19,0x1e] 453; CHECK: fcvtzu w1, d2 ; encoding: [0x41,0x00,0x79,0x1e] 454; CHECK: fcvtzu w1, d2, #1 ; encoding: [0x41,0xfc,0x59,0x1e] 455; FP16: fcvtzu x1, h2 ; encoding: [0x41,0x00,0xf9,0x9e] 456; NO-FP16: error: instruction requires: 457; NO-FP16-NEXT: fcvtzu x1, h2 458; FP16: fcvtzu x1, h2, #1 ; encoding: [0x41,0xfc,0xd9,0x9e] 459; NO-FP16: error: instruction requires: 460; NO-FP16-NEXT: fcvtzu x1, h2, #1 461; CHECK: fcvtzu x1, s2 ; encoding: [0x41,0x00,0x39,0x9e] 462; CHECK: fcvtzu x1, s2, #1 ; encoding: [0x41,0xfc,0x19,0x9e] 463; CHECK: fcvtzu x1, d2 ; encoding: [0x41,0x00,0x79,0x9e] 464; CHECK: fcvtzu x1, d2, #1 ; encoding: [0x41,0xfc,0x59,0x9e] 465 466 scvtf h1, w2 467 scvtf h1, w2, #1 468 scvtf s1, w2 469 scvtf s1, w2, #1 470 scvtf d1, w2 471 scvtf d1, w2, #1 472 scvtf h1, x2 473 scvtf h1, x2, #1 474 scvtf s1, x2 475 scvtf s1, x2, #1 476 scvtf d1, x2 477 scvtf d1, x2, #1 478 479; FP16: scvtf h1, w2 ; encoding: [0x41,0x00,0xe2,0x1e] 480; NO-FP16: error: instruction requires: 481; NO-FP16-NEXT: scvtf h1, w2 482; FP16: scvtf h1, w2, #1 ; encoding: [0x41,0xfc,0xc2,0x1e] 483; NO-FP16: error: instruction requires: 484; NO-FP16-NEXT: scvtf h1, w2, #1 485; CHECK: scvtf s1, w2 ; encoding: [0x41,0x00,0x22,0x1e] 486; CHECK: scvtf s1, w2, #1 ; encoding: [0x41,0xfc,0x02,0x1e] 487; CHECK: scvtf d1, w2 ; encoding: [0x41,0x00,0x62,0x1e] 488; CHECK: scvtf d1, w2, #1 ; encoding: [0x41,0xfc,0x42,0x1e] 489; FP16: scvtf h1, x2 ; encoding: [0x41,0x00,0xe2,0x9e] 490; NO-FP16: error: instruction requires: 491; NO-FP16-NEXT: scvtf h1, x2 492; FP16: scvtf h1, x2, #1 ; encoding: [0x41,0xfc,0xc2,0x9e] 493; NO-FP16: error: instruction requires: 494; NO-FP16-NEXT: scvtf h1, x2, #1 495; CHECK: scvtf s1, x2 ; encoding: [0x41,0x00,0x22,0x9e] 496; CHECK: scvtf s1, x2, #1 ; encoding: [0x41,0xfc,0x02,0x9e] 497; CHECK: scvtf d1, x2 ; encoding: [0x41,0x00,0x62,0x9e] 498; CHECK: scvtf d1, x2, #1 ; encoding: [0x41,0xfc,0x42,0x9e] 499 500 ucvtf h1, w2 501 ucvtf h1, w2, #1 502 ucvtf s1, w2 503 ucvtf s1, w2, #1 504 ucvtf d1, w2 505 ucvtf d1, w2, #1 506 ucvtf h1, x2 507 ucvtf h1, x2, #1 508 ucvtf s1, x2 509 ucvtf s1, x2, #1 510 ucvtf d1, x2 511 ucvtf d1, x2, #1 512 513; FP16: ucvtf h1, w2 ; encoding: [0x41,0x00,0xe3,0x1e] 514; NO-FP16: error: instruction requires: 515; NO-FP16-NEXT: ucvtf h1, w2 516; FP16: ucvtf h1, w2, #1 ; encoding: [0x41,0xfc,0xc3,0x1e] 517; NO-FP16: error: instruction requires: 518; NO-FP16-NEXT: ucvtf h1, w2, #1 519; CHECK: ucvtf s1, w2 ; encoding: [0x41,0x00,0x23,0x1e] 520; CHECK: ucvtf s1, w2, #1 ; encoding: [0x41,0xfc,0x03,0x1e] 521; CHECK: ucvtf d1, w2 ; encoding: [0x41,0x00,0x63,0x1e] 522; CHECK: ucvtf d1, w2, #1 ; encoding: [0x41,0xfc,0x43,0x1e] 523; FP16: ucvtf h1, x2 ; encoding: [0x41,0x00,0xe3,0x9e] 524; NO-FP16: error: instruction requires: 525; NO-FP16-NEXT: ucvtf h1, x2 526; FP16: ucvtf h1, x2, #1 ; encoding: [0x41,0xfc,0xc3,0x9e] 527; NO-FP16: error: instruction requires: 528; NO-FP16-NEXT: ucvtf h1, x2, #1 529; CHECK: ucvtf s1, x2 ; encoding: [0x41,0x00,0x23,0x9e] 530; CHECK: ucvtf s1, x2, #1 ; encoding: [0x41,0xfc,0x03,0x9e] 531; CHECK: ucvtf d1, x2 ; encoding: [0x41,0x00,0x63,0x9e] 532; CHECK: ucvtf d1, x2, #1 ; encoding: [0x41,0xfc,0x43,0x9e] 533 534;----------------------------------------------------------------------------- 535; Floating-point move 536;----------------------------------------------------------------------------- 537 538 fmov h1, w2 539 fmov w1, h2 540 fmov h1, x2 541 fmov x1, h2 542 fmov s1, w2 543 fmov w1, s2 544 fmov d1, x2 545 fmov x1, d2 546 547; FP16: fmov h1, w2 ; encoding: [0x41,0x00,0xe7,0x1e] 548; NO-FP16: error: instruction requires: 549; NO-FP16-NEXT: fmov h1, w2 550; FP16: fmov w1, h2 ; encoding: [0x41,0x00,0xe6,0x1e] 551; NO-FP16: error: instruction requires: 552; NO-FP16-NEXT: fmov w1, h2 553; FP16: fmov h1, x2 ; encoding: [0x41,0x00,0xe7,0x9e] 554; NO-FP16: error: instruction requires: 555; NO-FP16-NEXT: fmov h1, x2 556; FP16: fmov x1, h2 ; encoding: [0x41,0x00,0xe6,0x9e] 557; NO-FP16: error: instruction requires: 558; NO-FP16-NEXT: fmov x1, h2 559; CHECK: fmov s1, w2 ; encoding: [0x41,0x00,0x27,0x1e] 560; CHECK: fmov w1, s2 ; encoding: [0x41,0x00,0x26,0x1e] 561; CHECK: fmov d1, x2 ; encoding: [0x41,0x00,0x67,0x9e] 562; CHECK: fmov x1, d2 ; encoding: [0x41,0x00,0x66,0x9e] 563 564 fmov h1, #0.125 565 fmov h1, #0x40 566 fmov s1, #0.125 567 fmov s1, #0x40 568 fmov d1, #0.125 569 fmov d1, #0x40 570 fmov d1, #-4.843750e-01 571 fmov d1, #4.843750e-01 572 fmov d3, #3 573 fmov h2, #0.0 574 fmov s2, #0.0 575 fmov d2, #0.0 576 577; FP16: fmov h1, #0.12500000 ; encoding: [0x01,0x10,0xe8,0x1e] 578; NO-FP16: error: instruction requires: 579; NO-FP16-NEXT: fmov h1, #0.125 580; FP16: fmov h1, #0.12500000 ; encoding: [0x01,0x10,0xe8,0x1e] 581; NO-FP16: error: instruction requires: 582; NO-FP16-NEXT: fmov h1, #0x40 583; CHECK: fmov s1, #0.12500000 ; encoding: [0x01,0x10,0x28,0x1e] 584; CHECK: fmov s1, #0.12500000 ; encoding: [0x01,0x10,0x28,0x1e] 585; CHECK: fmov d1, #0.12500000 ; encoding: [0x01,0x10,0x68,0x1e] 586; CHECK: fmov d1, #0.12500000 ; encoding: [0x01,0x10,0x68,0x1e] 587; CHECK: fmov d1, #-0.48437500 ; encoding: [0x01,0xf0,0x7b,0x1e] 588; CHECK: fmov d1, #0.48437500 ; encoding: [0x01,0xf0,0x6b,0x1e] 589; CHECK: fmov d3, #3.00000000 ; encoding: [0x03,0x10,0x61,0x1e] 590; FP16: fmov h2, wzr ; encoding: [0xe2,0x03,0xe7,0x1e] 591; NO-FP16: error: instruction requires: 592; NO-FP16-NEXT: fmov h2, #0.0 593; CHECK: fmov s2, wzr ; encoding: [0xe2,0x03,0x27,0x1e] 594; CHECK: fmov d2, xzr ; encoding: [0xe2,0x03,0x67,0x9e] 595 596 fmov h1, h2 597 fmov s1, s2 598 fmov d1, d2 599 600; FP16: fmov h1, h2 ; encoding: [0x41,0x40,0xe0,0x1e] 601; NO-FP16: error: instruction requires: 602; NO-FP16-NEXT: fmov h1, h2 603; CHECK: fmov s1, s2 ; encoding: [0x41,0x40,0x20,0x1e] 604; CHECK: fmov d1, d2 ; encoding: [0x41,0x40,0x60,0x1e] 605 606 607 fmov x2, v5.d[1] 608 fmov.d x9, v7[1] 609 fmov v1.d[1], x1 610 fmov.d v8[1], x6 611 612; CHECK: fmov.d x2, v5[1] ; encoding: [0xa2,0x00,0xae,0x9e] 613; CHECK: fmov.d x9, v7[1] ; encoding: [0xe9,0x00,0xae,0x9e] 614; CHECK: fmov.d v1[1], x1 ; encoding: [0x21,0x00,0xaf,0x9e] 615; CHECK: fmov.d v8[1], x6 ; encoding: [0xc8,0x00,0xaf,0x9e] 616 617 618;----------------------------------------------------------------------------- 619; Floating-point round to integral 620;----------------------------------------------------------------------------- 621 622 frinta h1, h2 623 frinta s1, s2 624 frinta d1, d2 625 626; FP16: frinta h1, h2 ; encoding: [0x41,0x40,0xe6,0x1e] 627; NO-FP16: error: instruction requires: 628; NO-FP16-NEXT: frinta h1, h2 629; CHECK: frinta s1, s2 ; encoding: [0x41,0x40,0x26,0x1e] 630; CHECK: frinta d1, d2 ; encoding: [0x41,0x40,0x66,0x1e] 631 632 frinti h1, h2 633 frinti s1, s2 634 frinti d1, d2 635 636; FP16: frinti h1, h2 ; encoding: [0x41,0xc0,0xe7,0x1e] 637; NO-FP16: error: instruction requires: 638; NO-FP16-NEXT: frinti h1, h2 639; CHECK: frinti s1, s2 ; encoding: [0x41,0xc0,0x27,0x1e] 640; CHECK: frinti d1, d2 ; encoding: [0x41,0xc0,0x67,0x1e] 641 642 frintm h1, h2 643 frintm s1, s2 644 frintm d1, d2 645 646; FP16: frintm h1, h2 ; encoding: [0x41,0x40,0xe5,0x1e] 647; NO-FP16: error: instruction requires: 648; NO-FP16-NEXT: frintm h1, h2 649; CHECK: frintm s1, s2 ; encoding: [0x41,0x40,0x25,0x1e] 650; CHECK: frintm d1, d2 ; encoding: [0x41,0x40,0x65,0x1e] 651 652 frintn h1, h2 653 frintn s1, s2 654 frintn d1, d2 655 656; FP16: frintn h1, h2 ; encoding: [0x41,0x40,0xe4,0x1e] 657; NO-FP16: error: instruction requires: 658; NO-FP16-NEXT: frintn h1, h2 659; CHECK: frintn s1, s2 ; encoding: [0x41,0x40,0x24,0x1e] 660; CHECK: frintn d1, d2 ; encoding: [0x41,0x40,0x64,0x1e] 661 662 frintp h1, h2 663 frintp s1, s2 664 frintp d1, d2 665 666; FP16: frintp h1, h2 ; encoding: [0x41,0xc0,0xe4,0x1e] 667; NO-FP16: error: instruction requires: 668; NO-FP16-NEXT: frintp h1, h2 669; CHECK: frintp s1, s2 ; encoding: [0x41,0xc0,0x24,0x1e] 670; CHECK: frintp d1, d2 ; encoding: [0x41,0xc0,0x64,0x1e] 671 672 frintx h1, h2 673 frintx s1, s2 674 frintx d1, d2 675 676; FP16: frintx h1, h2 ; encoding: [0x41,0x40,0xe7,0x1e] 677; NO-FP16: error: instruction requires: 678; NO-FP16-NEXT: frintx h1, h2 679; CHECK: frintx s1, s2 ; encoding: [0x41,0x40,0x27,0x1e] 680; CHECK: frintx d1, d2 ; encoding: [0x41,0x40,0x67,0x1e] 681 682 frintz h1, h2 683 frintz s1, s2 684 frintz d1, d2 685 686; FP16: frintz h1, h2 ; encoding: [0x41,0xc0,0xe5,0x1e] 687; NO-FP16: error: instruction requires: 688; NO-FP16-NEXT: frintz h1, h2 689; CHECK: frintz s1, s2 ; encoding: [0x41,0xc0,0x25,0x1e] 690; CHECK: frintz d1, d2 ; encoding: [0x41,0xc0,0x65,0x1e] 691 692 cmhs d0, d0, d0 693 cmtst d0, d0, d0 694 695; CHECK: cmhs d0, d0, d0 ; encoding: [0x00,0x3c,0xe0,0x7e] 696; CHECK: cmtst d0, d0, d0 ; encoding: [0x00,0x8c,0xe0,0x5e] 697 698 699 700;----------------------------------------------------------------------------- 701; Floating-point extract and narrow 702;----------------------------------------------------------------------------- 703 sqxtn b4, h2 704 sqxtn h2, s3 705 sqxtn s9, d2 706 707; CHECK: sqxtn b4, h2 ; encoding: [0x44,0x48,0x21,0x5e] 708; CHECK: sqxtn h2, s3 ; encoding: [0x62,0x48,0x61,0x5e] 709; CHECK: sqxtn s9, d2 ; encoding: [0x49,0x48,0xa1,0x5e] 710 711 sqxtun b4, h2 712 sqxtun h2, s3 713 sqxtun s9, d2 714 715; CHECK: sqxtun b4, h2 ; encoding: [0x44,0x28,0x21,0x7e] 716; CHECK: sqxtun h2, s3 ; encoding: [0x62,0x28,0x61,0x7e] 717; CHECK: sqxtun s9, d2 ; encoding: [0x49,0x28,0xa1,0x7e] 718 719 uqxtn b4, h2 720 uqxtn h2, s3 721 uqxtn s9, d2 722 723; CHECK: uqxtn b4, h2 ; encoding: [0x44,0x48,0x21,0x7e] 724; CHECK: uqxtn h2, s3 ; encoding: [0x62,0x48,0x61,0x7e] 725; CHECK: uqxtn s9, d2 ; encoding: [0x49,0x48,0xa1,0x7e] 726