From a7bef6bf8e98b56319bde2a05b816b9c3d4a1952 Mon Sep 17 00:00:00 2001 From: Alexa VanHattum Date: Tue, 18 Apr 2023 15:03:55 -0400 Subject: [PATCH 1/2] Update doc for which integer types are supported --- 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 08afb650c9e7..7f25de4b8b13 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/elliottt/wasmtime/blob/545749b279974e87bfceada10f5f301f4503e4ce/cranelift/fuzzgen/src/function_generator.rs#L310 ### Floating point types From 807be4f50c397a83867bf424448713f81af087c7 Mon Sep 17 00:00:00 2001 From: Alexa VanHattum Date: Tue, 18 Apr 2023 15:41:11 -0400 Subject: [PATCH 2/2] Update ir.md --- cranelift/docs/ir.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cranelift/docs/ir.md b/cranelift/docs/ir.md index 7f25de4b8b13..cd390760304f 100644 --- a/cranelift/docs/ir.md +++ b/cranelift/docs/ir.md @@ -157,7 +157,7 @@ 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/elliottt/wasmtime/blob/545749b279974e87bfceada10f5f301f4503e4ce/cranelift/fuzzgen/src/function_generator.rs#L310 +[fungen]: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/fuzzgen/src/function_generator.rs ### Floating point types