1# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \
2# RUN: | FileCheck -check-prefix=CHECK-EL %s
3# RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \
4# RUN: | FileCheck -check-prefix=CHECK-EB %s
5# Check that the assembler can handle the documented syntax
6# for Multiply Add/Sub instructions.
7#------------------------------------------------------------------------------
8# Multiply Add/Sub Instructions
9#------------------------------------------------------------------------------
10# Little endian
11#------------------------------------------------------------------------------
12# CHECK-EL: madd   $4, $5    # encoding: [0xa4,0x00,0x3c,0xcb]
13# CHECK-EL: maddu  $4, $5    # encoding: [0xa4,0x00,0x3c,0xdb]
14# CHECK-EL: msub   $4, $5    # encoding: [0xa4,0x00,0x3c,0xeb]
15# CHECK-EL: msubu  $4, $5    # encoding: [0xa4,0x00,0x3c,0xfb]
16#------------------------------------------------------------------------------
17# Big endian
18#------------------------------------------------------------------------------
19# CHECK-EB: madd   $4, $5    # encoding: [0x00,0xa4,0xcb,0x3c]
20# CHECK-EB: maddu  $4, $5    # encoding: [0x00,0xa4,0xdb,0x3c]
21# CHECK-EB: msub   $4, $5    # encoding: [0x00,0xa4,0xeb,0x3c]
22# CHECK-EB: msubu  $4, $5    # encoding: [0x00,0xa4,0xfb,0x3c]
23    madd     $4, $5
24    maddu    $4, $5
25    msub     $4, $5
26    msubu    $4, $5
27