Home | History | Annotate | Download | only in AArch64
      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 // Vector Integer Multiply-accumulate
      7 //----------------------------------------------------------------------
      8          mla v0.8b, v1.8b, v2.8b
      9          mla v0.16b, v1.16b, v2.16b
     10          mla v0.4h, v1.4h, v2.4h
     11          mla v0.8h, v1.8h, v2.8h
     12          mla v0.2s, v1.2s, v2.2s
     13          mla v0.4s, v1.4s, v2.4s
     14 
     15 // CHECK: mla v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x94,0x22,0x0e]
     16 // CHECK: mla v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x94,0x22,0x4e]
     17 // CHECK: mla v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x94,0x62,0x0e]
     18 // CHECK: mla v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x94,0x62,0x4e]
     19 // CHECK: mla v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x94,0xa2,0x0e]
     20 // CHECK: mla v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x94,0xa2,0x4e]
     21 
     22 
     23 //----------------------------------------------------------------------
     24 // Vector Integer Multiply-subtract
     25 //----------------------------------------------------------------------
     26          mls v0.8b, v1.8b, v2.8b
     27          mls v0.16b, v1.16b, v2.16b
     28          mls v0.4h, v1.4h, v2.4h
     29          mls v0.8h, v1.8h, v2.8h
     30          mls v0.2s, v1.2s, v2.2s
     31          mls v0.4s, v1.4s, v2.4s
     32 
     33 // CHECK: mls v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x94,0x22,0x2e]
     34 // CHECK: mls v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x94,0x22,0x6e]
     35 // CHECK: mls v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x94,0x62,0x2e]
     36 // CHECK: mls v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x94,0x62,0x6e]
     37 // CHECK: mls v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x94,0xa2,0x2e]
     38 // CHECK: mls v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x94,0xa2,0x6e]
     39 
     40 //----------------------------------------------------------------------
     41 // Vector Floating-Point Multiply-accumulate
     42 //----------------------------------------------------------------------
     43          fmla v0.2s, v1.2s, v2.2s
     44          fmla v0.4s, v1.4s, v2.4s
     45          fmla v0.2d, v1.2d, v2.2d
     46 
     47 // CHECK: fmla v0.2s, v1.2s, v2.2s       // encoding: [0x20,0xcc,0x22,0x0e]
     48 // CHECK: fmla v0.4s, v1.4s, v2.4s       // encoding: [0x20,0xcc,0x22,0x4e]
     49 // CHECK: fmla v0.2d, v1.2d, v2.2d       // encoding: [0x20,0xcc,0x62,0x4e]
     50 
     51 //----------------------------------------------------------------------
     52 // Vector Floating-Point Multiply-subtract
     53 //----------------------------------------------------------------------
     54          fmls v0.2s, v1.2s, v2.2s
     55          fmls v0.4s, v1.4s, v2.4s
     56          fmls v0.2d, v1.2d, v2.2d
     57 
     58 // CHECK: fmls v0.2s, v1.2s, v2.2s       // encoding: [0x20,0xcc,0xa2,0x0e]
     59 // CHECK: fmls v0.4s, v1.4s, v2.4s       // encoding: [0x20,0xcc,0xa2,0x4e]
     60 // CHECK: fmls v0.2d, v1.2d, v2.2d       // encoding: [0x20,0xcc,0xe2,0x4e]
     61 
     62