You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit fixes a minor problem that prevents tests from compiling and running
to success.
Arch-specific register IDs (represented by ArchTag::RegId) and instruction group
IDs (represented by ArchTag::InsnGroupId) are generated as newtype structs whose
inner type is c_uint because their C definition are just C enums. However, in a
cs_detail struct, the regs_read field is an array of u16, not an array of
c_uint. So we cannot just type pun on the underlying array to get &[A::RegId]
because the layout is totally different. The similar problem exists for
InsnDetail::regs_write and InsnDetail::groups.
This commit fixes the problem by making these function return an Iterator rather
than a slice. The iterator will map the underlying array elements to actual
arch-specific types when iterated.
0 commit comments