LLVM API Documentation
#include "Interpreter.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Debug.h"
#include <cmath>
Include dependency graph for Execution.cpp:
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "interpreter" |
#define | IMPLEMENT_BINARY_OPERATOR(OP, TY) case Type::TY##TyID: Dest.TY##Val = Src1.TY##Val OP Src2.TY##Val; break |
#define | IMPLEMENT_SETCC(OP, TY) case Type::TY##TyID: Dest.BoolVal = Src1.TY##Val OP Src2.TY##Val; break |
#define | IMPLEMENT_POINTERSETCC(OP) |
#define | IMPLEMENT_SHIFT(OP, TY) case Type::TY##TyID: Dest.TY##Val = Src1.TY##Val OP Src2.UByteVal; break |
#define | IMPLEMENT_CAST(DTY, DCTY, STY) case Type::STY##TyID: Dest.DTY##Val = DCTY Src.STY##Val; break; |
#define | IMPLEMENT_CAST_CASE_START(DESTTY, DESTCTY) |
#define | IMPLEMENT_CAST_CASE_FP_IMP(DESTTY, DESTCTY) |
#define | IMPLEMENT_CAST_CASE_END() |
#define | IMPLEMENT_CAST_CASE(DESTTY, DESTCTY) |
#define | IMPLEMENT_VAARG(TY) case Type::TY##TyID: Dest.TY##Val = Src.TY##Val; break |
Functions | |
static GenericValue | executeAddInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSubInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeMulInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeRemInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeDivInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeAndInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeOrInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeXorInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetEQInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetNEInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetLTInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetGTInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetLEInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSetGEInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeShlInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeShrInst (GenericValue Src1, GenericValue Src2, const Type *Ty) |
static GenericValue | executeSelectInst (GenericValue Src1, GenericValue Src2, GenericValue Src3) |
static void | SetValue (Value *V, GenericValue Val, ExecutionContext &SF) |
|
Definition at line 14 of file Execution.cpp. |
|
Definition at line 179 of file Execution.cpp. Referenced by executeAddInst(), executeAndInst(), executeDivInst(), executeMulInst(), executeOrInst(), executeRemInst(), executeSubInst(), and executeXorInst(). |
|
Definition at line 928 of file Execution.cpp. |
|
Value: IMPLEMENT_CAST_CASE_START(DESTTY, DESTCTY); \ IMPLEMENT_CAST_CASE_FP_IMP(DESTTY, DESTCTY); \ IMPLEMENT_CAST_CASE_END() Definition at line 955 of file Execution.cpp. |
|
Value: default: std::cout << "Unhandled cast: " << *SrcTy << " to " << *Ty << "\n"; \ abort(); \ } \ break Definition at line 949 of file Execution.cpp. |
|
Value: IMPLEMENT_CAST(DESTTY, DESTCTY, Float); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Double) Definition at line 945 of file Execution.cpp. |
|
Value: case Type::DESTTY##TyID: \ switch (SrcTy->getTypeID()) { \ IMPLEMENT_CAST(DESTTY, DESTCTY, Bool); \ IMPLEMENT_CAST(DESTTY, DESTCTY, UByte); \ IMPLEMENT_CAST(DESTTY, DESTCTY, SByte); \ IMPLEMENT_CAST(DESTTY, DESTCTY, UShort); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Short); \ IMPLEMENT_CAST(DESTTY, DESTCTY, UInt); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Int); \ IMPLEMENT_CAST(DESTTY, DESTCTY, ULong); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Long); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Pointer); Definition at line 931 of file Execution.cpp. |
|
Value: case Type::PointerTyID: \ Dest.BoolVal = (void*)(intptr_t)Src1.PointerVal OP \ (void*)(intptr_t)Src2.PointerVal; break Definition at line 358 of file Execution.cpp. Referenced by executeSetEQInst(), executeSetGEInst(), executeSetGTInst(), executeSetLEInst(), executeSetLTInst(), and executeSetNEInst(). |
|
Definition at line 351 of file Execution.cpp. Referenced by executeSetEQInst(), executeSetGEInst(), executeSetGTInst(), executeSetLEInst(), executeSetLTInst(), and executeSetNEInst(). |
|
Definition at line 868 of file Execution.cpp. Referenced by executeShlInst(), and executeShrInst(). |
|
Definition at line 1003 of file Execution.cpp. Referenced by llvm::Interpreter::visitVAArgInst(). |
|
Definition at line 182 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 291 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 245 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 224 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 311 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 266 of file Execution.cpp. References abort(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 526 of file Execution.cpp. References llvm::GenericValue::BoolVal. Referenced by llvm::Interpreter::visitSelectInst(). |
|
Definition at line 363 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(), and llvm::Interpreter::visitSwitchInst(). |
|
Definition at line 430 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 474 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 408 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 452 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 385 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), IMPLEMENT_POINTERSETCC, and IMPLEMENT_SETCC. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 871 of file Execution.cpp. References llvm::Type::getTypeID(), and IMPLEMENT_SHIFT. Referenced by llvm::Interpreter::visitShl(). |
|
Definition at line 889 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_SHIFT. Referenced by llvm::Interpreter::visitShr(). |
|
Definition at line 203 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
Definition at line 331 of file Execution.cpp. References abort(), llvm::Type::getTypeID(), and IMPLEMENT_BINARY_OPERATOR. Referenced by llvm::Interpreter::visitBinaryOperator(). |
|
|
Referenced by llvm::Interpreter::run(). |
|
Definition at line 29 of file Execution.cpp. Referenced by llvm::Interpreter::visitGetElementPtrInst(). |