|
1 https://bugzilla.mozilla.org/show_bug.cgi?id=1308455 |
|
2 https://bugzilla.mozilla.org/show_bug.cgi?id=1308897 |
|
3 https://bugzilla.mozilla.org/show_bug.cgi?id=1309157 |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1309246 |
|
5 https://bugzilla.mozilla.org/show_bug.cgi?id=1233863 |
|
6 |
|
7 --- a/js/src/jit-test/tests/asm.js/testHeapAccess.js |
|
8 +++ b/js/src/jit-test/tests/asm.js/testHeapAccess.js |
|
9 @@ -18,8 +18,20 @@ |
|
10 |
|
11 setCachingEnabled(true); |
|
12 |
|
13 +// In order to allow following tests work on both big-endian and little- |
|
14 +// endian architectures we need to define least significant byte (lsb) and |
|
15 +// least significant word (lsw). |
|
16 var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f'); |
|
17 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
18 +var lsb=0; |
|
19 +var lsw=0 |
|
20 +if (f(0x12345678) == 0x12) { |
|
21 + lsb=3; |
|
22 + lsw=1; |
|
23 +} |
|
24 + |
|
25 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); |
|
26 +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
27 assertEq(f(0),0); |
|
28 assertEq(f(0x7f),0x7f); |
|
29 assertEq(f(0xff),-1); |
|
30 @@ -33,7 +45,7 @@ |
|
31 setJitCompilerOption("signals.enable", 0); |
|
32 |
|
33 var buf = new ArrayBuffer(BUF_MIN); |
|
34 - var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + '/* not a clone */ function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f'); |
|
35 + var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + '/* not a clone */ function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); |
|
36 var f = asmLink(code, this, null, buf); |
|
37 assertEq(f(0),0); |
|
38 assertEq(f(0x7f),0x7f); |
|
39 @@ -52,21 +64,21 @@ |
|
40 |
|
41 setCachingEnabled(false); |
|
42 |
|
43 -var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[0]|0}; return f'); |
|
44 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f'); |
|
45 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
46 assertEq(f(0),0); |
|
47 assertEq(f(0x7f),0x7f); |
|
48 assertEq(f(0xff),0xff); |
|
49 assertEq(f(0x100),0); |
|
50 |
|
51 -var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i16[0]|0}; return f'); |
|
52 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i16[' + lsw + ']|0}; return f'); |
|
53 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
54 assertEq(f(0),0); |
|
55 assertEq(f(0x7fff),0x7fff); |
|
56 assertEq(f(0xffff),-1); |
|
57 assertEq(f(0x10000),0); |
|
58 |
|
59 -var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u16[0]|0}; return f'); |
|
60 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u16[' + lsw + ']|0}; return f'); |
|
61 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
62 assertEq(f(0),0); |
|
63 assertEq(f(0x7fff),0x7fff); |
|
64 @@ -87,14 +99,14 @@ |
|
65 assertEq(f(0xffffffff),-1); |
|
66 assertEq(f(0x100000000),0); |
|
67 |
|
68 -var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f'); |
|
69 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); |
|
70 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
71 assertEq(f(0),0); |
|
72 assertEq(f(0x7f),0x7f); |
|
73 assertEq(f(0xff),-1); |
|
74 assertEq(f(0x100),0); |
|
75 |
|
76 -var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[0]|0}; return f'); |
|
77 +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f'); |
|
78 var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); |
|
79 assertEq(f(0),0); |
|
80 assertEq(f(0x7f),0x7f); |
|
81 --- a/js/src/vm/CodeCoverage.cpp |
|
82 +++ b/js/src/vm/CodeCoverage.cpp |
|
83 @@ -222,13 +222,13 @@ |
|
84 uint64_t taken = hits - fallthroughHits; |
|
85 outBRDA_.printf("BRDA:%d,%d,0,", lineno, branchId); |
|
86 if (taken) |
|
87 - outBRDA_.printf("%d\n", taken); |
|
88 + outBRDA_.printf("%" PRIu64 "\n", taken); |
|
89 else |
|
90 outBRDA_.put("-\n", 2); |
|
91 |
|
92 outBRDA_.printf("BRDA:%d,%d,1,", lineno, branchId); |
|
93 if (fallthroughHits) |
|
94 - outBRDA_.printf("%d\n", fallthroughHits); |
|
95 + outBRDA_.printf("%" PRIu64 "\n", fallthroughHits); |
|
96 else |
|
97 outBRDA_.put("-\n", 2); |
|
98 |
|
99 @@ -301,7 +301,7 @@ |
|
100 |
|
101 outBRDA_.printf("BRDA:%d,%d,%d,", lineno, branchId, i); |
|
102 if (caseHits) |
|
103 - outBRDA_.printf("%d\n", caseHits); |
|
104 + outBRDA_.printf("%" PRIu64 "\n", caseHits); |
|
105 else |
|
106 outBRDA_.put("-\n", 2); |
|
107 |
|
108 @@ -327,7 +327,7 @@ |
|
109 |
|
110 outBRDA_.printf("BRDA:%d,%d,%d,", lineno, branchId, numCases); |
|
111 if (defaultHits) |
|
112 - outBRDA_.printf("%d\n", defaultHits); |
|
113 + outBRDA_.printf("%" PRIu64 "\n", defaultHits); |
|
114 else |
|
115 outBRDA_.put("-\n", 2); |
|
116 numBranchesFound_++; |
|
117 --- a/js/src/jit-test/tests/ctypes/conversion-native-function.js |
|
118 +++ b/js/src/jit-test/tests/ctypes/conversion-native-function.js |
|
119 @@ -6,7 +6,7 @@ |
|
120 function test() { |
|
121 let lib; |
|
122 try { |
|
123 - lib = ctypes.open(ctypes.libraryName("c")); |
|
124 + lib = ctypes.open(ctypes.libraryName("m")); |
|
125 } catch (e) { |
|
126 } |
|
127 if (!lib) |
|
128 --- a/js/src/jit-test/tests/ion/bug909997.js |
|
129 +++ b/js/src/jit-test/tests/ion/bug909997.js |
|
130 @@ -1,3 +1,10 @@ |
|
131 +// getJitCompilerOptions will always return array with zeros when JIT is |
|
132 +// disabled. Therefore we quit now. |
|
133 +if (inJit() == 'Baseline is disabled.') { |
|
134 + print("JIT is disabled."); |
|
135 + quit(); |
|
136 +} |
|
137 + |
|
138 var wait = 100; |
|
139 |
|
140 var method_A = function() { |
|
141 --- a/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js |
|
142 +++ b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js |
|
143 @@ -19,5 +19,7 @@ |
|
144 |
|
145 var msg = getLastWarning().message; |
|
146 assertEq(msg === "asm.js type error: Disabled by debugger" || |
|
147 + msg === "asm.js type error: Disabled by lack of a JIT compiler" || |
|
148 + msg === "asm.js type error: Disabled by javascript.options.asmjs in about:config" || |
|
149 msg === "asm.js type error: Disabled by lack of floating point support", |
|
150 true); |