libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
bitsVector.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_BITSVECTOR_H
9#define TRITON_BITSVECTOR_H
10
11#include <utility>
12
13#include <triton/dllexport.hpp>
15
16
17
19namespace triton {
26 namespace arch {
36 class BitsVector {
37 protected:
40
43
44 public:
46 TRITON_EXPORT BitsVector();
47
50
52 TRITON_EXPORT BitsVector(const triton::arch::BitsVector& other);
53
55 TRITON_EXPORT BitsVector& operator=(const BitsVector& other);
56
58 TRITON_EXPORT triton::uint32 getHigh(void) const;
59
61 TRITON_EXPORT triton::uint32 getLow(void) const;
62
64 TRITON_EXPORT triton::uint32 getVectorSize(void) const;
65
67 TRITON_EXPORT triton::uint512 getMaxValue(void) const;
68
70 TRITON_EXPORT void setHigh(triton::uint32 v);
71
73 TRITON_EXPORT void setLow(triton::uint32 v);
74
76 TRITON_EXPORT void setBits(triton::uint32 high, triton::uint32 low);
77 };
78
80 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const BitsVector& bv);
81
83 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const BitsVector* bv);
84
86 };
88};
89
90#endif /* TRITON_BITSVECTOR_H */
This class is used to deal with registers and memory as bits vector.
TRITON_EXPORT triton::uint512 getMaxValue(void) const
Returns the max possible value of the bitvector.
triton::uint32 low
The lower bit of the bitvector.
TRITON_EXPORT triton::uint32 getHigh(void) const
Returns the highest bit.
TRITON_EXPORT triton::uint32 getVectorSize(void) const
Returns the size in bits of the vector.
TRITON_EXPORT triton::uint32 getLow(void) const
Returns the lower bit.
TRITON_EXPORT void setHigh(triton::uint32 v)
Sets the highest bit position.
TRITON_EXPORT void setBits(triton::uint32 high, triton::uint32 low)
Sets the bits (high, low) position.
TRITON_EXPORT BitsVector()
Constructor.
TRITON_EXPORT void setLow(triton::uint32 v)
Sets the lower bit position.
triton::uint32 high
The highest bit of the bitvector.
TRITON_EXPORT BitsVector & operator=(const BitsVector &other)
Copy a BitsVector.
std::ostream & operator<<(std::ostream &stream, BasicBlock &block)
Displays an BasicBlock.
std::uint32_t uint32
unisgned 32-bits
The Triton namespace.