-O validate-ZAM option

This commit is contained in:
Vern Paxson 2024-06-09 15:04:08 -07:00
parent 0447aaa76f
commit f6445a792e
10 changed files with 51 additions and 25 deletions

View file

@ -4,6 +4,8 @@
#pragma once
#include <string>
namespace zeek::detail {
// Opcodes associated with ZAM instructions.
@ -59,6 +61,16 @@ enum ZAMOp1Flavor {
OP1_INTERNAL, // we're doing some internal manipulation of the slot
};
// Used to describe ZAM instructions for validation.
struct ZAMInstDesc {
std::string op_class; // associated class
std::string op_types; // operand types
std::string op_eval; // evaluation
};
// Provides access to the validation description of each operation.
extern std::unordered_map<ZOp, ZAMInstDesc> zam_inst_desc;
// Maps an operand to its flavor.
extern ZAMOp1Flavor op1_flavor[];