You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[improve livetests] Truncate integral floats to integers
The WasmTruncate[f32 | f64]To[i32 | i64]Generator-s got Wasm floats as
inputs. Any non-integral float cannot be converted and the Wasm function
will trap.
After this change we generate integral floats to be truncated.
This was a reason for
LiveTests.testWasmCodeGenerationAndCompilationAndExecution failing in
~30% of the runs.
Change-Id: Ib543c4366b99109eade453b2d9a106387a51bf00
Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/7960389
Reviewed-by: Carl Smith <[email protected]>
Commit-Queue: Eva Herencsárová <[email protected]>
Copy file name to clipboardExpand all lines: Sources/Fuzzilli/CodeGen/WasmCodeGenerators.swift
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -373,25 +373,25 @@ public let WasmCodeGenerators: [CodeGenerator] = [
373
373
function.wrapi64Toi32(input)
374
374
},
375
375
376
-
CodeGenerator("WasmTruncatef32Toi32Generator", inContext:.wasmFunction, inputs:.required(.wasmf32)){ b, input in
377
-
// We are using a trick here and for all other unsigned truncations. If the input is a negative float, the operation will result in a runtime error, therefore we will always emit an f32UnOp Abs() operation to make sure that the operation wont throw.
378
-
// Minimization will then automatically remove the f32UnOp instruction if it is not necessary.
376
+
CodeGenerator("WasmTruncatef32Toi32Generator", inContext:.wasmFunction){ b in
0 commit comments