Skip to content

Alternative macros to check privilege level in decodetree methods #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: ferst-tcg-base
Choose a base branch
from

Conversation

mferst
Copy link

@mferst mferst commented May 27, 2022

Alternative to #91 and the do_check_sv method of #66.

mferst added 2 commits May 27, 2022 14:40
GEN_PRIV and related CHK_* macros just assumed that variable named
"ctx" would be in scope when they are used, and that it would be a
pointer to DisasContext. Change these macros to receive the pointer
explicitly.
Equivalent to CHK_SV and CHK_HV, but can be used in decodetree methods.
Copy link

@vcoracolombo vcoracolombo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this one better than #91

Copy link

@luporl luporl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this one after #91. It seems better, it's similar to the other require macros and the user doesn't need to worry about what he should return.

@luporl luporl mentioned this pull request May 31, 2022
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.

3 participants