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

Add support for FSBASE and GSBASE registers on x86_64 #230

Merged
merged 3 commits into from
Sep 15, 2021
Merged

Conversation

bboston7
Copy link
Contributor

This change adds support for the FSBASE and GSBASE registers on x86_64.
It also lays the groundwork for supporting additional special segment
registers on other architectures. It does this by adding a callback
LookupSegmentBasePointer that takes an ArchFn indicating which
segment register is being read, and returns a base pointer to that
memory segment.

This change adds support for the FSBASE and GSBASE registers on x86_64.
It also lays the groundwork for supporting additional special segment
registers on other architectures.  It does this by adding a callback
`LookupSegmentBasePointer` that takes an `ArchFn` indicating which
segment register is being read, and returns a base pointer to that
memory segment.
@bboston7 bboston7 requested a review from travitch September 10, 2021 22:48
Copy link
Contributor

@travitch travitch left a comment

Choose a reason for hiding this comment

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

Can we make this just an argument to x86_64MacawEvalFn? The second most common architecture that actually supports segmentation is the AS/400, so I'm inclined to keep details like that out of the core libraries.

That would also make it easier for us to provide a default implementation (i.e., specialized to x86_64).

This commit adds an optional argument to `genArchVals` that allows
client code to override the backend translation behavior of
`MacawArchStmtExtension`s on a statement-by-statement basis.
@bboston7 bboston7 requested a review from travitch September 14, 2021 21:28
Copy link
Contributor

@travitch travitch 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 it. Thanks. When you merge, can you squash and add a note in the commit message about how to update client code?

@bboston7 bboston7 merged commit a336895 into master Sep 15, 2021
@bboston7 bboston7 deleted the bb/fsgsbase branch September 15, 2021 01:24
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Oct 26, 2021
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Oct 27, 2021
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.

2 participants