Blame SOURCES/tests-snans-be.patch
|
|
0b9940 |
Description: Fix sort_snans.js test on big endian
|
|
|
0b9940 |
Author: Adrian Bunk <bunk@debian.org>
|
|
|
0b9940 |
Bug-Debian: https://bugs.debian.org/878285
|
|
|
0b9940 |
|
|
|
0b9940 |
--- mozjs52-52.3.1.orig/js/src/tests/ecma_6/TypedArray/sort_snans.js
|
|
|
0b9940 |
+++ mozjs52-52.3.1/js/src/tests/ecma_6/TypedArray/sort_snans.js
|
|
|
0b9940 |
@@ -34,8 +34,20 @@ function testFloat32NaNRanges(start, end
|
|
|
0b9940 |
// and startHi, startLow and endHi, endLow should be 32-bit integers which,
|
|
|
0b9940 |
// when combined (Hi + Low), form Float64 NaNs.
|
|
|
0b9940 |
function testFloat64NaNRanges(startHi, startLow, endHi, endLow) {
|
|
|
0b9940 |
- let skipN = 10e6;
|
|
|
0b9940 |
|
|
|
0b9940 |
+ // Swap on big endian platforms
|
|
|
0b9940 |
+ if ((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x01020304) {
|
|
|
0b9940 |
+ let tmp = startHi;
|
|
|
0b9940 |
+ startHi = startLow;
|
|
|
0b9940 |
+ startLow = tmp;
|
|
|
0b9940 |
+
|
|
|
0b9940 |
+ tmp = endHi;
|
|
|
0b9940 |
+ endHi = endLow;
|
|
|
0b9940 |
+ endLow = tmp;
|
|
|
0b9940 |
+ }
|
|
|
0b9940 |
+
|
|
|
0b9940 |
+ let skipN = 10e6;
|
|
|
0b9940 |
+
|
|
|
0b9940 |
let sampleSizeHi = Math.floor((endHi - startHi)/skipN);
|
|
|
0b9940 |
let sampleSizeLow = Math.floor((endLow - startLow)/skipN);
|
|
|
0b9940 |
|
|
|
0b9940 |
|