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

crucible-wasm: Build and test with the latest haskell-wasm commit #1232

Merged
merged 11 commits into from
Aug 1, 2024
Merged
9 changes: 7 additions & 2 deletions crucible-wasm/src/Lang/Crucible/Wasm/Translate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,11 @@ genInstruction genReturn im st ctrlStack instr =
Just (ConstantGlobal _) -> panic "genInstruction: SetGlobal" ["setGlobal of constant global"]
Just (MutableGlobal gv) -> writeGlobal gv =<< checkStackVal (globalType gv) =<< popStack

Wasm.CurrentMemory ->
Wasm.MemorySize ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add the following to a ticket as well so it doesn't get lost?

I have not added support for the memory.fill, memory.copy,
memory.init, or data.drop instructions, all of which are new in Wasm 2.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've opened #1233 for this.

do gv <- getMemVar im st
pushStack =<< extensionStmt (Wasm_MemSize gv)

Wasm.GrowMemory ->
Wasm.MemoryGrow ->
do gv <- getMemVar im st
n <- popInteger32
void $ extensionStmt (Wasm_MemGrow gv n)
Expand Down Expand Up @@ -822,7 +822,12 @@ genInstruction genReturn im st ctrlStack instr =
-- TableSet TableIndex
-- TableCopy TableIndex TableIndex

-- MemoryFill
-- MemoryCopy
-- MemoryInit DataIndex

-- ElemDrop ElemIndex
-- DataDrop DataIndex

_ -> unimplemented $ unwords ["Instruction not implemented", show instr]

Expand Down