Skip to content

Split functions between architectures, make register access type-safe - #9

Open
funsafemath wants to merge 11 commits into
unicorn-engine:mainfrom
funsafemath:main
Open

Split functions between architectures, make register access type-safe#9
funsafemath wants to merge 11 commits into
unicorn-engine:mainfrom
funsafemath:main

Conversation

@funsafemath

Copy link
Copy Markdown

Registers are now correct by construction, so reads/writes now return T instead of Result<T, E> (hopefully unicorn never returns an error for a valid register), also CPU-specific associated functions like reg_write_arm_coproc are now implemented parametrized types like Unicorn<D, Arm>

The arch parameter should probably be the first one, as the data parameter is usually inferred or is equal to the unit type, and it may be a good idea to set a default value for it (unit type), which is possible only if it's the trailing generic parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant