This patch includes all missing functionality needed to provide first compilation of a simple program that just returns from a function. I've added a test case that checks for "ret" instruction printed in assembly output. Patch by Andrei Grischenko (andrei.l.grischenko@intel.com) Differential revision: https://reviews.llvm.org/D39688 llvm-svn: 320035
25 lines
697 B
C++
25 lines
697 B
C++
//===-- Nios2TargetInfo.cpp - Nios2 Target Implementation -----------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Nios2.h"
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
|
|
using namespace llvm;
|
|
|
|
Target &llvm::getTheNios2Target() {
|
|
static Target TheNios2Target;
|
|
return TheNios2Target;
|
|
}
|
|
|
|
extern "C" void LLVMInitializeNios2TargetInfo() {
|
|
RegisterTarget<Triple::nios2,
|
|
/*HasJIT=*/true>
|
|
X(getTheNios2Target(), "nios2", "Nios2", "Nios2");
|
|
}
|