Add OpSize16 bit, for instructions which need 0x66 prefix in 16-bit mode
[oota-llvm.git] / test / MC / Mips / micromips-loadstore-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 load and store instructions.
7 #------------------------------------------------------------------------------
8 # Load and Store Instructions
9 #------------------------------------------------------------------------------
10 # Little endian
11 #------------------------------------------------------------------------------
12 # CHECK-EL: lb     $5, 8($4)      # encoding: [0xa4,0x1c,0x08,0x00]
13 # CHECK-EL: lbu    $6, 8($4)      # encoding: [0xc4,0x14,0x08,0x00]
14 # CHECK-EL: lh     $2, 8($4)      # encoding: [0x44,0x3c,0x08,0x00]
15 # CHECK-EL: lhu    $4, 8($2)      # encoding: [0x82,0x34,0x08,0x00]
16 # CHECK-EL: lw     $6, 4($5)      # encoding: [0xc5,0xfc,0x04,0x00]
17 # CHECK-EL: sb     $5, 8($4)      # encoding: [0xa4,0x18,0x08,0x00]
18 # CHECK-EL: sh     $2, 8($4)      # encoding: [0x44,0x38,0x08,0x00]
19 # CHECK-EL: sw     $5, 4($6)      # encoding: [0xa6,0xf8,0x04,0x00]
20 # CHECK-EL: ll     $2, 8($4)      # encoding: [0x44,0x60,0x08,0x30]
21 # CHECK-EL: sc     $2, 8($4)      # encoding: [0x44,0x60,0x08,0xb0]
22 #------------------------------------------------------------------------------
23 # Big endian
24 #------------------------------------------------------------------------------
25 # CHECK-EB: lb     $5, 8($4)      # encoding: [0x1c,0xa4,0x00,0x08]
26 # CHECK-EB: lbu    $6, 8($4)      # encoding: [0x14,0xc4,0x00,0x08]
27 # CHECK-EB: lh     $2, 8($4)      # encoding: [0x3c,0x44,0x00,0x08]
28 # CHECK-EB: lhu    $4, 8($2)      # encoding: [0x34,0x82,0x00,0x08]
29 # CHECK-EB: lw     $6, 4($5)      # encoding: [0xfc,0xc5,0x00,0x04]
30 # CHECK-EB: sb     $5, 8($4)      # encoding: [0x18,0xa4,0x00,0x08]
31 # CHECK-EB: sh     $2, 8($4)      # encoding: [0x38,0x44,0x00,0x08]
32 # CHECK-EB: sw     $5, 4($6)      # encoding: [0xf8,0xa6,0x00,0x04]
33 # CHECK-EB: ll     $2, 8($4)      # encoding: [0x60,0x44,0x30,0x08]
34 # CHECK-EB: sc     $2, 8($4)      # encoding: [0x60,0x44,0xb0,0x08]
35      lb     $5, 8($4)
36      lbu    $6, 8($4)
37      lh     $2, 8($4)
38      lhu    $4, 8($2)
39      lw     $6, 4($5)
40      sb     $5, 8($4)
41      sh     $2, 8($4)
42      sw     $5, 4($6)
43      ll     $2, 8($4)
44      sc     $2, 8($4)