brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.1 KiB · c4bd74d Raw
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 (Signed and Unsigned Integer)7//----------------------------------------------------------------------8         smax v0.8b, v1.8b, v2.8b9         smax v0.16b, v1.16b, v2.16b10         smax v0.4h, v1.4h, v2.4h11         smax v0.8h, v1.8h, v2.8h12         smax v0.2s, v1.2s, v2.2s13         smax v0.4s, v1.4s, v2.4s14 15// CHECK: smax v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x64,0x22,0x0e]16// CHECK: smax v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x64,0x22,0x4e]17// CHECK: smax v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x64,0x62,0x0e]18// CHECK: smax v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x64,0x62,0x4e]19// CHECK: smax v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x64,0xa2,0x0e]20// CHECK: smax v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x64,0xa2,0x4e]21 22         umax v0.8b, v1.8b, v2.8b23         umax v0.16b, v1.16b, v2.16b24         umax v0.4h, v1.4h, v2.4h25         umax v0.8h, v1.8h, v2.8h26         umax v0.2s, v1.2s, v2.2s27         umax v0.4s, v1.4s, v2.4s28 29// CHECK: umax v0.8b, v1.8b, v2.8b         // encoding: [0x20,0x64,0x22,0x2e]30// CHECK: umax v0.16b, v1.16b, v2.16b      // encoding: [0x20,0x64,0x22,0x6e]31// CHECK: umax v0.4h, v1.4h, v2.4h         // encoding: [0x20,0x64,0x62,0x2e]32// CHECK: umax v0.8h, v1.8h, v2.8h         // encoding: [0x20,0x64,0x62,0x6e]33// CHECK: umax v0.2s, v1.2s, v2.2s         // encoding: [0x20,0x64,0xa2,0x2e]34// CHECK: umax v0.4s, v1.4s, v2.4s         // encoding: [0x20,0x64,0xa2,0x6e]35 36//----------------------------------------------------------------------37// Vector Minimum (Signed and Unsigned Integer)38//----------------------------------------------------------------------39         smin v0.8b, v1.8b, v2.8b40         smin v0.16b, v1.16b, v2.16b41         smin v0.4h, v1.4h, v2.4h42         smin v0.8h, v1.8h, v2.8h43         smin v0.2s, v1.2s, v2.2s44         smin v0.4s, v1.4s, v2.4s45 46// CHECK: smin v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x6c,0x22,0x0e]47// CHECK: smin v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x6c,0x22,0x4e]48// CHECK: smin v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x6c,0x62,0x0e]49// CHECK: smin v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x6c,0x62,0x4e]50// CHECK: smin v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x6c,0xa2,0x0e]51// CHECK: smin v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x6c,0xa2,0x4e]52 53         umin v0.8b, v1.8b, v2.8b54         umin v0.16b, v1.16b, v2.16b55         umin v0.4h, v1.4h, v2.4h56         umin v0.8h, v1.8h, v2.8h57         umin v0.2s, v1.2s, v2.2s58         umin v0.4s, v1.4s, v2.4s59 60// CHECK: umin v0.8b, v1.8b, v2.8b         // encoding: [0x20,0x6c,0x22,0x2e]61// CHECK: umin v0.16b, v1.16b, v2.16b      // encoding: [0x20,0x6c,0x22,0x6e]62// CHECK: umin v0.4h, v1.4h, v2.4h         // encoding: [0x20,0x6c,0x62,0x2e]63// CHECK: umin v0.8h, v1.8h, v2.8h         // encoding: [0x20,0x6c,0x62,0x6e]64// CHECK: umin v0.2s, v1.2s, v2.2s         // encoding: [0x20,0x6c,0xa2,0x2e]65// CHECK: umin v0.4s, v1.4s, v2.4s         // encoding: [0x20,0x6c,0xa2,0x6e]66 67//----------------------------------------------------------------------68// Vector Maximum (Floating Point)69//----------------------------------------------------------------------70         fmax v0.4h, v1.4h, v2.4h71         fmax v0.8h, v1.8h, v2.8h72         fmax v0.2s, v1.2s, v2.2s73         fmax v31.4s, v15.4s, v16.4s74         fmax v7.2d, v8.2d, v25.2d75 76// CHECK: fmax    v0.4h, v1.4h, v2.4h     // encoding: [0x20,0x34,0x42,0x0e]77// CHECK: fmax    v0.8h, v1.8h, v2.8h     // encoding: [0x20,0x34,0x42,0x4e]78// CHECK: fmax v0.2s, v1.2s, v2.2s    // encoding: [0x20,0xf4,0x22,0x0e]79// CHECK: fmax v31.4s, v15.4s, v16.4s // encoding: [0xff,0xf5,0x30,0x4e]80// CHECK: fmax v7.2d, v8.2d, v25.2d   // encoding: [0x07,0xf5,0x79,0x4e]81 82//----------------------------------------------------------------------83// Vector Minimum (Floating Point)84//----------------------------------------------------------------------85         fmin v10.4h, v15.4h, v22.4h86         fmin v10.8h, v15.8h, v22.8h87         fmin v10.2s, v15.2s, v22.2s88         fmin v3.4s, v5.4s, v6.4s89         fmin v17.2d, v13.2d, v2.2d90 91// CHECK: fmin    v10.4h, v15.4h, v22.4h  // encoding: [0xea,0x35,0xd6,0x0e]92// CHECK: fmin    v10.8h, v15.8h, v22.8h  // encoding: [0xea,0x35,0xd6,0x4e]93// CHECK: fmin v10.2s, v15.2s, v22.2s  // encoding: [0xea,0xf5,0xb6,0x0e]94// CHECK: fmin v3.4s, v5.4s, v6.4s     // encoding: [0xa3,0xf4,0xa6,0x4e]95// CHECK: fmin v17.2d, v13.2d, v2.2d   // encoding: [0xb1,0xf5,0xe2,0x4e]96 97//----------------------------------------------------------------------98// Vector maxNum (Floating Point)99//----------------------------------------------------------------------100         fmaxnm v0.4h, v1.4h, v2.4h101         fmaxnm v0.8h, v1.8h, v2.8h102         fmaxnm v0.2s, v1.2s, v2.2s103         fmaxnm v31.4s, v15.4s, v16.4s104         fmaxnm v7.2d, v8.2d, v25.2d105 106// CHECK: fmaxnm  v0.4h, v1.4h, v2.4h     // encoding: [0x20,0x04,0x42,0x0e]107// CHECK: fmaxnm  v0.8h, v1.8h, v2.8h     // encoding: [0x20,0x04,0x42,0x4e]108// CHECK: fmaxnm v0.2s, v1.2s, v2.2s    // encoding: [0x20,0xc4,0x22,0x0e]109// CHECK: fmaxnm v31.4s, v15.4s, v16.4s // encoding: [0xff,0xc5,0x30,0x4e]110// CHECK: fmaxnm v7.2d, v8.2d, v25.2d   // encoding: [0x07,0xc5,0x79,0x4e]111 112//----------------------------------------------------------------------113// Vector minNum (Floating Point)114//----------------------------------------------------------------------115         fminnm v10.4h, v15.4h, v22.4h116         fminnm v10.8h, v15.8h, v22.8h117         fminnm v10.2s, v15.2s, v22.2s118         fminnm v3.4s, v5.4s, v6.4s119         fminnm v17.2d, v13.2d, v2.2d120 121// CHECK: fminnm  v10.4h, v15.4h, v22.4h  // encoding: [0xea,0x05,0xd6,0x0e]122// CHECK: fminnm  v10.8h, v15.8h, v22.8h  // encoding: [0xea,0x05,0xd6,0x4e]123// CHECK: fminnm v10.2s, v15.2s, v22.2s  // encoding: [0xea,0xc5,0xb6,0x0e]124// CHECK: fminnm v3.4s, v5.4s, v6.4s     // encoding: [0xa3,0xc4,0xa6,0x4e]125// CHECK: fminnm v17.2d, v13.2d, v2.2d   // encoding: [0xb1,0xc5,0xe2,0x4e]126 127