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

Update doc for which integer types are supported #6233

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions cranelift/docs/ir.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,22 @@ Integer values have a fixed size and can be interpreted as either signed or
unsigned. Some instructions will interpret an operand as a signed or unsigned
number, others don't care.

The support for i8 and i16 arithmetic is incomplete and use could lead to bugs.

- i8
- i16
- i32
- i64
- i128

Of these types, i32 and i64 are the most heavily-tested because of their use by
Wasmtime. There are no known bugs in i8, i16, and i128, but their use may not
be supported by all instructions in all backends (that is, they may cause
the compiler to crash during code generation with an error that an instruction
is unsupported).

The function `valid_for_target` within the [fuzzgen function generator][fungen]
contains information about which instructions support which types.

[fungen]: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/fuzzgen/src/function_generator.rs

### Floating point types

Expand Down