2014-03-20 10:18:24 +00: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 arithmetic and logical instructions.
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# MicroMIPS 16-bit Instructions
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Little endian
|
|
|
|
#------------------------------------------------------------------------------
|
2014-04-03 12:47:34 +00:00
|
|
|
# CHECK-EL: mfhi $9 # encoding: [0x09,0x46]
|
|
|
|
# CHECK-EL: mflo $9 # encoding: [0x49,0x46]
|
2014-03-20 10:18:24 +00:00
|
|
|
# CHECK-EL: move $25, $1 # encoding: [0x21,0x0f]
|
|
|
|
# CHECK-EL: jalr $9 # encoding: [0xc9,0x45]
|
2014-09-12 14:29:54 +00:00
|
|
|
# CHECK-EL: jraddiusp 20 # encoding: [0x05,0x47]
|
|
|
|
# CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
|
2014-03-20 10:18:24 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Big endian
|
|
|
|
#------------------------------------------------------------------------------
|
2014-04-03 12:47:34 +00:00
|
|
|
# CHECK-EB: mfhi $9 # encoding: [0x46,0x09]
|
|
|
|
# CHECK-EB: mflo $9 # encoding: [0x46,0x49]
|
2014-03-20 10:18:24 +00:00
|
|
|
# CHECK-EB: move $25, $1 # encoding: [0x0f,0x21]
|
|
|
|
# CHECK-EB: jalr $9 # encoding: [0x45,0xc9]
|
2014-09-12 14:29:54 +00:00
|
|
|
# CHECK-EB: jraddiusp 20 # encoding: [0x47,0x05]
|
|
|
|
# CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
|
2014-03-20 10:18:24 +00:00
|
|
|
|
2014-04-03 12:47:34 +00:00
|
|
|
mfhi $9
|
|
|
|
mflo $9
|
2014-03-20 10:18:24 +00:00
|
|
|
move $25, $1
|
|
|
|
jalr $9
|
2014-09-12 14:29:54 +00:00
|
|
|
jraddiusp 20
|