brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 9f1fb2f Raw
68 lines · plain
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 %s4# 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 %s7# RUN: not llvm-mc -triple mips-unknown-linux-gnu -mcpu=mips32r6 %s 2>&1 \8# RUN:   | FileCheck --check-prefixes=ALL,MIPS32R6 %s9 10# This tests the mnemonic spell checker.11 12# First check what happens when an instruction is omitted:13 14$2, $1, $2515 16# ALL:      error: unknown instruction17# ALL-NEXT: $2, $1, $2518# ALL-NEXT:  ^19 20# We don't want to see a suggestion here; the edit distance is too large to21# give sensible suggestions:22 23aaaaaaaaaaaaaaa $2, $1, $2524 25# ALL:      error: unknown instruction26# ALL-NEXT: aaaaaaaaaaaaaaa $2, $1, $2527# ALL-NEXT: ^28 29# Check that we get one suggestion: 'addiuspi' is 1 edit away, i.e. an deletion.30 31addiuspi -1632 33# MMR2:     error: unknown instruction, did you mean: addiusp?34# MMR6:     error: unknown instruction, did you mean: addiusp?35# MIPS32R6: error: unknown instruction{{$}}36# ALL:      addiuspi -1637# ALL-NEXT: ^38 39# Check edit distance 1 and 2, just insertions:40 41addru $9, $6, 1776742 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, 1776747# ALL-NEXT:  ^48 49# Check an instruction that is 2 edits away, and also has a lot of candidates:50 51culE.d  $fcc7, $f24, $f1852 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, $f1857# ALL-NEXT: ^58 59# Check that candidates list includes only instructions valid for target CPU.60 61swk $3, $462 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?66# ALL:      swk $3, $467# ALL-NEXT: ^68