Skip to content
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

implemented RReil grammar is cannot express sizes for comparisons #15

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

The current RReil grammar does not match the one published in the APLAS paper. 
We use a very unintuitive short-cut that avoids storing the size of a 
comparison in the ```sexpr```.

The statement

{{{
FLAGS :=1 x <=u8 y
}}}

that should assign the 1-bit result of the 8-bit unsigned comparison in FLAGS 
uses the size field of the assignment to store the size of the comparison (i.e. 
internally the assignment above is stored as

{{{
FLAGS :=8 x <=u y
}}}

and the comparison has no size field). This is not only counter-intuitive but 
it prevents us from writing

{{{
cbranch x <=u8 y ? tgt1 : tgt2
}}}

since ```cbranch``` does not have a size field where we could store 8. Thus, we 
should have a size field in the comparison rule of ```sexpr`` and use the 
intuitive semantics in that we store 1 for the size of the assignment for 
comparisons.

Original issue reported on code.google.com by [email protected] on 14 Nov 2014 at 6:53

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

No branches or pull requests

1 participant