llvm.org GIT mirror llvm / 404324e
[Nios2] Target registration Reviewers: craig.topper, hfinkel, joerg, lattner, zvi Reviewed By: craig.topper Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer Differential Revision: https://reviews.llvm.org/D32669 Patch by AndreiGrischenko <andrei.l.grischenko@intel.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304144 91177308-0d34-0410-b5e6-96231b3b80d8 Nikolai Bozhenov 3 years ago
21 changed file(s) with 597 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5858 mips64, // MIPS64: mips64
5959 mips64el, // MIPS64EL: mips64el
6060 msp430, // MSP430: msp430
61 nios2, // NIOSII: nios2
6162 ppc, // PPC: powerpc
6263 ppc64, // PPC64: powerpc64, ppu
6364 ppc64le, // PPC64LE: powerpc64le
3333 case mips64: return "mips64";
3434 case mips64el: return "mips64el";
3535 case msp430: return "msp430";
36 case nios2: return "nios2";
3637 case ppc64: return "powerpc64";
3738 case ppc64le: return "powerpc64le";
3839 case ppc: return "powerpc";
9798 case mips64:
9899 case mips64el: return "mips";
99100
101 case nios2: return "nios2";
102
100103 case hexagon: return "hexagon";
101104
102105 case amdgcn: return "amdgcn";
261264 .Case("mips64", mips64)
262265 .Case("mips64el", mips64el)
263266 .Case("msp430", msp430)
267 .Case("nios2", nios2)
264268 .Case("ppc64", ppc64)
265269 .Case("ppc32", ppc)
266270 .Case("ppc", ppc)
383387 .Cases("mipsel", "mipsallegrexel", Triple::mipsel)
384388 .Cases("mips64", "mips64eb", Triple::mips64)
385389 .Case("mips64el", Triple::mips64el)
390 .Case("nios2", Triple::nios2)
386391 .Case("r600", Triple::r600)
387392 .Case("amdgcn", Triple::amdgcn)
388393 .Case("riscv32", Triple::riscv32)
624629 case Triple::mips64el:
625630 case Triple::mipsel:
626631 case Triple::msp430:
632 case Triple::nios2:
627633 case Triple::nvptx:
628634 case Triple::nvptx64:
629635 case Triple::ppc64le:
11611167 case llvm::Triple::le32:
11621168 case llvm::Triple::mips:
11631169 case llvm::Triple::mipsel:
1170 case llvm::Triple::nios2:
11641171 case llvm::Triple::nvptx:
11651172 case llvm::Triple::ppc:
11661173 case llvm::Triple::r600:
12441251 case Triple::le32:
12451252 case Triple::mips:
12461253 case Triple::mipsel:
1254 case Triple::nios2:
12471255 case Triple::nvptx:
12481256 case Triple::ppc:
12491257 case Triple::r600:
12911299 case Triple::kalimba:
12921300 case Triple::lanai:
12931301 case Triple::msp430:
1302 case Triple::nios2:
12941303 case Triple::r600:
12951304 case Triple::tce:
12961305 case Triple::tcele:
13621371 case Triple::le32:
13631372 case Triple::le64:
13641373 case Triple::msp430:
1374 case Triple::nios2:
13651375 case Triple::nvptx64:
13661376 case Triple::nvptx:
13671377 case Triple::r600:
14481458 case Triple::mips64el:
14491459 case Triple::mipsel:
14501460 case Triple::msp430:
1461 case Triple::nios2:
14511462 case Triple::nvptx64:
14521463 case Triple::nvptx:
14531464 case Triple::ppc64le:
2828 MSP430
2929 NVPTX
3030 Mips
31 Nios2
3132 PowerPC
3233 RISCV
3334 Sparc
0 set(LLVM_TARGET_DEFINITIONS Nios2.td)
1
2 #Generate Nios2GenRegisterInfo.inc and Nios2GenInstrInfo.inc which included by
3 #your hand code C++ files.
4 #Nios2GenRegisterInfo.inc came from Nios2RegisterInfo.td, Nios2GenInstrInfo.inc
5 #came from Nios2InstrInfo.td.
6 tablegen(LLVM Nios2GenRegisterInfo.inc -gen-register-info)
7 tablegen(LLVM Nios2GenInstrInfo.inc -gen-instr-info)
8
9 #Nios2CommonTableGen must be defined
10 add_public_tablegen_target(Nios2CommonTableGen)
11
12 #Nios2CodeGen should match with LLVMBuild.txt Nios2CodeGen
13 add_llvm_target(Nios2CodeGen Nios2TargetMachine.cpp)
14
15 #Should match with "subdirectories = MCTargetDesc TargetInfo" in LLVMBuild.txt
16 add_subdirectory(TargetInfo)
17 add_subdirectory(MCTargetDesc)
0 ;===- ./lib/Target/Nios2/LLVMBuild.txt -------------------------*- Conf -*--===;
1 ;
2 ; The LLVM Compiler Infrastructure
3 ;
4 ; This file is distributed under the University of Illinois Open Source
5 ; License. See LICENSE.TXT for details.
6 ;
7 ;===------------------------------------------------------------------------===;
8 ;
9 ; This is an LLVMBuild description file for the components in this subdirectory.
10 ;
11 ; For more information on the LLVMBuild system, please see:
12 ;
13 ; http://llvm.org/docs/LLVMBuild.html
14 ;
15 ;===------------------------------------------------------------------------===;
16
17 #Following comments extracted from http: // llvm.org/docs/LLVMBuild.html
18
19 [common]
20 subdirectories =
21 MCTargetDesc
22 TargetInfo
23
24 [component_0]
25 #TargetGroup components are an extension of LibraryGroups, specifically for
26 #defining LLVM targets(which are handled specially in a few places).
27 type = TargetGroup
28 #The name of the component should always be the name of the target.(should
29 #match "def Nios2 : Target" in Nios2.td)
30 name = Nios2
31 #Nios2 component is located in directory Target /
32 parent = Target
33 #Whether this target defines an assembly parser, assembly printer, disassembler
34 #, and supports JIT compilation.They are optional.
35
36 [component_1]
37 #component_1 is a Library type and name is Nios2CodeGen.After build it will
38 #in lib / libLLVMNios2CodeGen.a of your build command directory.
39 type = Library
40 name = Nios2CodeGen
41 #Nios2CodeGen component(Library) is located in directory Nios2 /
42 parent = Nios2
43 #If given, a list of the names of Library or LibraryGroup components which
44 #must also be linked in whenever this library is used.That is, the link time
45 #dependencies for this component.When tools are built, the build system will
46 #include the transitive closure of all required_libraries for the components
47 #the tool needs.
48 required_libraries = CodeGen
49 Core
50 GlobalISel
51 MC
52 Nios2Desc
53 Nios2Info
54 Support
55 Target
56 #end of required_libraries
57
58 #All LLVMBuild.txt in Target / Nios2 and subdirectory use 'add_to_library_groups
59 #= Nios2'
60 add_to_library_groups = Nios2
0 #MCTargetDesc / CMakeLists.txt
1 add_llvm_library(LLVMNios2Desc Nios2MCTargetDesc.cpp)
0 ;===- ./lib/Target/Nios2/MCTargetDesc/LLVMBuild.txt ------------*- Conf -*--===;
1 ;
2 ; The LLVM Compiler Infrastructure
3 ;
4 ; This file is distributed under the University of Illinois Open Source
5 ; License. See LICENSE.TXT for details.
6 ;
7 ;===------------------------------------------------------------------------===;
8 ;
9 ; This is an LLVMBuild description file for the components in this subdirectory.
10 ;
11 ; For more information on the LLVMBuild system, please see:
12 ;
13 ; http://llvm.org/docs/LLVMBuild.html
14 ;
15 ;===------------------------------------------------------------------------===;
16
17 [component_0]
18 type = Library
19 name = Nios2Desc
20 parent = Nios2
21 required_libraries = MC
22 Nios2Info
23 Support
24 add_to_library_groups = Nios2
0 //===-- Nios2MCTargetDesc.cpp - Nios2 Target Descriptions -----------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file provides Nios2 specific target descriptions.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "Nios2MCTargetDesc.h"
14 #include "llvm/MC/MCInstrInfo.h"
15
16 using namespace llvm;
17
18 #define GET_INSTRINFO_MC_DESC
19 #include "Nios2GenInstrInfo.inc"
20
21 #define GET_REGINFO_MC_DESC
22 #include "Nios2GenRegisterInfo.inc"
23
24 extern "C" void LLVMInitializeNios2TargetMC() {}
0 //===-- Nios2MCTargetDesc.h - Nios2 Target Descriptions ---------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file provides Nios2 specific target descriptions.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_LIB_TARGET_NIOS2_MCTARGETDESC_NIOS2MCTARGETDESC_H
14 #define LLVM_LIB_TARGET_NIOS2_MCTARGETDESC_NIOS2MCTARGETDESC_H
15
16 namespace llvm {
17 class Target;
18 class Triple;
19
20 Target &getTheNios2Target();
21
22 } // namespace llvm
23
24 // Defines symbolic names for Nios2 registers. This defines a mapping from
25 // register name to register number.
26 #define GET_REGINFO_ENUM
27 #include "Nios2GenRegisterInfo.inc"
28
29 // Defines symbolic names for the Nios2 instructions.
30 #define GET_INSTRINFO_ENUM
31 #include "Nios2GenInstrInfo.inc"
32
33 #endif
0 //===-- Nios2.h - Top-level interface for Nios2 representation --*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the entry points for global functions defined in
10 // the LLVM Nios2 back-end.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2_H
15 #define LLVM_LIB_TARGET_NIOS2_NIOS2_H
16
17 #include "MCTargetDesc/Nios2MCTargetDesc.h"
18 #include "llvm/Target/TargetMachine.h"
19
20 namespace llvm {
21 class Nios2TargetMachine;
22 } // namespace llvm
23
24 #endif
0 //===-- Nios2.td - Describe the Nios2 Target Machine -------*- tablegen -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 //===----------------------------------------------------------------------===//
10 // Target-independent interfaces
11 //===----------------------------------------------------------------------===//
12
13 include "llvm/Target/Target.td"
14
15 //===----------------------------------------------------------------------===//
16 // Target-dependent interfaces
17 //===----------------------------------------------------------------------===//
18
19 //===----------------------------------------------------------------------===//
20 // Calling Conv, Instruction Descriptions
21 //===----------------------------------------------------------------------===//
22
23 include "Nios2RegisterInfo.td"
24 include "Nios2InstrInfo.td"
25
26 def Nios2InstrInfo : InstrInfo;
27
28 def Nios2 : Target { let InstructionSet = Nios2InstrInfo; }
0 //===-- Nios2InstrFormats.td - Nios2 Instruction Formats ---*- tablegen -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 //===----------------------------------------------------------------------===//
10 // Describe NIOS2 instructions format
11 //
12 //
13 //===----------------------------------------------------------------------===//
14
15 // Format specifies the encoding used by the instruction. This is part of the
16 // ad-hoc solution used to emit machine instruction encodings by our machine
17 // code emitter.
18 class Format val> {
19 bits<3> Value = val;
20 }
21
22 def Pseudo : Format<0>;
23 def FrmI : Format<1>;
24 def FrmR : Format<2>;
25 def FrmJ : Format<3>;
26 def FrmOther : Format<4>; // Instruction w/ a custom format
27
28 // Generic Nios2 Format
29 class Nios2Inst pattern, Format f>
30 : Instruction {
31 field bits<32> Inst;
32 Format Form = f;
33
34 let Namespace = "Nios2";
35
36 let Size = 4;
37
38 bits<6> Opcode = 0;
39
40 // Bottom 6 bits are the 'opcode' field
41 let Inst{5 - 0} = Opcode;
42
43 let OutOperandList = outs;
44 let InOperandList = ins;
45
46 let AsmString = asmstr;
47 let Pattern = pattern;
48
49 //
50 // Attributes specific to Nios2 instructions:
51 //
52 bits<3> FormBits = Form.Value;
53
54 // TSFlags layout should be kept in sync with Nios2InstrInfo.h.
55 let TSFlags{2 - 0} = FormBits;
56
57 let DecoderNamespace = "Nios2";
58 }
59
60 // Nios2 Instruction Format
61 class InstSE pattern, Format f>
62 : Nios2Inst {
63 }
64
65 //===----------------------------------------------------------------------===//
66 // Format I instruction class in Nios2 : <|A|B|immediate|opcode|>
67 //===----------------------------------------------------------------------===//
68
69 class FI op, dag outs, dag ins, string asmstr, list pattern>
70 : InstSE {
71 bits<5> rA;
72 bits<5> rB;
73 bits<16> imm;
74
75 let Opcode = op;
76
77 let Inst{31 - 27} = rA;
78 let Inst{26 - 22} = rB;
79 let Inst{21 - 6} = imm;
80 }
81
82 //===----------------------------------------------------------------------===//
83 // Format R instruction : <|A|B|C|opx|imm|opcode|>
84 //===----------------------------------------------------------------------===//
85
86 class FR opx, dag outs, dag ins, string asmstr, list pattern>
87 : InstSE {
88 bits<5> rA;
89 bits<5> rB;
90 bits<5> rC;
91 bits<5> imm = 0;
92
93 // opcode is always 0x3a for R instr.
94 let Opcode = 0x3a;
95
96 let Inst{31 - 27} = rA;
97 let Inst{26 - 22} = rB;
98 let Inst{21 - 17} = rC;
99 // opx stands for opcode extension
100 let Inst{16 - 11} = opx;
101 // optional 5-bit immediate value
102 let Inst{10 - 6} = imm;
103 }
104
105 //===----------------------------------------------------------------------===//
106 // Format J instruction class in Nios2 : <|address|opcode|>
107 //===----------------------------------------------------------------------===//
108
109 class FJ op, dag outs, dag ins, string asmstr, list pattern>
110 : InstSE {
111 bits<26> addr;
112
113 let Opcode = op;
114
115 let Inst{31 - 6} = addr;
116 }
0 //===- Nios2InstrInfo.td - Target Description for Nios2 ------*- tablegen -*-=//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the Nios2 implementation of the TargetInstrInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 //===----------------------------------------------------------------------===//
14 // Instruction format superclass
15 //===----------------------------------------------------------------------===//
16
17 include "Nios2InstrFormats.td"
18
19 //===----------------------------------------------------------------------===//
20 // Nios2 Operand, Complex Patterns and Transformations Definitions.
21 //===----------------------------------------------------------------------===//
22
23 def simm16 : Operand {
24 let DecoderMethod= "DecodeSimm16";
25 }
26
27 // Node immediate fits as 16-bit sign extended on target immediate.
28 // e.g. addi, andi
29 def immSExt16 : PatLeaf<(imm), [{ return isInt<16>(N->getSExtValue()); }]>;
30
31 //===----------------------------------------------------------------------===//
32 // Instructions specific format
33 //===----------------------------------------------------------------------===//
34
35 // Arithmetic and logical instructions with 2 register operands.
36 class ArithLogicI op, string instr_asm, SDNode OpNode,
37 Operand Od, PatLeaf imm_type, RegisterClass RC> :
38 FI
39 !strconcat(instr_asm, "\t$rB, $rA, $imm16"),
40 [(set RC:$rB, (OpNode RC:$rA, imm_type:$imm16))]> {
41 let isReMaterializable = 1;
42 }
43
44 //===----------------------------------------------------------------------===//
45 // Nios2 R1 Instructions
46 //===----------------------------------------------------------------------===//
47
48 /// Arithmetic Instructions (ALU Immediate)
49 def ADDi : ArithLogicI<0x04, "addi", add, simm16, immSExt16, CPURegs>;
0 //===-- Nios2RegisterInfo.td - Nios2 Register defs ---------*- tablegen -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 // We have bank of 32 registers.
10 class Nios2Reg : Register {
11 field bits<5> Num;
12 let Namespace = "Nios2";
13 }
14
15 // Nios2 CPU Registers
16 class Nios2GPRReg num, string n> : Nios2Reg {
17 let Num = num;
18 }
19
20 //===----------------------------------------------------------------------===//
21 // Registers
22 //===----------------------------------------------------------------------===//
23
24 let Namespace = "Nios2" in {
25 // General Purpose Registers
26 def ZERO : Nios2GPRReg<0, "zero">, DwarfRegNum<[ 0 ]>;
27 def AT : Nios2GPRReg<1, "at">, DwarfRegNum<[ 1 ]>;
28 foreach RegNum = 2 - 23 in {
29 def R #RegNum : Nios2GPRReg, DwarfRegNum<[ RegNum ]>;
30 }
31 def ET : Nios2GPRReg<24, "et">, DwarfRegNum<[ 24 ]>;
32 def BT : Nios2GPRReg<25, "bt">, DwarfRegNum<[ 25 ]>;
33 def GP : Nios2GPRReg<26, "gp">, DwarfRegNum<[ 26 ]>;
34 def SP : Nios2GPRReg<27, "sp">, DwarfRegNum<[ 27 ]>;
35 def FP : Nios2GPRReg<28, "fp">, DwarfRegNum<[ 28 ]>;
36 def EA : Nios2GPRReg<29, "ea">, DwarfRegNum<[ 29 ]>;
37 def BA : Nios2GPRReg<30, "ba">, DwarfRegNum<[ 30 ]>;
38 def RA : Nios2GPRReg<31, "ra">, DwarfRegNum<[ 31 ]>;
39 def PC : Nios2Reg<"pc">, DwarfRegNum<[ 32 ]>;
40 }
41
42 //===----------------------------------------------------------------------===//
43 // Register Classes
44 //===----------------------------------------------------------------------===//
45
46 def CPURegs : RegisterClass<"Nios2", [ i32 ], 32,
47 (add
48 // Reserved
49 ZERO,
50 AT,
51 // Return Values and Arguments
52 (sequence "R%u", 2, 7),
53 // Not preserved across procedure calls
54 // Caller saved
55 (sequence "R%u", 8, 15),
56 // Callee saved
57 (sequence "R%u", 16, 23),
58 // Reserved
59 ET, BT, GP, SP, FP, EA, BA, RA, PC)>;
0 //===-- Nios2TargetMachine.cpp - Define TargetMachine for Nios2 -----------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Implements the info about Nios2 target spec.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "Nios2TargetMachine.h"
14 #include "Nios2.h"
15
16 using namespace llvm;
17
18 #define DEBUG_TYPE "nios2"
19
20 extern "C" void LLVMInitializeNios2Target() {
21 // Register the target.
22 }
23
24 static std::string computeDataLayout(const Triple &TT, StringRef CPU,
25 const TargetOptions &Options) {
26 return "e-p:32:32:32-i8:8:32-i16:16:32-n32";
27 }
28
29 static Reloc::Model getEffectiveRelocModel(CodeModel::Model CM,
30 Optional RM) {
31 if (!RM.hasValue() || CM == CodeModel::JITDefault)
32 return Reloc::Static;
33 return *RM;
34 }
35
36 Nios2TargetMachine::Nios2TargetMachine(const Target &T, const Triple &TT,
37 StringRef CPU, StringRef FS,
38 const TargetOptions &Options,
39 Optional RM,
40 CodeModel::Model CM,
41 CodeGenOpt::Level OL)
42 : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options), TT, CPU, FS,
43 Options, getEffectiveRelocModel(CM, RM), CM, OL) {}
44
45 Nios2TargetMachine::~Nios2TargetMachine() {}
0 //===-- Nios2TargetMachine.h - Define TargetMachine for Nios2 ---*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the Nios2 specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
14 #define LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
15
16 #include "llvm/Target/TargetMachine.h"
17
18 namespace llvm {
19 class Nios2TargetMachine : public LLVMTargetMachine {
20 public:
21 Nios2TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
22 StringRef FS, const TargetOptions &Options,
23 Optional RM, CodeModel::Model CM,
24 CodeGenOpt::Level OL);
25 ~Nios2TargetMachine() override;
26 };
27 } // namespace llvm
28
29 #endif
0 add_llvm_library(LLVMNios2Info Nios2TargetInfo.cpp)
0 ;===- ./lib/Target/Nios2/TargetInfo/LLVMBuild.txt --------------*- Conf -*--===;
1 ;
2 ; The LLVM Compiler Infrastructure
3 ;
4 ; This file is distributed under the University of Illinois Open Source
5 ; License. See LICENSE.TXT for details.
6 ;
7 ;===------------------------------------------------------------------------===;
8 ;
9 ; This is an LLVMBuild description file for the components in this subdirectory.
10 ;
11 ; For more information on the LLVMBuild system, please see:
12 ;
13 ; http://llvm.org/docs/LLVMBuild.html
14 ;
15 ;===------------------------------------------------------------------------===;
16
17 [component_0]
18 type = Library
19 name = Nios2Info
20 parent = Nios2
21 required_libraries = Support
22 add_to_library_groups = Nios2
0 //===-- Nios2TargetInfo.cpp - Nios2 Target Implementation -----------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "Nios2.h"
10 #include "llvm/Support/TargetRegistry.h"
11
12 using namespace llvm;
13
14 Target &llvm::getTheNios2Target() {
15 static Target TheNios2Target;
16 return TheNios2Target;
17 }
18
19 extern "C" void LLVMInitializeNios2TargetInfo() {
20 RegisterTarget
21 /*HasJIT=*/true>
22 X(getTheNios2Target(), "nios2", "Nios2");
23 }
0 if not 'Nios2' in config.root.targets:
1 config.unsupported = True
2
0 ; This tests that llc accepts Nios2 target.
1
2 ; RUN: not not llc < %s -asm-verbose=false -march=nios2 2>&1 | FileCheck %s --check-prefix=ARCH
3 ; RUN: not not llc < %s -asm-verbose=false -mtriple=nios2 2>&1 | FileCheck %s --check-prefix=TRIPLE
4
5 ; ARCH-NOT: invalid target
6 ; TRIPLE-NOT: unable to get target
7
8 define i32 @f(i32 %i) {
9 ret i32 %i
10 }