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 - 2024 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 {
24class 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 struct shift_info_t {
51 SHIFT type = SHIFT::UNKNOWN;
52 int8_t value = -1;
53 };
54 struct offset_t { enum class TYPE {
60 NONE = 0, REG, DISP,
65 };
66
67 union { REG reg;
70 int64_t displacement = 0;
73 };
74 TYPE type = TYPE::NONE;
75 };
76 REG base() const;
81 offset_t offset() const;
88 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
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:43
LIEF
LIEF namespace.
Definition Abstract/Binary.hpp:36
LIEF_API
#define LIEF_API
Definition visibility.h:41