mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1150836 - SIMD (interpreter): change order of operations of ReciprocalSqrtApproximation. r=bbouvier
This commit is contained in:
parent
d7edd2b33d
commit
574d13da7d
@ -508,7 +508,7 @@ struct RecApprox {
|
||||
};
|
||||
template<typename T>
|
||||
struct RecSqrtApprox {
|
||||
static inline T apply(T x) { return sqrt(1 / x); }
|
||||
static inline T apply(T x) { return 1 / sqrt(x); }
|
||||
};
|
||||
template<typename T>
|
||||
struct Sqrt {
|
||||
|
@ -6,7 +6,7 @@ var int32x4 = SIMD.int32x4;
|
||||
var summary = 'float32x4 reciprocalSqrt';
|
||||
|
||||
function reciprocalsqrtf(a) {
|
||||
return Math.fround(Math.sqrt(1 / Math.fround(a)));
|
||||
return Math.fround(1 / Math.sqrt(a));
|
||||
}
|
||||
|
||||
function test() {
|
||||
|
@ -15,7 +15,7 @@ function mul(a, b) { return a * b; }
|
||||
function div(a, b) { return a / b; }
|
||||
function neg(a) { return -a; }
|
||||
function reciprocalApproximation(a) { return 1 / a; }
|
||||
function reciprocalSqrtApproximation(a) { return Math.sqrt(1 / a); }
|
||||
function reciprocalSqrtApproximation(a) { return 1 / Math.sqrt(a); }
|
||||
|
||||
function testAdd(v, w) {
|
||||
return testBinaryFunc(v, w, float64x2.add, add);
|
||||
|
Loading…
Reference in New Issue
Block a user