aboutsummaryrefslogtreecommitdiffstats
path: root/backends/verilog/verilog_backend.cc
Commit message (Expand)AuthorAgeFilesLines
...
* Fixed handling of boolean attributes (backends)Clifford Wolf2013-10-241-1/+1
* Fixed handling of boolean attributes (kernel)Clifford Wolf2013-10-241-4/+4
* Added $_SR_[PN][PN]_, $_DFFSR_[PN][PN][PN]_, $_DLATCH_[PN]_Clifford Wolf2013-10-181-0/+1
* Added $sr, $dffsr and $dlatch cell typesClifford Wolf2013-10-181-28/+1
* Added -selected option to various backendsClifford Wolf2013-09-031-6/+21
* More explicit integer output in verilog backendClifford Wolf2013-08-221-2/+2
* Implemented proper handling of stub placeholder modulesClifford Wolf2013-03-281-6/+18
* Avoid verilog-2k in verilog backendClifford Wolf2013-03-211-0/+17
* More support code for $sr cellsClifford Wolf2013-03-141-1/+29
* Fixed a gcc compiler warning [-Wparentheses]Clifford Wolf2013-03-031-1/+2
* Added more help messagesClifford Wolf2013-03-011-1/+25
* initial importClifford Wolf2013-01-051-0/+905
at */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*  LLVM binding
  Copyright (C) 2014 Tristan Gingold

  GHDL is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2, or (at your option) any later
  version.

  GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  for more details.

  You should have received a copy of the GNU General Public License
  along with GHDL; see the file COPYING.  If not, write to the Free
  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.  */
#include "llvm-c/Target.h"
#include "llvm-c/Core.h"
#include "llvm-c/ExecutionEngine.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"

using namespace llvm;

extern "C" {

void
LLVMInitializeNativeTarget_noinline (void)
{
  LLVMInitializeNativeTarget ();
}

void
LLVMInitializeNativeAsmPrinter_noinline (void)
{
  LLVMInitializeNativeAsmPrinter();
}

LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) {
  return (LLVMTypeRef) Type::getMetadataTy(*unwrap(C));
}

LLVMTypeRef LLVMMetadataType_extra(void) {
  return LLVMMetadataTypeInContext(LLVMGetGlobalContext());
}

void
LLVMMDNodeReplaceOperandWith_extra (LLVMValueRef N, unsigned i, LLVMValueRef V) {
  MDNode *MD = cast<MDNode>(unwrap(N));
  MD->replaceOperandWith (i, unwrap(V));
}

void *LLVMGetPointerToFunction(LLVMExecutionEngineRef EE, LLVMValueRef Func)
{
  return unwrap(EE)->getPointerToFunction(unwrap<Function>(Func));
}

}