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 PowerPC support #38

Merged
merged 13 commits into from
Aug 1, 2024
Merged

Add PowerPC support #38

merged 13 commits into from
Aug 1, 2024

Conversation

RyanGlScott
Copy link
Collaborator

This PR contains a collection of commits that add support for simulating PowerPC code in stubs, thereby fixing #33.


This is marked as a draft because it depends on upstream macaw changes in GaloisInc/macaw#401, which have not landed yet.

…ignment

This `KnownNat` constraint isn't used and will complicate things in a follow-up
patch where we want to call `buildArgumentAssignment` from a place where a
`KnownNat` constraint isn't readily available. Let's just remove this
constraint.
Copy link
Collaborator

@langston-barrett langston-barrett left a comment

Choose a reason for hiding this comment

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

I'm not deeply familiar with everything surrounding this, but looks generally good to me!

stubs-common/src/Stubs/FunctionOverride/PPC/Linux.hs Outdated Show resolved Hide resolved
stubs-common/src/Stubs/Memory/PPC/Linux.hs Outdated Show resolved Hide resolved
stubs-common/src/Stubs/Syscall/PPC/Linux.hs Show resolved Hide resolved
stubs-common/src/Stubs/Syscall/PPC/Linux.hs Show resolved Hide resolved
stubs-translator/src/Stubs/Arch/PPC32.hs Outdated Show resolved Hide resolved
stubs-translator/src/Stubs/Arch/PPC32.hs Outdated Show resolved Hide resolved
stubs-translator/src/Stubs/Arch/PPC64.hs Outdated Show resolved Hide resolved
This bumps the `macaw` submodule to bring in the changes from
GaloisInc/macaw#401, which is a prerequisite to being able to support PowerPC
in `stubs`. This also requires bumping the `crucible`, `elf-edit`,
`llvm-pretty`, and `what4` submodules in order to construct a build plan that
is consistent with the latest `macaw` commit.

One step towards #33.
Doing so is actively harmful when adjusting the size of pointers, as
`projectLLVM_bv` will throw an assertion failure if this happens. We now adjust
pointer sizes in an alternative, non-assertion-failure–throwing fashion.

After doing this, some functions in `Stubs.Override` (e.g., `bvToPtr`) no
longer serve a useful purpose, so I went ahead and removed them.

Fixes #41.
@RyanGlScott RyanGlScott force-pushed the t33-powerpc-support branch from dbeb692 to 42289dd Compare August 1, 2024 14:46
@RyanGlScott RyanGlScott merged commit b78d842 into main Aug 1, 2024
4 checks passed
@RyanGlScott RyanGlScott deleted the t33-powerpc-support branch August 1, 2024 16:38
@RyanGlScott RyanGlScott mentioned this pull request Aug 1, 2024
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