libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
irBuilder.hpp
Go to the documentation of this file.
1
2/*
3** Copyright (C) - Triton
4**
5** This program is under the terms of the Apache License 2.0.
6*/
7
8#ifndef TRITON_IRBUILDER_H
9#define TRITON_IRBUILDER_H
10
11#include <triton/archEnums.hpp>
13#include <triton/basicBlock.hpp>
14#include <triton/dllexport.hpp>
16#include <triton/modes.hpp>
20
21
22
24namespace triton {
31 namespace arch {
40 class IrBuilder {
41 private:
43 triton::arch::Architecture* architecture;
44
47
50
53
56
58 void removeSymbolicExpressions(triton::arch::Instruction& inst);
59
61 template <typename T> void collectNodes(T& items) const;
62
64 void collectNodes(std::vector<triton::arch::OperandWrapper>& operands) const;
65
67 template <typename T> void collectUnsymbolizedNodes(T& items) const;
68
70 void collectUnsymbolizedNodes(std::vector<triton::arch::OperandWrapper>& operands) const;
71
72 protected:
75
78
81
82 #ifdef COMPILE_RISCV
85 #endif
86
87 public:
89 TRITON_EXPORT IrBuilder(triton::arch::Architecture* architecture,
90 const triton::modes::SharedModes& modes,
91 const triton::ast::SharedAstContext& astCtxt,
94
96 TRITON_EXPORT virtual ~IrBuilder();
97
100
103
105 TRITON_EXPORT void preIrInit(triton::arch::Instruction& inst);
106
108 TRITON_EXPORT void postIrInit(triton::arch::Instruction& inst);
109 };
110
112 };
114};
115
116#endif /* TRITON_IRBUILDER_H */
The abstract architecture class.
This class is used to represent a basic block.
This class is used to represent an instruction.
The IR builder.
Definition irBuilder.hpp:40
virtual TRITON_EXPORT ~IrBuilder()
Destructor.
Definition irBuilder.cpp:62
TRITON_EXPORT IrBuilder(triton::arch::Architecture *architecture, const triton::modes::SharedModes &modes, const triton::ast::SharedAstContext &astCtxt, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::engines::taint::TaintEngine *taintEngine)
Constructor.
Definition irBuilder.cpp:27
triton::arch::SemanticsInterface * arm32Isa
ARM32 ISA builder.
Definition irBuilder.hpp:77
triton::arch::SemanticsInterface * aarch64Isa
AArch64 ISA builder.
Definition irBuilder.hpp:74
TRITON_EXPORT triton::arch::exception_e buildSemantics(triton::arch::Instruction &inst)
Builds the semantics of the instruction. Returns triton::arch::NO_FAULT if succeed.
Definition irBuilder.cpp:72
TRITON_EXPORT void preIrInit(triton::arch::Instruction &inst)
Everything which must be done before buiding the semantics.
TRITON_EXPORT void postIrInit(triton::arch::Instruction &inst)
Everything which must be done after building the semantics.
triton::arch::SemanticsInterface * x86Isa
x86 ISA builder.
Definition irBuilder.hpp:80
This interface is used as abstract semantics interface. All ISA semantics must use this interface.
std::shared_ptr< triton::ast::AstContext > SharedAstContext
Shared AST context.
Definition ast.hpp:65
std::shared_ptr< triton::modes::Modes > SharedModes
Shared Modes.
Definition modes.hpp:66
The Triton namespace.