From a486aa37ad187e4b5c5d34da303a39fa5cdd2745 Mon Sep 17 00:00:00 2001 From: Alexa VanHattum Date: Tue, 18 Apr 2023 16:02:31 -0400 Subject: [PATCH] Update doc for which integer types are supported (#6233) * Update doc for which integer types are supported * Update ir.md --- cranelift/docs/ir.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cranelift/docs/ir.md b/cranelift/docs/ir.md index 08afb650c9..cd39076030 100644 --- a/cranelift/docs/ir.md +++ b/cranelift/docs/ir.md @@ -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