REG_ERROR,
};
-enum field_ref_type {
- FIELD_REF_UNKNOWN = 0,
- FIELD_REF_STRING,
- FIELD_REF_SEQUENCE,
- FIELD_REF_S64,
- FIELD_REF_DOUBLE,
-};
-
struct field_ref {
/* Initially, symbol offset. After link, field offset. */
uint16_t offset;
- uint8_t type; /* enum field_ref_type */
} __attribute__((packed));
struct literal_numeric {
/* load */
FILTER_OP_LOAD_FIELD_REF,
+ FILTER_OP_LOAD_FIELD_REF_STRING,
+ FILTER_OP_LOAD_FIELD_REF_SEQUENCE,
+ FILTER_OP_LOAD_FIELD_REF_S64,
+ FILTER_OP_LOAD_FIELD_REF_DOUBLE,
+
FILTER_OP_LOAD_STRING,
FILTER_OP_LOAD_S64,
FILTER_OP_LOAD_DOUBLE,
memcpy(insn->data, &ref_offset, sizeof(ref_offset));
if (insn->reg == REG_ERROR)
return -EINVAL;
- /* reloc_offset points to struct field_ref */
+ /* reloc_offset points to struct load_op */
reloc_offset = bytecode_get_len(&ctx->bytecode->b);
- reloc_offset += sizeof(struct load_op);
ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len);
if (ret) {
free(insn);