1 # RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips \ 2 # RUN: | FileCheck -check-prefix=CHECK-EL %s 3 # RUN: llvm-mc %s -triple=mips -show-encoding -mcpu=mips32r2 -mattr=micromips \ 4 # RUN: | FileCheck -check-prefix=CHECK-EB %s 5 # Check that the assembler can handle the documented syntax 6 # for control instructions. 7 #------------------------------------------------------------------------------ 8 # microMIPS Control Instructions 9 #------------------------------------------------------------------------------ 10 # Little endian 11 #------------------------------------------------------------------------------ 12 # CHECK-EL: break # encoding: [0x00,0x00,0x07,0x00] 13 # CHECK-EL: break 7 # encoding: [0x07,0x00,0x07,0x00] 14 # CHECK-EL: break 7, 5 # encoding: [0x07,0x00,0x47,0x01] 15 # CHECK-EL: syscall # encoding: [0x00,0x00,0x7c,0x8b] 16 # CHECK-EL: syscall 396 # encoding: [0x8c,0x01,0x7c,0x8b] 17 # CHECK-EL: eret # encoding: [0x00,0x00,0x7c,0xf3] 18 # CHECK-EL: deret # encoding: [0x00,0x00,0x7c,0xe3] 19 # CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47] 20 # CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47] 21 # CHECK-EL: di $10 # encoding: [0x0a,0x00,0x7c,0x47] 22 # CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57] 23 # CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57] 24 # CHECK-EL: ei $10 # encoding: [0x0a,0x00,0x7c,0x57] 25 # CHECK-EL: wait # encoding: [0x00,0x00,0x7c,0x93] 26 # CHECK-EL: wait 17 # encoding: [0x11,0x00,0x7c,0x93] 27 #------------------------------------------------------------------------------ 28 # Big endian 29 #------------------------------------------------------------------------------ 30 # CHECK-EB: break # encoding: [0x00,0x00,0x00,0x07] 31 # CHECK-EB: break 7 # encoding: [0x00,0x07,0x00,0x07] 32 # CHECK-EB: break 7, 5 # encoding: [0x00,0x07,0x01,0x47] 33 # CHECK-EB: syscall # encoding: [0x00,0x00,0x8b,0x7c] 34 # CHECK-EB: syscall 396 # encoding: [0x01,0x8c,0x8b,0x7c] 35 # CHECK-EB: eret # encoding: [0x00,0x00,0xf3,0x7c] 36 # CHECK-EB: deret # encoding: [0x00,0x00,0xe3,0x7c] 37 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c] 38 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c] 39 # CHECK-EB: di $10 # encoding: [0x00,0x0a,0x47,0x7c] 40 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c] 41 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c] 42 # CHECK-EB: ei $10 # encoding: [0x00,0x0a,0x57,0x7c] 43 # CHECK-EB: wait # encoding: [0x00,0x00,0x93,0x7c] 44 # CHECK-EB: wait 17 # encoding: [0x00,0x11,0x93,0x7c] 45 46 break 47 break 7 48 break 7,5 49 syscall 50 syscall 0x18c 51 eret 52 deret 53 di 54 di $0 55 di $10 56 ei 57 ei $0 58 ei $10 59 wait 60 wait 17 61