[mips] Add a 'generic' Mips CPU

Having a generic CPU removes a warning when creating a subtarget without
the CPU being explicitly specified.

Differential Revision: https://reviews.llvm.org/D70490
This commit is contained in:
Miloš Stojanović 2019-11-21 15:17:21 +01:00
parent b25f985848
commit 6ba5cbf3ea
2 changed files with 5 additions and 0 deletions

View File

@ -232,6 +232,7 @@ def ImplP5600 : SubtargetFeature<"p5600", "ProcImpl",
class Proc<string Name, list<SubtargetFeature> Features>
: ProcessorModel<Name, MipsGenericModel, Features>;
def : Proc<"generic", [FeatureMips32]>;
def : Proc<"mips1", [FeatureMips1]>;
def : Proc<"mips2", [FeatureMips2]>;
def : Proc<"mips32", [FeatureMips32]>;

View File

@ -1,5 +1,9 @@
; Check that the CPU names work.
; RUN: llc -mtriple=mips -mcpu=generic -filetype=obj < %s \
; RUN: | llvm-readelf -A | FileCheck %s --check-prefix=GENERIC
; GENERIC: ISA: MIPS32
; RUN: llc -mtriple=mips -mcpu=mips2 -filetype=obj < %s \
; RUN: | llvm-readelf -A | FileCheck %s --check-prefix=MIPS2
; MIPS2: ISA: MIPS2