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