Skip to content

Commit

Permalink
Fix some set flag logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Aug 12, 2024
1 parent 3bb8da0 commit 64a7099
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions suite/cstest/include/test_detail_m680x.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ static const cyaml_schema_field_t test_detail_m680x_idx_mapping_schema[] = {
TestDetailM680xIdx, offset_reg, 0, CYAML_UNLIMITED),
CYAML_FIELD_INT("offset", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
offset),
CYAML_FIELD_INT("offset_addr", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
CYAML_FIELD_UINT("offset_addr", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
offset_addr),
CYAML_FIELD_INT("offset_bits", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
CYAML_FIELD_UINT("offset_bits", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
offset_bits),
CYAML_FIELD_INT("inc_dec", CYAML_FLAG_OPTIONAL, TestDetailM680xIdx,
inc_dec),
Expand Down Expand Up @@ -74,10 +74,10 @@ static const cyaml_schema_field_t test_detail_m680x_op_mapping_schema[] = {
CYAML_FIELD_INT("imm", CYAML_FLAG_OPTIONAL, TestDetailM680xOp, imm),
CYAML_FIELD_UINT("rel_address", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
rel_address),
CYAML_FIELD_INT("rel_offset", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
rel_offset),
CYAML_FIELD_UINT("ext_address", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
ext_address),
CYAML_FIELD_INT("rel_offset", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
rel_offset),
CYAML_FIELD_INT("ext_indirect", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
ext_indirect),
CYAML_FIELD_UINT("direct_addr", CYAML_FLAG_OPTIONAL, TestDetailM680xOp,
Expand Down
1 change: 1 addition & 0 deletions suite/cstest/src/test_detail_m680x.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ TestDetailM680xOp *test_detail_m680x_op_clone(const TestDetailM680xOp *op)
clone->ext_address = op->ext_address;
clone->ext_indirect = op->ext_indirect;
clone->direct_addr = op->direct_addr;
clone->direct_addr_set = op->direct_addr_set;
clone->const_val = op->const_val;
clone->size = op->size;

Expand Down
3 changes: 2 additions & 1 deletion suite/cstest/src/test_detail_tms320c64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ TestDetailTMS320c64x *test_detail_tms320c64x_clone(TestDetailTMS320c64x *detail)
clone->funit_crosspath_set = detail->funit_crosspath_set;

clone->parallel = detail->parallel;
clone->parallel_set = detail->parallel_set;

clone->operands_count = detail->operands_count;
if (detail->operands_count > 0) {
Expand Down Expand Up @@ -116,7 +117,7 @@ bool test_expected_tms320c64x(csh *handle, cs_tms320c64x *actual,
compare_uint8_ret(actual->funit.side, expected->funit_side,
false);
} else {
assert(expected->funit_unit == 0);
assert(expected->funit_side == 0);
}
if (expected->funit_crosspath_set) {
compare_uint8_ret(actual->funit.crosspath,
Expand Down

0 comments on commit 64a7099

Please sign in to comment.