1 # RUN: not llvm-mc -triple mips-unknown-linux-gnu -mcpu=mips32r2 \
2 # RUN: -mattr=+micromips %s 2>&1 \
3 # RUN: | FileCheck --check-prefixes=ALL,MMR2 %s
4 # RUN: not llvm-mc -triple mips-unknown-linux-gnu -mcpu=mips32r6 \
5 # RUN: -mattr=+micromips %s 2>&1 \
6 # RUN: | FileCheck --check-prefixes=ALL,MMR6 %s
7 # RUN: not llvm-mc -triple mips-unknown-linux-gnu -mcpu=mips32r6 %s 2>&1 \
8 # RUN: | FileCheck --check-prefixes=ALL,MIPS32R6 %s
10 # This tests the mnemonic spell checker.
12 # First check what happens when an instruction is omitted:
16 # ALL: error: unknown instruction
17 # ALL-NEXT: $2, $1, $25
20 # We don't want to see a suggestion here; the edit distance is too large to
21 # give sensible suggestions:
23 aaaaaaaaaaaaaaa $
2, $
1, $
25
25 # ALL: error: unknown instruction
26 # ALL-NEXT: aaaaaaaaaaaaaaa $2, $1, $25
29 # Check that we get one suggestion: 'addiuspi' is 1 edit away, i.e. an deletion.
33 # MMR2: error: unknown instruction, did you mean: addiusp?
34 # MMR6: error: unknown instruction, did you mean: addiusp?
35 # MIPS32R6: error: unknown instruction{{$}}
39 # Check edit distance 1 and 2, just insertions:
43 # MMR2: error: unknown instruction, did you mean: add, addiu, addu, maddu?
44 # MMR6: error: unknown instruction, did you mean: add, addiu, addu?
45 # MIPS32R6: error: unknown instruction, did you mean: add, addiu, addu?
46 # ALL: addru $9, $6, 17767
49 # Check an instruction that is 2 edits away, and also has a lot of candidates:
51 culE.d $fcc7
, $
f24, $
f18
53 # MMR2: error: unknown instruction, did you mean: c.le.d, c.ule.d?
54 # MMR6: error: unknown instruction{{$}}
55 # MIPS32R6: error: unknown instruction{{$}}
56 # ALL: culE.d $fcc7, $f24, $f18
59 # Check that candidates list includes only instructions valid for target CPU.
63 # MMR2: error: unknown instruction, did you mean: sw, swl, swm, swp, swr, usw?
64 # MMR6: error: unknown instruction, did you mean: sw, swm, swp, usw?
65 # MIPS32R6: error: unknown instruction, did you mean: sw, usw?