1# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
2# Check that the assembler can handle the documented syntax
3# for loads and stores.
4#------------------------------------------------------------------------------
5# Memory store instructions
6#------------------------------------------------------------------------------
7# CHECK:  sb      $4, 16($5)      # encoding: [0x10,0x00,0xa4,0xa0]
8# CHECK:  sc      $4, 16($5)      # encoding: [0x10,0x00,0xa4,0xe0]
9# CHECK:  sh      $4, 16($5)      # encoding: [0x10,0x00,0xa4,0xa4]
10# CHECK:  sw      $4, 16($5)      # encoding: [0x10,0x00,0xa4,0xac]
11# CHECK:  sw      $7,  0($5)      # encoding: [0x00,0x00,0xa7,0xac]
12# CHECK:  swc1    $f2, 16($5)     # encoding: [0x10,0x00,0xa2,0xe4]
13# CHECK:  swl     $4, 16($5)      # encoding: [0x10,0x00,0xa4,0xa8]
14     sb   $4, 16($5)
15     sc   $4, 16($5)
16     sh   $4, 16($5)
17     sw   $4, 16($5)
18     sw   $7,   ($5)
19     swc1 $f2, 16($5)
20     swl  $4, 16($5)
21
22#------------------------------------------------------------------------------
23# Memory load instructions
24#------------------------------------------------------------------------------
25
26# CHECK:  lb  $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x80]
27# CHECK:  lw  $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x8c]
28# CHECK:  lbu $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x90]
29# CHECK:  lh  $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x84]
30# CHECK:  lhu $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x94]
31# CHECK:  ll  $4, 4($5)       # encoding: [0x04,0x00,0xa4,0xc0]
32# CHECK:  lw  $4, 4($5)       # encoding: [0x04,0x00,0xa4,0x8c]
33# CHECK:  lw  $7, 0($7)       # encoding: [0x00,0x00,0xe7,0x8c]
34# CHECK:  lw  $2, 16($sp)     # encoding: [0x10,0x00,0xa2,0x8f]
35
36      lb      $4, 4($5)
37      lw      $4, 4($5)
38      lbu     $4, 4($5)
39      lh      $4, 4($5)
40      lhu     $4, 4($5)
41      ll      $4, 4($5)
42      lw      $4, 4($5)
43      lw      $7,    ($7)
44      lw      $2, 16($sp)
45