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 #------------------------------------------------------------------------------
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 # CHECK-EL: lwu $2, 8($4) # encoding: [0x44,0x60,0x08,0xe0]
23 #------------------------------------------------------------------------------
25 #------------------------------------------------------------------------------
26 # CHECK-EB: lb $5, 8($4) # encoding: [0x1c,0xa4,0x00,0x08]
27 # CHECK-EB: lbu $6, 8($4) # encoding: [0x14,0xc4,0x00,0x08]
28 # CHECK-EB: lh $2, 8($4) # encoding: [0x3c,0x44,0x00,0x08]
29 # CHECK-EB: lhu $4, 8($2) # encoding: [0x34,0x82,0x00,0x08]
30 # CHECK-EB: lw $6, 4($5) # encoding: [0xfc,0xc5,0x00,0x04]
31 # CHECK-EB: sb $5, 8($4) # encoding: [0x18,0xa4,0x00,0x08]
32 # CHECK-EB: sh $2, 8($4) # encoding: [0x38,0x44,0x00,0x08]
33 # CHECK-EB: sw $5, 4($6) # encoding: [0xf8,0xa6,0x00,0x04]
34 # CHECK-EB: ll $2, 8($4) # encoding: [0x60,0x44,0x30,0x08]
35 # CHECK-EB: sc $2, 8($4) # encoding: [0x60,0x44,0xb0,0x08]
36 # CHECK-EB: lwu $2, 8($4) # encoding: [0x60,0x44,0xe0,0x08]