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 # CHECK: .section __TEXT,__text,regular,pure_instructions
5 #------------------------------------------------------------------------------
6 # Memory store instructions
7 #------------------------------------------------------------------------------
8 # CHECK: sb $4, 16($5) # encoding: [0x10,0x00,0xa4,0xa0]
9 # CHECK: sc $4, 16($5) # encoding: [0x10,0x00,0xa4,0xe0]
10 # CHECK: sh $4, 16($5) # encoding: [0x10,0x00,0xa4,0xa4]
11 # CHECK: sw $4, 16($5) # encoding: [0x10,0x00,0xa4,0xac]
12 # CHECK: sw $7, 0($5) # encoding: [0x00,0x00,0xa7,0xac]
19 #------------------------------------------------------------------------------
20 # Memory load instructions
21 #------------------------------------------------------------------------------
23 # CHECK: lb $4, 4($5) # encoding: [0x04,0x00,0xa4,0x80]
24 # CHECK: lw $4, 4($5) # encoding: [0x04,0x00,0xa4,0x8c]
25 # CHECK: lbu $4, 4($5) # encoding: [0x04,0x00,0xa4,0x90]
26 # CHECK: lh $4, 4($5) # encoding: [0x04,0x00,0xa4,0x84]
27 # CHECK: lhu $4, 4($5) # encoding: [0x04,0x00,0xa4,0x94]
28 # CHECK: ll $4, 4($5) # encoding: [0x04,0x00,0xa4,0xc0]
29 # CHECK: lw $4, 4($5) # encoding: [0x04,0x00,0xa4,0x8c]
30 # CHECK: lw $7, 0($7) # encoding: [0x00,0x00,0xe7,0x8c]
31 # CHECK: lw $2, 16($sp) # encoding: [0x10,0x00,0xa2,0x8f]