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