2013-12-20 00:25:00 +08:00
|
|
|
# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \
|
|
|
|
# RUN: | FileCheck -check-prefix=CHECK-EL %s
|
|
|
|
# RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \
|
|
|
|
# RUN: | FileCheck -check-prefix=CHECK-EB %s
|
|
|
|
# Check that the assembler can handle the documented syntax
|
|
|
|
# for control instructions.
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# microMIPS Control Instructions
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Little endian
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# CHECK-EL: break # encoding: [0x00,0x00,0x07,0x00]
|
2014-05-13 02:04:06 +08:00
|
|
|
# CHECK-EL: break 7 # encoding: [0x07,0x00,0x07,0x00]
|
2013-12-20 00:25:00 +08:00
|
|
|
# CHECK-EL: break 7, 5 # encoding: [0x07,0x00,0x47,0x01]
|
2014-03-01 02:17:08 +08:00
|
|
|
# CHECK-EL: syscall # encoding: [0x00,0x00,0x7c,0x8b]
|
|
|
|
# CHECK-EL: syscall 396 # encoding: [0x8c,0x01,0x7c,0x8b]
|
2013-12-20 00:25:00 +08:00
|
|
|
# CHECK-EL: eret # encoding: [0x00,0x00,0x7c,0xf3]
|
|
|
|
# CHECK-EL: deret # encoding: [0x00,0x00,0x7c,0xe3]
|
|
|
|
# CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47]
|
|
|
|
# CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47]
|
|
|
|
# CHECK-EL: di $10 # encoding: [0x0a,0x00,0x7c,0x47]
|
|
|
|
# CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57]
|
|
|
|
# CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57]
|
|
|
|
# CHECK-EL: ei $10 # encoding: [0x0a,0x00,0x7c,0x57]
|
|
|
|
# CHECK-EL: wait # encoding: [0x00,0x00,0x7c,0x93]
|
2014-03-20 18:41:37 +08:00
|
|
|
# CHECK-EL: wait 17 # encoding: [0x11,0x00,0x7c,0x93]
|
2013-12-20 00:25:00 +08:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Big endian
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# CHECK-EB: break # encoding: [0x00,0x00,0x00,0x07]
|
2014-05-13 02:04:06 +08:00
|
|
|
# CHECK-EB: break 7 # encoding: [0x00,0x07,0x00,0x07]
|
2013-12-20 00:25:00 +08:00
|
|
|
# CHECK-EB: break 7, 5 # encoding: [0x00,0x07,0x01,0x47]
|
2014-03-01 02:17:08 +08:00
|
|
|
# CHECK-EB: syscall # encoding: [0x00,0x00,0x8b,0x7c]
|
|
|
|
# CHECK-EB: syscall 396 # encoding: [0x01,0x8c,0x8b,0x7c]
|
2013-12-20 00:25:00 +08:00
|
|
|
# CHECK-EB: eret # encoding: [0x00,0x00,0xf3,0x7c]
|
|
|
|
# CHECK-EB: deret # encoding: [0x00,0x00,0xe3,0x7c]
|
|
|
|
# CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
|
|
|
# CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
|
|
|
# CHECK-EB: di $10 # encoding: [0x00,0x0a,0x47,0x7c]
|
|
|
|
# CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
|
|
|
# CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
|
|
|
# CHECK-EB: ei $10 # encoding: [0x00,0x0a,0x57,0x7c]
|
|
|
|
# CHECK-EB: wait # encoding: [0x00,0x00,0x93,0x7c]
|
2014-03-20 18:41:37 +08:00
|
|
|
# CHECK-EB: wait 17 # encoding: [0x00,0x11,0x93,0x7c]
|
2013-12-20 00:25:00 +08:00
|
|
|
|
|
|
|
break
|
|
|
|
break 7
|
|
|
|
break 7,5
|
|
|
|
syscall
|
2014-03-01 02:17:08 +08:00
|
|
|
syscall 0x18c
|
2013-12-20 00:25:00 +08:00
|
|
|
eret
|
|
|
|
deret
|
|
|
|
di
|
|
|
|
di $0
|
|
|
|
di $10
|
|
|
|
ei
|
|
|
|
ei $0
|
|
|
|
ei $10
|
|
|
|
wait
|
2014-03-20 18:41:37 +08:00
|
|
|
wait 17
|