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]
22 #------------------------------------------------------------------------------
23 # Memory load instructions
24 #------------------------------------------------------------------------------
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]