[mips][microMIPS] Implement JRADDIUSP instruction
[oota-llvm.git] / test / MC / Mips / micromips-16-bit-instructions.s
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 arithmetic and logical instructions.
7 #------------------------------------------------------------------------------
8 # MicroMIPS 16-bit Instructions
9 #------------------------------------------------------------------------------
10 # Little endian
11 #------------------------------------------------------------------------------
12 # CHECK-EL: mfhi    $9              # encoding: [0x09,0x46]
13 # CHECK-EL: mflo    $9              # encoding: [0x49,0x46]
14 # CHECK-EL: move    $25, $1         # encoding: [0x21,0x0f]
15 # CHECK-EL: jalr    $9              # encoding: [0xc9,0x45]
16 # CHECK-EL: jraddiusp 20            # encoding: [0x05,0x47]
17 # CHECK-EL: nop                     # encoding: [0x00,0x00,0x00,0x00]
18 #------------------------------------------------------------------------------
19 # Big endian
20 #------------------------------------------------------------------------------
21 # CHECK-EB: mfhi    $9              # encoding: [0x46,0x09]
22 # CHECK-EB: mflo    $9              # encoding: [0x46,0x49]
23 # CHECK-EB: move    $25, $1         # encoding: [0x0f,0x21]
24 # CHECK-EB: jalr    $9              # encoding: [0x45,0xc9]
25 # CHECK-EB: jraddiusp 20            # encoding: [0x47,0x05]
26 # CHECK-EB: nop                     # encoding: [0x00,0x00,0x00,0x00]
27
28     mfhi    $9
29     mflo    $9
30     move    $25, $1
31     jalr    $9
32     jraddiusp 20