LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
asm
aarch64
operands
aarch64/operands/Memory.hpp
Go to the documentation of this file.
1
/* Copyright 2022 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_ASM_AARCH64_OPERAND_MEMORY_H
16
#define LIEF_ASM_AARCH64_OPERAND_MEMORY_H
17
#include "
LIEF/asm/aarch64/Operand.hpp
"
18
#include "
LIEF/asm/aarch64/registers.hpp
"
19
20
namespace
LIEF
{
21
namespace
assembly
{
22
namespace
aarch64
{
23
namespace
operands
{
24
36
class
LIEF_API
Memory
:
public
Operand {
37
public
:
38
using
Operand::Operand;
39
40
enum class
SHIFT
: int32_t {
41
UNKNOWN = 0,
42
LSL,
43
UXTX,
44
UXTW,
45
SXTX,
46
SXTW,
47
};
48
50
struct
shift_info_t
{
51
SHIFT
type
=
SHIFT::UNKNOWN
;
52
int8_t
value
= -1;
53
};
54
57
struct
offset_t
{
59
enum class
TYPE
{
60
NONE = 0,
62
REG
,
64
DISP,
65
};
66
67
union
{
69
REG
reg
;
70
72
int64_t
displacement
= 0;
73
};
74
TYPE
type
=
TYPE::NONE
;
75
};
76
80
REG
base
()
const
;
81
87
offset_t
offset
()
const
;
88
93
shift_info_t
shift
()
const
;
94
95
static
bool
classof
(
const
Operand* op);
96
97
~Memory
()
override
=
default
;
98
};
99
}
100
}
101
}
102
}
103
#endif
Operand.hpp
registers.hpp
LIEF::assembly::aarch64::operands::Memory
This class represents a memory operand.
Definition
aarch64/operands/Memory.hpp:36
LIEF::assembly::aarch64::operands::Memory::~Memory
~Memory() override=default
LIEF::assembly::aarch64::operands::Memory::shift
shift_info_t shift() const
Shift information.
LIEF::assembly::aarch64::operands::Memory::classof
static bool classof(const Operand *op)
LIEF::assembly::aarch64::operands::Memory::base
REG base() const
The base register.
LIEF::assembly::aarch64::operands::Memory::offset
offset_t offset() const
The addressing offset.
LIEF::assembly::aarch64::operands::Memory::SHIFT
SHIFT
Definition
aarch64/operands/Memory.hpp:40
LIEF::assembly::aarch64::operands::Memory::SHIFT::UNKNOWN
@ UNKNOWN
Definition
aarch64/operands/Memory.hpp:41
LIEF::assembly::aarch64::operands
Namespace that wraps the different aarch64 operands.
Definition
aarch64/operands/Immediate.hpp:23
LIEF::assembly::aarch64
AArch64 architecture-related namespace.
Definition
aarch64/Instruction.hpp:27
LIEF::assembly::aarch64::REG
REG
Definition
aarch64/registers.hpp:25
LIEF::assembly
Namespace related to assembly/disassembly support.
Definition
Abstract/Binary.hpp:47
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
LIEF::assembly::aarch64::operands::Memory::offset_t
Wraps a memory offset as an integer offset or as a register offset.
Definition
aarch64/operands/Memory.hpp:57
LIEF::assembly::aarch64::operands::Memory::offset_t::reg
REG reg
Register offset.
Definition
aarch64/operands/Memory.hpp:69
LIEF::assembly::aarch64::operands::Memory::offset_t::TYPE
TYPE
Enum type used to discriminate the anonymous union.
Definition
aarch64/operands/Memory.hpp:59
LIEF::assembly::aarch64::operands::Memory::offset_t::TYPE::NONE
@ NONE
Definition
aarch64/operands/Memory.hpp:60
LIEF::assembly::aarch64::operands::Memory::offset_t::type
TYPE type
Definition
aarch64/operands/Memory.hpp:74
LIEF::assembly::aarch64::operands::Memory::offset_t::displacement
int64_t displacement
Integer offset.
Definition
aarch64/operands/Memory.hpp:72
LIEF::assembly::aarch64::operands::Memory::shift_info_t
This structure holds shift info (type + value).
Definition
aarch64/operands/Memory.hpp:50
LIEF::assembly::aarch64::operands::Memory::shift_info_t::value
int8_t value
Definition
aarch64/operands/Memory.hpp:52
LIEF::assembly::aarch64::operands::Memory::shift_info_t::type
SHIFT type
Definition
aarch64/operands/Memory.hpp:51
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0