Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
addressing.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5
6namespace bb::avm2 {
7
8inline bool is_operand_relative(uint16_t indirect_flag, size_t operand_index)
9{
10 return ((indirect_flag >> (operand_index * 2 + 1)) & 1) != 0;
11}
12
13inline bool is_operand_indirect(uint16_t indirect_flag, size_t operand_index)
14{
15 return ((indirect_flag >> (operand_index * 2)) & 1) != 0;
16}
17
18} // namespace bb::avm2
bool is_operand_relative(uint16_t indirect_flag, size_t operand_index)
Definition addressing.hpp:8
bool is_operand_indirect(uint16_t indirect_flag, size_t operand_index)