LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
aarch64/operands/Memory.hpp
Go to the documentation of this file.
1/* Copyright 2022 - 2025 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
19
20namespace LIEF {
21namespace assembly {
22namespace aarch64 {
23namespace operands {
24
36class LIEF_API Memory : public Operand {
37 public:
38 using Operand::Operand;
39
40 enum class SHIFT : int32_t {
47 };
48
50 struct shift_info_t {
52 int8_t value = -1;
53 };
54
57 struct offset_t {
59 enum class TYPE {
60 NONE = 0,
65 };
66
67 union {
70
72 int64_t displacement = 0;
73 };
75 };
76
80 REG base() const;
81
88
94
95 static bool classof(const Operand* op);
96
97 ~Memory() override = default;
98};
99}
100}
101}
102}
103#endif
This class represents a memory operand.
Definition aarch64/operands/Memory.hpp:36
shift_info_t shift() const
Shift information.
static bool classof(const Operand *op)
REG base() const
The base register.
offset_t offset() const
The addressing offset.
SHIFT
Definition aarch64/operands/Memory.hpp:40
@ LSL
Definition aarch64/operands/Memory.hpp:42
@ SXTX
Definition aarch64/operands/Memory.hpp:45
@ UNKNOWN
Definition aarch64/operands/Memory.hpp:41
@ SXTW
Definition aarch64/operands/Memory.hpp:46
@ UXTX
Definition aarch64/operands/Memory.hpp:43
@ UXTW
Definition aarch64/operands/Memory.hpp:44
Namespace that wraps the different aarch64 operands.
Definition aarch64/operands/Immediate.hpp:23
AArch64 architecture-related namespace.
Definition aarch64/Instruction.hpp:27
REG
Definition aarch64/registers.hpp:25
Namespace related to assembly/disassembly support.
Definition Abstract/Binary.hpp:47
LIEF namespace.
Definition Abstract/Binary.hpp:40
Wraps a memory offset as an integer offset or as a register offset.
Definition aarch64/operands/Memory.hpp:57
REG reg
Register offset.
Definition aarch64/operands/Memory.hpp:69
TYPE
Enum type used to discriminate the anonymous union.
Definition aarch64/operands/Memory.hpp:59
@ DISP
The union holds the displacement attribute (int64_t).
Definition aarch64/operands/Memory.hpp:64
@ NONE
Definition aarch64/operands/Memory.hpp:60
@ REG
The union holds the REG attribute.
Definition aarch64/operands/Memory.hpp:62
TYPE type
Definition aarch64/operands/Memory.hpp:74
int64_t displacement
Integer offset.
Definition aarch64/operands/Memory.hpp:72
This structure holds shift info (type + value).
Definition aarch64/operands/Memory.hpp:50
int8_t value
Definition aarch64/operands/Memory.hpp:52
SHIFT type
Definition aarch64/operands/Memory.hpp:51
#define LIEF_API
Definition visibility.h:41