# wasm: Store signed ints as two's complement · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4df65fc26485fe32976561990393a35eb52ddfc6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4df65fc26485fe32976561990393a35eb52ddfc6

Requested commit: 4df65fc26485fe32976561990393a35eb52ddfc6

Commit: 4df65fc26485fe32976561990393a35eb52ddfc6

Tree: 79e7c740f8957cd9a2cfac410de0e51fa6d29c89

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Store signed ints as two's complement

When a signed integer is negative, the integer will be stored as a two's complement,
rather than its signed value. Instead, we verify the signed bits during arithmetic operations.
This fixes signed cases of `@mulWithOverflow`.

```

## Parents

- [ac1aaec9c38eb44b93099ff18579a9401f107100](https://git.cafe/gitcafe/zig/commit/ac1aaec9c38eb44b93099ff18579a9401f107100?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4df65fc26485fe32976561990393a35eb52ddfc6?format=markdown)
