Skip to content

Commit

Permalink
mark signed load instruction as preserving (#654)
Browse files Browse the repository at this point in the history
* mark signed load instruction as preserving

* Set Version: 0.1.66

* Substitute variable in comment

Co-authored-by: Burak Bilge Yalçınkaya <[email protected]>

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Burak Bilge Yalçınkaya <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2024
1 parent e563935 commit b560628
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.65
0.1.66
2 changes: 1 addition & 1 deletion pykwasm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pykwasm"
version = "0.1.65"
version = "0.1.66"
description = ""
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
5 changes: 5 additions & 0 deletions pykwasm/src/pykwasm/kdist/wasm-semantics/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,11 @@ Sort `Signedness` is defined in module `BYTES`.
requires (EA +Int #numBytes(WIDTH)) >Int (SIZE *Int #pageSize())
rule <instrs> load { ITYPE WIDTH EA Signed DATA:SparseBytes } => #chop(< ITYPE > #signed(WIDTH, #getRange(DATA, EA, #numBytes(WIDTH)))) ... </instrs>
[preserves-definedness]
// #signed(WIDTH, N) is defined for 0 <= N <= #pow(WIDTH)
// #pow(WIDTH) == 2 ^ #width(WIDTH) == 2 ^ (#numBytes(WIDTH) * 8)
// and #getRange(_, _, SIZE) < 2 ^ (SIZE * 8)
rule <instrs> load { ITYPE WIDTH EA Unsigned DATA:SparseBytes } => < ITYPE > #getRange(DATA, EA, #numBytes(WIDTH)) ... </instrs>
```

Expand Down

0 comments on commit b560628

Please sign in to comment.