1 # RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \ 2 # RUN: | FileCheck -check-prefix=CHECK-EL %s 3 # RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \ 4 # RUN: | FileCheck -check-prefix=CHECK-EB %s 5 # Check that the assembler can handle the documented syntax 6 # for miscellaneous instructions 7 #------------------------------------------------------------------------------ 8 # Miscellaneous Instructions 9 #------------------------------------------------------------------------------ 10 # Little endian 11 #------------------------------------------------------------------------------ 12 # CHECK-EL: teq $8, $9 # encoding: [0x28,0x01,0x3c,0x00] 13 # CHECK-EL: tge $8, $9 # encoding: [0x28,0x01,0x3c,0x02] 14 # CHECK-EL: tgeu $8, $9 # encoding: [0x28,0x01,0x3c,0x04] 15 # CHECK-EL: tlt $8, $9 # encoding: [0x28,0x01,0x3c,0x08] 16 # CHECK-EL: tltu $8, $9 # encoding: [0x28,0x01,0x3c,0x0a] 17 # CHECK-EL: tne $8, $9 # encoding: [0x28,0x01,0x3c,0x0c] 18 # CHECK-EL: teqi $9, 17767 # encoding: [0xc9,0x41,0x67,0x45] 19 # CHECK-EL: tgei $9, 17767 # encoding: [0x29,0x41,0x67,0x45] 20 # CHECK-EL: tgeiu $9, 17767 # encoding: [0x69,0x41,0x67,0x45] 21 # CHECK-EL: tlti $9, 17767 # encoding: [0x09,0x41,0x67,0x45] 22 # CHECK-EL: tltiu $9, 17767 # encoding: [0x49,0x41,0x67,0x45] 23 # CHECK-EL: tnei $9, 17767 # encoding: [0x89,0x41,0x67,0x45] 24 #------------------------------------------------------------------------------ 25 # Big endian 26 #------------------------------------------------------------------------------ 27 # CHECK-EB: teq $8, $9 # encoding: [0x01,0x28,0x00,0x3c] 28 # CHECK-EB: tge $8, $9 # encoding: [0x01,0x28,0x02,0x3c] 29 # CHECK-EB: tgeu $8, $9 # encoding: [0x01,0x28,0x04,0x3c] 30 # CHECK-EB: tlt $8, $9 # encoding: [0x01,0x28,0x08,0x3c] 31 # CHECK-EB: tltu $8, $9 # encoding: [0x01,0x28,0x0a,0x3c] 32 # CHECK-EB: tne $8, $9 # encoding: [0x01,0x28,0x0c,0x3c] 33 # CHECK-EB: teqi $9, 17767 # encoding: [0x41,0xc9,0x45,0x67] 34 # CHECK-EB: tgei $9, 17767 # encoding: [0x41,0x29,0x45,0x67] 35 # CHECK-EB: tgeiu $9, 17767 # encoding: [0x41,0x69,0x45,0x67] 36 # CHECK-EB: tlti $9, 17767 # encoding: [0x41,0x09,0x45,0x67] 37 # CHECK-EB: tltiu $9, 17767 # encoding: [0x41,0x49,0x45,0x67] 38 # CHECK-EB: tnei $9, 17767 # encoding: [0x41,0x89,0x45,0x67] 39 teq $8, $9, 0 40 tge $8, $9, 0 41 tgeu $8, $9, 0 42 tlt $8, $9, 0 43 tltu $8, $9, 0 44 tne $8, $9, 0 45 teqi $9, 17767 46 tgei $9, 17767 47 tgeiu $9, 17767 48 tlti $9, 17767 49 tltiu $9, 17767 50 tnei $9, 17767 51