Skip to content
Permalink
Browse files

[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
  • Loading branch information
M4444 committed Nov 21, 2019
1 parent b25f985 commit 6ba5cbf3ea2315acf1b7f1c39c6fec6cca5560ca
Showing with 5 additions and 0 deletions.
  1. +1 −0 llvm/lib/Target/Mips/Mips.td
  2. +4 −0 llvm/test/CodeGen/Mips/cpus.ll
@@ -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]>;
@@ -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

0 comments on commit 6ba5cbf

Please sign in to comment.
You can’t perform that action at this time.