xref: /aosp_15_r20/external/llvm/test/MC/Mips/micromips-loadstore-unaligned.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding \
2*9880d681SAndroid Build Coastguard Worker# RUN: -mattr=micromips | FileCheck -check-prefix=CHECK-EL %s
3*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding \
4*9880d681SAndroid Build Coastguard Worker# RUN: -mattr=micromips | FileCheck -check-prefix=CHECK-EB %s
5*9880d681SAndroid Build Coastguard Worker# Check that the assembler can handle the documented syntax
6*9880d681SAndroid Build Coastguard Worker# for loads and stores.
7*9880d681SAndroid Build Coastguard Worker#------------------------------------------------------------------------------
8*9880d681SAndroid Build Coastguard Worker# Load and Store unaligned instructions
9*9880d681SAndroid Build Coastguard Worker#------------------------------------------------------------------------------
10*9880d681SAndroid Build Coastguard Worker# Little endian
11*9880d681SAndroid Build Coastguard Worker#------------------------------------------------------------------------------
12*9880d681SAndroid Build Coastguard Worker# CHECK-EL: lwl $4, 16($5)   # encoding: [0x85,0x60,0x10,0x00]
13*9880d681SAndroid Build Coastguard Worker# CHECK-EL: lwr $4, 16($5)   # encoding: [0x85,0x60,0x10,0x10]
14*9880d681SAndroid Build Coastguard Worker# CHECK-EL: swl $4, 16($5)   # encoding: [0x85,0x60,0x10,0x80]
15*9880d681SAndroid Build Coastguard Worker# CHECK-EL: swr $4, 16($5)   # encoding: [0x85,0x60,0x10,0x90]
16*9880d681SAndroid Build Coastguard Worker#------------------------------------------------------------------------------
17*9880d681SAndroid Build Coastguard Worker# Big endian
18*9880d681SAndroid Build Coastguard Worker#------------------------------------------------------------------------------
19*9880d681SAndroid Build Coastguard Worker# CHECK-EB: lwl $4, 16($5)   # encoding: [0x60,0x85,0x00,0x10]
20*9880d681SAndroid Build Coastguard Worker# CHECK-EB: lwr $4, 16($5)   # encoding: [0x60,0x85,0x10,0x10]
21*9880d681SAndroid Build Coastguard Worker# CHECK-EB: swl $4, 16($5)   # encoding: [0x60,0x85,0x80,0x10]
22*9880d681SAndroid Build Coastguard Worker# CHECK-EB: swr $4, 16($5)   # encoding: [0x60,0x85,0x90,0x10]
23*9880d681SAndroid Build Coastguard Worker     lwl  $4, 16($5)
24*9880d681SAndroid Build Coastguard Worker     lwr  $4, 16($5)
25*9880d681SAndroid Build Coastguard Worker     swl  $4, 16($5)
26*9880d681SAndroid Build Coastguard Worker     swr  $4, 16($5)
27