127 lines · plain
1// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s2 3// Check that the assembler can handle the documented syntax for AArch644 5//----------------------------------------------------------------------6// Vector Maximum Pairwise (Signed and Unsigned Integer)7//----------------------------------------------------------------------8 smaxp v0.8b, v1.8b, v2.8b9 smaxp v0.16b, v1.16b, v2.16b10 smaxp v0.4h, v1.4h, v2.4h11 smaxp v0.8h, v1.8h, v2.8h12 smaxp v0.2s, v1.2s, v2.2s13 smaxp v0.4s, v1.4s, v2.4s14 15// CHECK: smaxp v0.8b, v1.8b, v2.8b // encoding: [0x20,0xa4,0x22,0x0e]16// CHECK: smaxp v0.16b, v1.16b, v2.16b // encoding: [0x20,0xa4,0x22,0x4e]17// CHECK: smaxp v0.4h, v1.4h, v2.4h // encoding: [0x20,0xa4,0x62,0x0e]18// CHECK: smaxp v0.8h, v1.8h, v2.8h // encoding: [0x20,0xa4,0x62,0x4e]19// CHECK: smaxp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xa4,0xa2,0x0e]20// CHECK: smaxp v0.4s, v1.4s, v2.4s // encoding: [0x20,0xa4,0xa2,0x4e]21 22 umaxp v0.8b, v1.8b, v2.8b23 umaxp v0.16b, v1.16b, v2.16b24 umaxp v0.4h, v1.4h, v2.4h25 umaxp v0.8h, v1.8h, v2.8h26 umaxp v0.2s, v1.2s, v2.2s27 umaxp v0.4s, v1.4s, v2.4s28 29// CHECK: umaxp v0.8b, v1.8b, v2.8b // encoding: [0x20,0xa4,0x22,0x2e]30// CHECK: umaxp v0.16b, v1.16b, v2.16b // encoding: [0x20,0xa4,0x22,0x6e]31// CHECK: umaxp v0.4h, v1.4h, v2.4h // encoding: [0x20,0xa4,0x62,0x2e]32// CHECK: umaxp v0.8h, v1.8h, v2.8h // encoding: [0x20,0xa4,0x62,0x6e]33// CHECK: umaxp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xa4,0xa2,0x2e]34// CHECK: umaxp v0.4s, v1.4s, v2.4s // encoding: [0x20,0xa4,0xa2,0x6e]35 36//----------------------------------------------------------------------37// Vector Minimum Pairwise (Signed and Unsigned Integer)38//----------------------------------------------------------------------39 sminp v0.8b, v1.8b, v2.8b40 sminp v0.16b, v1.16b, v2.16b41 sminp v0.4h, v1.4h, v2.4h42 sminp v0.8h, v1.8h, v2.8h43 sminp v0.2s, v1.2s, v2.2s44 sminp v0.4s, v1.4s, v2.4s45 46// CHECK: sminp v0.8b, v1.8b, v2.8b // encoding: [0x20,0xac,0x22,0x0e]47// CHECK: sminp v0.16b, v1.16b, v2.16b // encoding: [0x20,0xac,0x22,0x4e]48// CHECK: sminp v0.4h, v1.4h, v2.4h // encoding: [0x20,0xac,0x62,0x0e]49// CHECK: sminp v0.8h, v1.8h, v2.8h // encoding: [0x20,0xac,0x62,0x4e]50// CHECK: sminp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xac,0xa2,0x0e]51// CHECK: sminp v0.4s, v1.4s, v2.4s // encoding: [0x20,0xac,0xa2,0x4e]52 53 uminp v0.8b, v1.8b, v2.8b54 uminp v0.16b, v1.16b, v2.16b55 uminp v0.4h, v1.4h, v2.4h56 uminp v0.8h, v1.8h, v2.8h57 uminp v0.2s, v1.2s, v2.2s58 uminp v0.4s, v1.4s, v2.4s59 60// CHECK: uminp v0.8b, v1.8b, v2.8b // encoding: [0x20,0xac,0x22,0x2e]61// CHECK: uminp v0.16b, v1.16b, v2.16b // encoding: [0x20,0xac,0x22,0x6e]62// CHECK: uminp v0.4h, v1.4h, v2.4h // encoding: [0x20,0xac,0x62,0x2e]63// CHECK: uminp v0.8h, v1.8h, v2.8h // encoding: [0x20,0xac,0x62,0x6e]64// CHECK: uminp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xac,0xa2,0x2e]65// CHECK: uminp v0.4s, v1.4s, v2.4s // encoding: [0x20,0xac,0xa2,0x6e]66 67//----------------------------------------------------------------------68// Vector Maximum Pairwise (Floating Point)69//----------------------------------------------------------------------70 fmaxp v0.4h, v1.4h, v2.4h71 fmaxp v31.8h, v15.8h, v16.8h72 fmaxp v0.2s, v1.2s, v2.2s73 fmaxp v31.4s, v15.4s, v16.4s74 fmaxp v7.2d, v8.2d, v25.2d75 76// CHECK: fmaxp v0.4h, v1.4h, v2.4h // encoding: [0x20,0x34,0x42,0x2e]77// CHECK: fmaxp v31.8h, v15.8h, v16.8h // encoding: [0xff,0x35,0x50,0x6e]78// CHECK: fmaxp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xf4,0x22,0x2e]79// CHECK: fmaxp v31.4s, v15.4s, v16.4s // encoding: [0xff,0xf5,0x30,0x6e]80// CHECK: fmaxp v7.2d, v8.2d, v25.2d // encoding: [0x07,0xf5,0x79,0x6e]81 82//----------------------------------------------------------------------83// Vector Minimum Pairwise (Floating Point)84//----------------------------------------------------------------------85 fminp v10.4h, v15.4h, v22.4h86 fminp v3.8h, v5.8h, v6.8h87 fminp v10.2s, v15.2s, v22.2s88 fminp v3.4s, v5.4s, v6.4s89 fminp v17.2d, v13.2d, v2.2d90 91// CHECK: fminp v10.4h, v15.4h, v22.4h // encoding: [0xea,0x35,0xd6,0x2e]92// CHECK: fminp v3.8h, v5.8h, v6.8h // encoding: [0xa3,0x34,0xc6,0x6e]93// CHECK: fminp v10.2s, v15.2s, v22.2s // encoding: [0xea,0xf5,0xb6,0x2e]94// CHECK: fminp v3.4s, v5.4s, v6.4s // encoding: [0xa3,0xf4,0xa6,0x6e]95// CHECK: fminp v17.2d, v13.2d, v2.2d // encoding: [0xb1,0xf5,0xe2,0x6e]96 97//----------------------------------------------------------------------98// Vector maxNum Pairwise (Floating Point)99//----------------------------------------------------------------------100 fmaxnmp v0.4h, v1.4h, v2.4h101 fmaxnmp v31.8h, v15.8h, v16.8h102 fmaxnmp v0.2s, v1.2s, v2.2s103 fmaxnmp v31.4s, v15.4s, v16.4s104 fmaxnmp v7.2d, v8.2d, v25.2d105 106// CHECK: fmaxnmp v0.4h, v1.4h, v2.4h // encoding: [0x20,0x04,0x42,0x2e]107// CHECK: fmaxnmp v31.8h, v15.8h, v16.8h // encoding: [0xff,0x05,0x50,0x6e]108// CHECK: fmaxnmp v0.2s, v1.2s, v2.2s // encoding: [0x20,0xc4,0x22,0x2e]109// CHECK: fmaxnmp v31.4s, v15.4s, v16.4s // encoding: [0xff,0xc5,0x30,0x6e]110// CHECK: fmaxnmp v7.2d, v8.2d, v25.2d // encoding: [0x07,0xc5,0x79,0x6e]111 112//----------------------------------------------------------------------113// Vector minNum Pairwise (Floating Point)114//----------------------------------------------------------------------115 fminnmp v10.4h, v15.4h, v22.4h116 fminnmp v3.8h, v5.8h, v6.8h117 fminnmp v10.2s, v15.2s, v22.2s118 fminnmp v3.4s, v5.4s, v6.4s119 fminnmp v17.2d, v13.2d, v2.2d120 121// CHECK: fminnmp v10.4h, v15.4h, v22.4h // encoding: [0xea,0x05,0xd6,0x2e]122// CHECK: fminnmp v3.8h, v5.8h, v6.8h // encoding: [0xa3,0x04,0xc6,0x6e]123// CHECK: fminnmp v10.2s, v15.2s, v22.2s // encoding: [0xea,0xc5,0xb6,0x2e]124// CHECK: fminnmp v3.4s, v5.4s, v6.4s // encoding: [0xa3,0xc4,0xa6,0x6e]125// CHECK: fminnmp v17.2d, v13.2d, v2.2d // encoding: [0xb1,0xc5,0xe2,0x6e]126 127