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] 13 # CHECK: swc1 $f2, 16($5) # encoding: [0x10,0x00,0xa2,0xe4] 14 # CHECK: swl $4, 16($5) # encoding: [0x10,0x00,0xa4,0xa8] 15 sb $4, 16($5) 16 sc $4, 16($5) 17 sh $4, 16($5) 18 sw $4, 16($5) 19 sw $7, ($5) 20 swc1 $f2, 16($5) 21 swl $4, 16($5) 22 23 #------------------------------------------------------------------------------ 24 # Memory load instructions 25 #------------------------------------------------------------------------------ 26 27 # CHECK: lb $4, 4($5) # encoding: [0x04,0x00,0xa4,0x80] 28 # CHECK: lw $4, 4($5) # encoding: [0x04,0x00,0xa4,0x8c] 29 # CHECK: lbu $4, 4($5) # encoding: [0x04,0x00,0xa4,0x90] 30 # CHECK: lh $4, 4($5) # encoding: [0x04,0x00,0xa4,0x84] 31 # CHECK: lhu $4, 4($5) # encoding: [0x04,0x00,0xa4,0x94] 32 # CHECK: ll $4, 4($5) # encoding: [0x04,0x00,0xa4,0xc0] 33 # CHECK: lw $4, 4($5) # encoding: [0x04,0x00,0xa4,0x8c] 34 # CHECK: lw $7, 0($7) # encoding: [0x00,0x00,0xe7,0x8c] 35 # CHECK: lw $2, 16($sp) # encoding: [0x10,0x00,0xa2,0x8f] 36 37 lb $4, 4($5) 38 lw $4, 4($5) 39 lbu $4, 4($5) 40 lh $4, 4($5) 41 lhu $4, 4($5) 42 ll $4, 4($5) 43 lw $4, 4($5) 44 lw $7, ($7) 45 lw $2, 16($sp) 46