LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
asm
aarch64
operands
asm/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
21
namespace
LIEF::assembly::aarch64::operands
{
22
34
class
LIEF_API
Memory
:
public
Operand {
35
public
:
36
using
Operand::Operand;
37
38
enum class
SHIFT
: int32_t {
39
UNKNOWN = 0,
40
LSL,
41
UXTX,
42
UXTW,
43
SXTX,
44
SXTW,
45
};
46
48
struct
shift_info_t
{
49
SHIFT
type
=
SHIFT::UNKNOWN
;
50
int8_t
value
= -1;
51
};
52
55
struct
offset_t
{
57
enum class
TYPE
{
58
NONE = 0,
60
REG
,
62
DISP,
63
};
64
65
union
{
67
REG
reg
;
68
70
int64_t
displacement
= 0;
71
};
72
TYPE
type
=
TYPE::NONE
;
73
};
74
78
REG
base
()
const
;
79
85
offset_t
offset
()
const
;
86
91
shift_info_t
shift
()
const
;
92
93
static
bool
classof
(
const
Operand* op);
94
95
~Memory
()
override
=
default
;
96
};
97
}
98
99
100
#endif
Operand.hpp
registers.hpp
LIEF::assembly::aarch64::operands::Memory
This class represents a memory operand.
Definition
asm/aarch64/operands/Memory.hpp:34
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
asm/aarch64/operands/Memory.hpp:38
LIEF::assembly::aarch64::operands::Memory::SHIFT::UNKNOWN
@ UNKNOWN
Definition
asm/aarch64/operands/Memory.hpp:39
LIEF::assembly::aarch64::operands
Namespace that wraps the different aarch64 operands.
Definition
aarch64/operands/Immediate.hpp:21
LIEF::assembly::aarch64::REG
REG
Definition
aarch64/registers.hpp:25
LIEF::assembly::aarch64::operands::Memory::offset_t
Wraps a memory offset as an integer offset or as a register offset.
Definition
asm/aarch64/operands/Memory.hpp:55
LIEF::assembly::aarch64::operands::Memory::offset_t::reg
REG reg
Register offset.
Definition
asm/aarch64/operands/Memory.hpp:67
LIEF::assembly::aarch64::operands::Memory::offset_t::TYPE
TYPE
Enum type used to discriminate the anonymous union.
Definition
asm/aarch64/operands/Memory.hpp:57
LIEF::assembly::aarch64::operands::Memory::offset_t::TYPE::NONE
@ NONE
Definition
asm/aarch64/operands/Memory.hpp:58
LIEF::assembly::aarch64::operands::Memory::offset_t::type
TYPE type
Definition
asm/aarch64/operands/Memory.hpp:72
LIEF::assembly::aarch64::operands::Memory::offset_t::displacement
int64_t displacement
Integer offset.
Definition
asm/aarch64/operands/Memory.hpp:70
LIEF::assembly::aarch64::operands::Memory::shift_info_t
This structure holds shift info (type + value).
Definition
asm/aarch64/operands/Memory.hpp:48
LIEF::assembly::aarch64::operands::Memory::shift_info_t::value
int8_t value
Definition
asm/aarch64/operands/Memory.hpp:50
LIEF::assembly::aarch64::operands::Memory::shift_info_t::type
SHIFT type
Definition
asm/aarch64/operands/Memory.hpp:49
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0