mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 924538 - Float32 support for Uint8ClampedArray. r=luke
This commit is contained in:
parent
20bf92d55e
commit
6da5815a24
9
js/src/jit-test/tests/ion/bug924538.js
Normal file
9
js/src/jit-test/tests/ion/bug924538.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// Don't die a float32-related death.
|
||||||
|
function testFloat32SetElemIC(a) {
|
||||||
|
for (var i = 0; i < a.length; i++) {
|
||||||
|
var r = Math.fround(Math.random());
|
||||||
|
a[i] = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
testFloat32SetElemIC(new Array(2048));
|
||||||
|
testFloat32SetElemIC(new Uint8ClampedArray(2048));
|
@ -1854,6 +1854,11 @@ MacroAssembler::convertTypedOrValueToInt(TypedOrValueRegister src, FloatRegister
|
|||||||
case MIRType_Double:
|
case MIRType_Double:
|
||||||
convertDoubleToInt(src.typedReg().fpu(), output, temp, nullptr, fail, behavior);
|
convertDoubleToInt(src.typedReg().fpu(), output, temp, nullptr, fail, behavior);
|
||||||
break;
|
break;
|
||||||
|
case MIRType_Float32:
|
||||||
|
// Conversion to Double simplifies implementation at the expense of performance.
|
||||||
|
convertFloatToDouble(src.typedReg().fpu(), temp);
|
||||||
|
convertDoubleToInt(temp, output, temp, nullptr, fail, behavior);
|
||||||
|
break;
|
||||||
case MIRType_String:
|
case MIRType_String:
|
||||||
case MIRType_Object:
|
case MIRType_Object:
|
||||||
jump(fail);
|
jump(fail);
|
||||||
|
Loading…
Reference in New Issue
Block a user