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