1# RUN: llvm-mc %s -triple=mipsel -show-encoding -show-inst -mcpu=mips32r2 \ 2# RUN: -mattr=+micromips,+eva | FileCheck -check-prefix=CHECK-EL %s 3# RUN: llvm-mc %s -triple=mips -show-encoding -show-inst -mcpu=mips32r2 \ 4# RUN: -mattr=+micromips,+eva | FileCheck -check-prefix=CHECK-EB %s 5# Check that the assembler can handle the documented syntax 6# for EVA instructions. 7#------------------------------------------------------------------------------ 8# microMIPS EVA Instructions 9#------------------------------------------------------------------------------ 10# Little endian 11#------------------------------------------------------------------------------ 12# CHECK-EL: prefe 1, 8($5) # encoding: [0x25,0x60,0x08,0xa4] 13# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} PREFE_MM 14# CHECK-EL: cachee 1, 8($5) # encoding: [0x25,0x60,0x08,0xa6] 15# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} CACHEE_MM 16# CHECK-EL: lle $2, 8($4) # encoding: [0x44,0x60,0x08,0x6c] 17# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LLE_MM 18# CHECK-EL: sce $2, 8($4) # encoding: [0x44,0x60,0x08,0xac] 19# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SCE_MM 20# CHECK-EL: swre $24, 5($3) # encoding: [0x03,0x63,0x05,0xa2] 21# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SWRE_MM 22# CHECK-EL: swle $24, 5($3) # encoding: [0x03,0x63,0x05,0xa0] 23# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SWLE_MM 24# CHECK-EL: lwre $24, 5($3) # encoding: [0x03,0x63,0x05,0x66] 25# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LWRE_MM 26# CHECK-EL: lwle $24, 2($4) # encoding: [0x04,0x63,0x02,0x64] 27# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LWLE_MM 28# CHECK-EL: lhue $4, 8($2) # encoding: [0x82,0x60,0x08,0x62] 29# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LHuE_M 30# CHECK-EL: lbe $4, 8($2) # encoding: [0x82,0x60,0x08,0x68] 31# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LBE_MM 32# CHECK-EL: lbue $4, 8($2) # encoding: [0x82,0x60,0x08,0x60] 33# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LBuE_MM 34# CHECK-EL: lhe $4, 8($2) # encoding: [0x82,0x60,0x08,0x6a] 35# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LHE_MM 36# CHECK-EL: lwe $4, 8($2) # encoding: [0x82,0x60,0x08,0x6e] 37# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} LWE_MM 38# CHECK-EL: sbe $5, 8($4) # encoding: [0xa4,0x60,0x08,0xa8] 39# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SBE_MM 40# CHECK-EL: she $5, 8($4) # encoding: [0xa4,0x60,0x08,0xaa] 41# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SHE_MM 42# CHECK-EL: swe $5, 8($4) # encoding: [0xa4,0x60,0x08,0xae] 43# CHECK-EL-NEXT: # <MCInst #{{[0-9]+}} SWE_MM 44#------------------------------------------------------------------------------ 45# Big endian 46#------------------------------------------------------------------------------ 47# CHECK-EB: prefe 1, 8($5) # encoding: [0x60,0x25,0xa4,0x08] 48# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} PREFE_MM 49# CHECK-EB: cachee 1, 8($5) # encoding: [0x60,0x25,0xa6,0x08] 50# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} CACHEE_MM 51# CHECK-EB: lle $2, 8($4) # encoding: [0x60,0x44,0x6c,0x08] 52# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LLE_MM 53# CHECK-EB: sce $2, 8($4) # encoding: [0x60,0x44,0xac,0x08] 54# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SCE_MM 55# CHECK-EB: swre $24, 5($3) # encoding: [0x63,0x03,0xa2,0x05] 56# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SWRE_MM 57# CHECK-EB: swle $24, 5($3) # encoding: [0x63,0x03,0xa0,0x05] 58# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SWLE_MM 59# CHECK-EB: lwre $24, 5($3) # encoding: [0x63,0x03,0x66,0x05] 60# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LWRE_MM 61# CHECK-EB: lwle $24, 2($4) # encoding: [0x63,0x04,0x64,0x02] 62# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LWLE_MM 63# CHECK-EB: lhue $4, 8($2) # encoding: [0x60,0x82,0x62,0x08] 64# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LHuE_MM 65# CHECK-EB: lbe $4, 8($2) # encoding: [0x60,0x82,0x68,0x08] 66# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LBE_MM 67# CHECK-EB: lbue $4, 8($2) # encoding: [0x60,0x82,0x60,0x08] 68# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LBuE_MM 69# CHECK-EB: lhe $4, 8($2) # encoding: [0x60,0x82,0x6a,0x08] 70# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LHE_MM 71# CHECK-EB: lwe $4, 8($2) # encoding: [0x60,0x82,0x6e,0x08] 72# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} LWE_MM 73# CHECK-EB: sbe $5, 8($4) # encoding: [0x60,0xa4,0xa8,0x08] 74# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SBE_MM 75# CHECK-EB: she $5, 8($4) # encoding: [0x60,0xa4,0xaa,0x08] 76# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SHE_MM 77# CHECK-EB: swe $5, 8($4) # encoding: [0x60,0xa4,0xae,0x08] 78# CHECK-EB-NEXT: # <MCInst #{{[0-9]+}} SWE_MM 79 80 prefe 1, 8($5) 81 cachee 1, 8($5) 82 lle $2, 8($4) 83 sce $2, 8($4) 84 swre $24, 5($3) 85 swle $24, 5($3) 86 lwre $24, 5($3) 87 lwle $24, 2($4) 88 lhue $4, 8($2) 89 lbe $4, 8($2) 90 lbue $4, 8($2) 91 lhe $4, 8($2) 92 lwe $4, 8($2) 93 sbe $5, 8($4) 94 she $5, 8($4) 95 swe $5, 8($4) 96 97