Skip to content

Commit

Permalink
crucible-wasm: Adapt to select having an optional value type
Browse files Browse the repository at this point in the history
This bumps the `haskell-wasm` commit to
SPY/haskell-wasm@c743e11
and does the minimum amount of work needed to make `crucible-wasm` continue to
compile after these changes. In particular, the `select` instruction now has an
optional value type indicating the type of its first and second operand, which
`crucible-wasm` ignores. This is OK for now, as `crucible-wasm`'s
implementation is currently simple enough where the types of all its stack
values can be inferred without any additional type information.
  • Loading branch information
RyanGlScott committed Aug 1, 2024
1 parent 375d1a3 commit f7c697e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion crucible-wasm/src/Lang/Crucible/Wasm/Translate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,12 @@ genInstruction genReturn im st ctrlStack instr =
Wasm.Drop ->
void $ popStack

Wasm.Select ->
-- The `select` instruction includes an optional value type, which indicates
-- the type of its first and second operands. We do not currently make use
-- of this type, however, as crucible-wasm's implementation is simple enough
-- where the types of all possible stack values can be inferred without any
-- additional type information.
Wasm.Select _mbValTypes ->
do c <- popTest
y <- popStack
x <- popStack
Expand Down

0 comments on commit f7c697e

Please sign in to comment.