OpenCoverage

MacroAssemblerX86_64.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/assembler/MacroAssemblerX86_64.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.-
3 *-
4 * Redistribution and use in source and binary forms, with or without-
5 * modification, are permitted provided that the following conditions-
6 * are met:-
7 * 1. Redistributions of source code must retain the above copyright-
8 * notice, this list of conditions and the following disclaimer.-
9 * 2. Redistributions in binary form must reproduce the above copyright-
10 * notice, this list of conditions and the following disclaimer in the-
11 * documentation and/or other materials provided with the distribution.-
12 *-
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY-
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE-
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR-
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR-
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,-
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,-
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR-
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY-
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -
24 */-
25-
26#ifndef MacroAssemblerX86_64_h-
27#define MacroAssemblerX86_64_h-
28-
29#if ENABLE(ASSEMBLER) && CPU(X86_64)-
30-
31#include "MacroAssemblerX86Common.h"-
32-
33#define REPTACH_OFFSET_CALL_R11 3-
34-
35namespace JSC {-
36-
37class MacroAssemblerX86_64 : public MacroAssemblerX86Common {-
38public:-
39 static const Scale ScalePtr = TimesEight;-
40 static const int PointerSize = 8;-
41-
42 using MacroAssemblerX86Common::add32;-
43 using MacroAssemblerX86Common::and32;-
44 using MacroAssemblerX86Common::branchAdd32;-
45 using MacroAssemblerX86Common::or32;-
46 using MacroAssemblerX86Common::sub32;-
47 using MacroAssemblerX86Common::load32;-
48 using MacroAssemblerX86Common::store32;-
49 using MacroAssemblerX86Common::store8;-
50 using MacroAssemblerX86Common::call;-
51 using MacroAssemblerX86Common::jump;-
52 using MacroAssemblerX86Common::addDouble;-
53 using MacroAssemblerX86Common::loadDouble;-
54 using MacroAssemblerX86Common::convertInt32ToDouble;-
55-
56#if defined(V4_BOOTSTRAP)-
57 void loadPtr(ImplicitAddress address, RegisterID dest)-
58 {-
59 load64(address, dest);-
60 }-
61-
62 void subPtr(TrustedImm32 imm, RegisterID dest)-
63 {-
64 sub64(imm, dest);-
65 }-
66-
67 void addPtr(TrustedImm32 imm, RegisterID dest)-
68 {-
69 add64(imm, dest);-
70 }-
71-
72 void addPtr(TrustedImm32 imm, RegisterID src, RegisterID dest)-
73 {-
74 add64(imm, src, dest);-
75 }-
76-
77 void storePtr(RegisterID src, ImplicitAddress address)-
78 {-
79 store64(src, address);-
80 }-
81#endif-
82-
83 void add32(TrustedImm32 imm, AbsoluteAddress address)-
84 {-
85 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
86 add32(imm, Address(scratchRegister));-
87 }
never executed: end of block
0
88 -
89 void and32(TrustedImm32 imm, AbsoluteAddress address)-
90 {-
91 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
92 and32(imm, Address(scratchRegister));-
93 }
never executed: end of block
0
94 -
95 void add32(AbsoluteAddress address, RegisterID dest)-
96 {-
97 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
98 add32(Address(scratchRegister), dest);-
99 }
never executed: end of block
0
100 -
101 void or32(TrustedImm32 imm, AbsoluteAddress address)-
102 {-
103 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
104 or32(imm, Address(scratchRegister));-
105 }
never executed: end of block
0
106-
107 void or32(RegisterID reg, AbsoluteAddress address)-
108 {-
109 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
110 or32(reg, Address(scratchRegister));-
111 }
never executed: end of block
0
112-
113 void sub32(TrustedImm32 imm, AbsoluteAddress address)-
114 {-
115 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
116 sub32(imm, Address(scratchRegister));-
117 }
never executed: end of block
0
118-
119 void load32(const void* address, RegisterID dest)-
120 {-
121 if (dest == X86Registers::eax)
dest == X86Registers::eaxDescription
TRUEnever evaluated
FALSEnever evaluated
0
122 m_assembler.movl_mEAX(address);
never executed: m_assembler.movl_mEAX(address);
0
123 else {-
124 move(TrustedImmPtr(address), dest);-
125 load32(dest, dest);-
126 }
never executed: end of block
0
127 }-
128-
129 void addDouble(AbsoluteAddress address, FPRegisterID dest)-
130 {-
131 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
132 m_assembler.addsd_mr(0, scratchRegister, dest);-
133 }
never executed: end of block
0
134-
135 void convertInt32ToDouble(TrustedImm32 imm, FPRegisterID dest)-
136 {-
137 move(imm, scratchRegister);-
138 m_assembler.cvtsi2sd_rr(scratchRegister, dest);-
139 }
never executed: end of block
0
140-
141 void convertUInt32ToDouble(RegisterID src, FPRegisterID dest, RegisterID /*scratch*/)-
142 {-
143 zeroExtend32ToPtr(src, src);-
144 m_assembler.cvtsiq2sd_rr(src, dest);-
145 }
never executed: end of block
0
146-
147 void store32(TrustedImm32 imm, void* address)-
148 {-
149 move(TrustedImmPtr(address), scratchRegister);-
150 store32(imm, scratchRegister);-
151 }
never executed: end of block
0
152 -
153 void store8(TrustedImm32 imm, void* address)-
154 {-
155 move(TrustedImmPtr(address), scratchRegister);-
156 store8(imm, Address(scratchRegister));-
157 }
never executed: end of block
0
158-
159 Call call()-
160 {-
161 DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);-
162 Call result = Call(m_assembler.call(scratchRegister), Call::Linkable);-
163 ASSERT_UNUSED(label, differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11);-
164 return result;
never executed: return result;
0
165 }-
166-
167 void callToRetrieveIP()-
168 {-
169 m_assembler.call();-
170 }
never executed: end of block
0
171-
172 // Address is a memory location containing the address to jump to-
173 void jump(AbsoluteAddress address)-
174 {-
175 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
176 jump(Address(scratchRegister));-
177 }
never executed: end of block
0
178-
179 Call tailRecursiveCall()-
180 {-
181 DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);-
182 Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));-
183 ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);-
184 return Call::fromTailJump(newJump);
never executed: return Call::fromTailJump(newJump);
0
185 }-
186-
187 Call makeTailRecursiveCall(Jump oldJump)-
188 {-
189 oldJump.link(this);-
190 DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);-
191 Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));-
192 ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);-
193 return Call::fromTailJump(newJump);
never executed: return Call::fromTailJump(newJump);
0
194 }-
195-
196 Jump branchAdd32(ResultCondition cond, TrustedImm32 src, AbsoluteAddress dest)-
197 {-
198 move(TrustedImmPtr(dest.m_ptr), scratchRegister);-
199 add32(src, Address(scratchRegister));-
200 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
201 }-
202-
203 void add64(RegisterID src, RegisterID dest)-
204 {-
205 m_assembler.addq_rr(src, dest);-
206 }
never executed: end of block
0
207 -
208 void add64(Address src, RegisterID dest)-
209 {-
210 m_assembler.addq_mr(src.offset, src.base, dest);-
211 }
never executed: end of block
0
212-
213 void add64(AbsoluteAddress src, RegisterID dest)-
214 {-
215 move(TrustedImmPtr(src.m_ptr), scratchRegister);-
216 add64(Address(scratchRegister), dest);-
217 }
never executed: end of block
0
218-
219 void add64(TrustedImm32 imm, RegisterID srcDest)-
220 {-
221 m_assembler.addq_ir(imm.m_value, srcDest);-
222 }
executed 15352 times by 65 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • ...
15352
223-
224 void add64(TrustedImm64 imm, RegisterID dest)-
225 {-
226 move(imm, scratchRegister);-
227 add64(scratchRegister, dest);-
228 }
never executed: end of block
0
229-
230 void add64(TrustedImm32 imm, RegisterID src, RegisterID dest)-
231 {-
232 m_assembler.leaq_mr(imm.m_value, src, dest);-
233 }
executed 51526 times by 62 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • ...
51526
234-
235 void add64(TrustedImm32 imm, Address address)-
236 {-
237 m_assembler.addq_im(imm.m_value, address.offset, address.base);-
238 }
never executed: end of block
0
239-
240 void add64(TrustedImm32 imm, AbsoluteAddress address)-
241 {-
242 move(TrustedImmPtr(address.m_ptr), scratchRegister);-
243 add64(imm, Address(scratchRegister));-
244 }
never executed: end of block
0
245-
246 void and64(RegisterID src, RegisterID dest)-
247 {-
248 m_assembler.andq_rr(src, dest);-
249 }
never executed: end of block
0
250-
251 void and64(TrustedImm32 imm, RegisterID srcDest)-
252 {-
253 m_assembler.andq_ir(imm.m_value, srcDest);-
254 }
never executed: end of block
0
255 -
256 void neg64(RegisterID dest)-
257 {-
258 m_assembler.negq_r(dest);-
259 }
never executed: end of block
0
260-
261 void or64(RegisterID src, RegisterID dest)-
262 {-
263 m_assembler.orq_rr(src, dest);-
264 }
executed 9250 times by 48 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
9250
265-
266 void or64(TrustedImm64 imm, RegisterID dest)-
267 {-
268 move(imm, scratchRegister);-
269 or64(scratchRegister, dest);-
270 }
executed 9250 times by 48 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
9250
271-
272 void or64(TrustedImm32 imm, RegisterID dest)-
273 {-
274 m_assembler.orq_ir(imm.m_value, dest);-
275 }
never executed: end of block
0
276-
277 void or64(RegisterID op1, RegisterID op2, RegisterID dest)-
278 {-
279 if (op1 == op2)
op1 == op2Description
TRUEnever evaluated
FALSEnever evaluated
0
280 move(op1, dest);
never executed: move(op1, dest);
0
281 else if (op1 == dest)
op1 == destDescription
TRUEnever evaluated
FALSEnever evaluated
0
282 or64(op2, dest);
never executed: or64(op2, dest);
0
283 else {-
284 move(op2, dest);-
285 or64(op1, dest);-
286 }
never executed: end of block
0
287 }-
288-
289 void or64(TrustedImm32 imm, RegisterID src, RegisterID dest)-
290 {-
291 move(src, dest);-
292 or64(imm, dest);-
293 }
never executed: end of block
0
294 -
295 void or64(TrustedImm64 imm, RegisterID src, RegisterID dest)-
296 {-
297 move(src, dest);-
298 or64(imm, dest);-
299 }
executed 4326 times by 39 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
4326
300-
301 void rotateRight64(TrustedImm32 imm, RegisterID srcDst)-
302 {-
303 m_assembler.rorq_i8r(imm.m_value, srcDst);-
304 }
never executed: end of block
0
305-
306 void sub64(RegisterID src, RegisterID dest)-
307 {-
308 m_assembler.subq_rr(src, dest);-
309 }
never executed: end of block
0
310 -
311 void sub64(TrustedImm32 imm, RegisterID dest)-
312 {-
313 m_assembler.subq_ir(imm.m_value, dest);-
314 }
executed 1229 times by 16 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicktextinput
  • tst_qquickworkerscript
  • tst_testfiltering
1229
315 -
316 void sub64(TrustedImm64 imm, RegisterID dest)-
317 {-
318 move(imm, scratchRegister);-
319 sub64(scratchRegister, dest);-
320 }
never executed: end of block
0
321-
322 void xor64(RegisterID src, RegisterID dest)-
323 {-
324 m_assembler.xorq_rr(src, dest);-
325 }
never executed: end of block
0
326 -
327 void xor64(RegisterID src, Address dest)-
328 {-
329 m_assembler.xorq_rm(src, dest.offset, dest.base);-
330 }
never executed: end of block
0
331-
332 void xor64(TrustedImm32 imm, RegisterID srcDest)-
333 {-
334 m_assembler.xorq_ir(imm.m_value, srcDest);-
335 }
never executed: end of block
0
336-
337 void lshift64(TrustedImm32 imm, RegisterID dest)-
338 {-
339 m_assembler.shlq_i8r(imm.m_value, dest);-
340 }
never executed: end of block
0
341-
342 void lshift64(RegisterID src, RegisterID dest)-
343 {-
344 if (src == X86Registers::ecx)
src == X86Registers::ecxDescription
TRUEnever evaluated
FALSEnever evaluated
0
345 m_assembler.shlq_CLr(dest);
never executed: m_assembler.shlq_CLr(dest);
0
346 else {-
347 ASSERT(src != dest);-
348-
349 // Can only shift by ecx, so we do some swapping if we see anything else.-
350 swap(src, X86Registers::ecx);-
351 m_assembler.shlq_CLr(dest == X86Registers::ecx ? src : dest);-
352 swap(src, X86Registers::ecx);-
353 }
never executed: end of block
0
354 }-
355-
356 void rshift64(TrustedImm32 imm, RegisterID dest)-
357 {-
358 m_assembler.sarq_i8r(imm.m_value, dest);-
359 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_signalspy
8
360-
361 void rshift64(RegisterID src, RegisterID dest)-
362 {-
363 if (src == X86Registers::ecx)
src == X86Registers::ecxDescription
TRUEnever evaluated
FALSEnever evaluated
0
364 m_assembler.sarq_CLr(dest);
never executed: m_assembler.sarq_CLr(dest);
0
365 else {-
366 ASSERT(src != dest);-
367-
368 // Can only shift by ecx, so we do some swapping if we see anything else.-
369 swap(src, X86Registers::ecx);-
370 m_assembler.sarq_CLr(dest == X86Registers::ecx ? src : dest);-
371 swap(src, X86Registers::ecx);-
372 }
never executed: end of block
0
373 }-
374-
375 void urshift64(RegisterID src, TrustedImm32 imm, RegisterID dest)-
376 {-
377 if (src != dest)
src != destDescription
TRUEevaluated 16462 times by 50 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • ...
FALSEnever evaluated
0-16462
378 move(src, dest);
executed 16462 times by 50 tests: move(src, dest);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • ...
16462
379 urshift64(imm, dest);-
380 }
executed 16462 times by 50 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • ...
16462
381-
382 void urshift64(TrustedImm32 imm, RegisterID dest)-
383 {-
384 m_assembler.shrq_i8r(imm.m_value, dest);-
385 }
executed 16462 times by 50 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickcustomaffector
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • ...
16462
386-
387 void urshift64(RegisterID src, RegisterID dest)-
388 {-
389 if (src == X86Registers::ecx)
src == X86Registers::ecxDescription
TRUEnever evaluated
FALSEnever evaluated
0
390 m_assembler.shrq_CLr(dest);
never executed: m_assembler.shrq_CLr(dest);
0
391 else {-
392 ASSERT(src != dest);-
393-
394 // Can only shift by ecx, so we do some swapping if we see anything else.-
395 swap(src, X86Registers::ecx);-
396 m_assembler.shrq_CLr(dest == X86Registers::ecx ? src : dest);-
397 swap(src, X86Registers::ecx);-
398 }
never executed: end of block
0
399 }-
400-
401 void load64(ImplicitAddress address, RegisterID dest)-
402 {-
403 m_assembler.movq_mr(address.offset, address.base, dest);-
404 }
executed 59260 times by 65 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • ...
59260
405-
406 void load64(BaseIndex address, RegisterID dest)-
407 {-
408 m_assembler.movq_mr(address.offset, address.base, address.index, address.scale, dest);-
409 }
never executed: end of block
0
410-
411 void load64(const void* address, RegisterID dest)-
412 {-
413 if (dest == X86Registers::eax)
dest == X86Registers::eaxDescription
TRUEnever evaluated
FALSEnever evaluated
0
414 m_assembler.movq_mEAX(address);
never executed: m_assembler.movq_mEAX(address);
0
415 else {-
416 move(TrustedImmPtr(address), dest);-
417 load64(dest, dest);-
418 }
never executed: end of block
0
419 }-
420-
421 DataLabel32 load64WithAddressOffsetPatch(Address address, RegisterID dest)-
422 {-
423 padBeforePatch();-
424 m_assembler.movq_mr_disp32(address.offset, address.base, dest);-
425 return DataLabel32(this);
never executed: return DataLabel32(this);
0
426 }-
427 -
428 DataLabelCompact load64WithCompactAddressOffsetPatch(Address address, RegisterID dest)-
429 {-
430 padBeforePatch();-
431 m_assembler.movq_mr_disp8(address.offset, address.base, dest);-
432 return DataLabelCompact(this);
never executed: return DataLabelCompact(this);
0
433 }-
434-
435 void store64(RegisterID src, ImplicitAddress address)-
436 {-
437 m_assembler.movq_rm(src, address.offset, address.base);-
438 }
executed 86957 times by 65 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • ...
86957
439-
440 void store64(RegisterID src, BaseIndex address)-
441 {-
442 m_assembler.movq_rm(src, address.offset, address.base, address.index, address.scale);-
443 }
never executed: end of block
0
444 -
445 void store64(RegisterID src, void* address)-
446 {-
447 if (src == X86Registers::eax)
src == X86Registers::eaxDescription
TRUEnever evaluated
FALSEnever evaluated
0
448 m_assembler.movq_EAXm(address);
never executed: m_assembler.movq_EAXm(address);
0
449 else {-
450 move(TrustedImmPtr(address), scratchRegister);-
451 store64(src, scratchRegister);-
452 }
never executed: end of block
0
453 }-
454-
455 void store64(TrustedImm64 imm, ImplicitAddress address)-
456 {-
457 move(imm, scratchRegister);-
458 store64(scratchRegister, address);-
459 }
executed 58 times by 7 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_testfiltering
58
460-
461 void store64(TrustedImm64 imm, BaseIndex address)-
462 {-
463 move(imm, scratchRegister);-
464 m_assembler.movq_rm(scratchRegister, address.offset, address.base, address.index, address.scale);-
465 }
never executed: end of block
0
466 -
467 DataLabel32 store64WithAddressOffsetPatch(RegisterID src, Address address)-
468 {-
469 padBeforePatch();-
470 m_assembler.movq_rm_disp32(src, address.offset, address.base);-
471 return DataLabel32(this);
never executed: return DataLabel32(this);
0
472 }-
473-
474 void move64ToDouble(RegisterID src, FPRegisterID dest)-
475 {-
476 m_assembler.movq_rr(src, dest);-
477 }
never executed: end of block
0
478-
479 void moveDoubleTo64(FPRegisterID src, RegisterID dest)-
480 {-
481 m_assembler.movq_rr(src, dest);-
482 }
never executed: end of block
0
483-
484 void compare64(RelationalCondition cond, RegisterID left, TrustedImm32 right, RegisterID dest)-
485 {-
486 if (((cond == Equal) || (cond == NotEqual)) && !right.m_value)
(cond == Equal)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_signalspy
FALSEnever evaluated
(cond == NotEqual)Description
TRUEnever evaluated
FALSEnever evaluated
!right.m_valueDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_signalspy
FALSEnever evaluated
0-8
487 m_assembler.testq_rr(left, left);
executed 8 times by 1 test: m_assembler.testq_rr(left, left);
Executed by:
  • tst_signalspy
8
488 else-
489 m_assembler.cmpq_ir(right.m_value, left);
never executed: m_assembler.cmpq_ir(right.m_value, left);
0
490 m_assembler.setCC_r(x86Condition(cond), dest);-
491 m_assembler.movzbl_rr(dest, dest);-
492 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_signalspy
8
493 -
494 void compare64(RelationalCondition cond, RegisterID left, RegisterID right, RegisterID dest)-
495 {-
496 m_assembler.cmpq_rr(right, left);-
497 m_assembler.setCC_r(x86Condition(cond), dest);-
498 m_assembler.movzbl_rr(dest, dest);-
499 }
never executed: end of block
0
500 -
501 Jump branch64(RelationalCondition cond, RegisterID left, RegisterID right)-
502 {-
503 m_assembler.cmpq_rr(right, left);-
504 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
505 }-
506-
507 Jump branch64(RelationalCondition cond, RegisterID left, TrustedImm64 right)-
508 {-
509 if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) {
(cond == Equal)Description
TRUEevaluated 13188 times by 64 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • ...
FALSEnever evaluated
(cond == NotEqual)Description
TRUEnever evaluated
FALSEnever evaluated
!right.m_valueDescription
TRUEevaluated 13188 times by 64 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • ...
FALSEnever evaluated
0-13188
510 m_assembler.testq_rr(left, left);-
511 return Jump(m_assembler.jCC(x86Condition(cond)));
executed 13188 times by 64 tests: return Jump(m_assembler.jCC(x86Condition(cond)));
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • ...
13188
512 }-
513 move(right, scratchRegister);-
514 return branch64(cond, left, scratchRegister);
never executed: return branch64(cond, left, scratchRegister);
0
515 }-
516-
517 Jump branch64(RelationalCondition cond, RegisterID left, Address right)-
518 {-
519 m_assembler.cmpq_mr(right.offset, right.base, left);-
520 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
521 }-
522-
523 Jump branch64(RelationalCondition cond, AbsoluteAddress left, RegisterID right)-
524 {-
525 move(TrustedImmPtr(left.m_ptr), scratchRegister);-
526 return branch64(cond, Address(scratchRegister), right);
never executed: return branch64(cond, Address(scratchRegister), right);
0
527 }-
528-
529 Jump branch64(RelationalCondition cond, Address left, RegisterID right)-
530 {-
531 m_assembler.cmpq_rm(right, left.offset, left.base);-
532 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
533 }-
534-
535 Jump branch64(RelationalCondition cond, Address left, TrustedImm64 right)-
536 {-
537 move(right, scratchRegister);-
538 return branch64(cond, left, scratchRegister);
never executed: return branch64(cond, left, scratchRegister);
0
539 }-
540-
541 Jump branchTest64(ResultCondition cond, RegisterID reg, RegisterID mask)-
542 {-
543 m_assembler.testq_rr(reg, mask);-
544 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
545 }-
546 -
547 Jump branchTest64(ResultCondition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1))-
548 {-
549 // if we are only interested in the low seven bits, this can be tested with a testb-
550 if (mask.m_value == -1)
mask.m_value == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
551 m_assembler.testq_rr(reg, reg);
never executed: m_assembler.testq_rr(reg, reg);
0
552 else if ((mask.m_value & ~0x7f) == 0)
(mask.m_value & ~0x7f) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
553 m_assembler.testb_i8r(mask.m_value, reg);
never executed: m_assembler.testb_i8r(mask.m_value, reg);
0
554 else-
555 m_assembler.testq_i32r(mask.m_value, reg);
never executed: m_assembler.testq_i32r(mask.m_value, reg);
0
556 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
557 }-
558-
559 void test64(ResultCondition cond, RegisterID reg, TrustedImm32 mask, RegisterID dest)-
560 {-
561 if (mask.m_value == -1)
mask.m_value == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
562 m_assembler.testq_rr(reg, reg);
never executed: m_assembler.testq_rr(reg, reg);
0
563 else if ((mask.m_value & ~0x7f) == 0)
(mask.m_value & ~0x7f) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
564 m_assembler.testb_i8r(mask.m_value, reg);
never executed: m_assembler.testb_i8r(mask.m_value, reg);
0
565 else-
566 m_assembler.testq_i32r(mask.m_value, reg);
never executed: m_assembler.testq_i32r(mask.m_value, reg);
0
567 set32(x86Condition(cond), dest);-
568 }
never executed: end of block
0
569-
570 void test64(ResultCondition cond, RegisterID reg, RegisterID mask, RegisterID dest)-
571 {-
572 m_assembler.testq_rr(reg, mask);-
573 set32(x86Condition(cond), dest);-
574 }
never executed: end of block
0
575-
576 Jump branchTest64(ResultCondition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1))-
577 {-
578 load64(address.m_ptr, scratchRegister);-
579 return branchTest64(cond, scratchRegister, mask);
never executed: return branchTest64(cond, scratchRegister, mask);
0
580 }-
581-
582 Jump branchTest64(ResultCondition cond, Address address, TrustedImm32 mask = TrustedImm32(-1))-
583 {-
584 if (mask.m_value == -1)
mask.m_value == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
585 m_assembler.cmpq_im(0, address.offset, address.base);
never executed: m_assembler.cmpq_im(0, address.offset, address.base);
0
586 else-
587 m_assembler.testq_i32m(mask.m_value, address.offset, address.base);
never executed: m_assembler.testq_i32m(mask.m_value, address.offset, address.base);
0
588 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
589 }-
590-
591 Jump branchTest64(ResultCondition cond, Address address, RegisterID reg)-
592 {-
593 m_assembler.testq_rm(reg, address.offset, address.base);-
594 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
595 }-
596-
597 Jump branchTest64(ResultCondition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1))-
598 {-
599 if (mask.m_value == -1)
mask.m_value == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
600 m_assembler.cmpq_im(0, address.offset, address.base, address.index, address.scale);
never executed: m_assembler.cmpq_im(0, address.offset, address.base, address.index, address.scale);
0
601 else-
602 m_assembler.testq_i32m(mask.m_value, address.offset, address.base, address.index, address.scale);
never executed: m_assembler.testq_i32m(mask.m_value, address.offset, address.base, address.index, address.scale);
0
603 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
604 }-
605-
606-
607 Jump branchAdd64(ResultCondition cond, TrustedImm32 imm, RegisterID dest)-
608 {-
609 add64(imm, dest);-
610 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
611 }-
612-
613 Jump branchAdd64(ResultCondition cond, RegisterID src, RegisterID dest)-
614 {-
615 add64(src, dest);-
616 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
617 }-
618-
619 Jump branchSub64(ResultCondition cond, TrustedImm32 imm, RegisterID dest)-
620 {-
621 sub64(imm, dest);-
622 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
623 }-
624-
625 Jump branchSub64(ResultCondition cond, RegisterID src, RegisterID dest)-
626 {-
627 sub64(src, dest);-
628 return Jump(m_assembler.jCC(x86Condition(cond)));
never executed: return Jump(m_assembler.jCC(x86Condition(cond)));
0
629 }-
630-
631 Jump branchSub64(ResultCondition cond, RegisterID src1, TrustedImm32 src2, RegisterID dest)-
632 {-
633 move(src1, dest);-
634 return branchSub64(cond, src2, dest);
never executed: return branchSub64(cond, src2, dest);
0
635 }-
636-
637 ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest)-
638 {-
639 ConvertibleLoadLabel result = ConvertibleLoadLabel(this);-
640 m_assembler.movq_mr(address.offset, address.base, dest);-
641 return result;
never executed: return result;
0
642 }-
643-
644 DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest)-
645 {-
646 padBeforePatch();-
647 m_assembler.movq_i64r(initialValue.asIntptr(), dest);-
648 return DataLabelPtr(this);
executed 609 times by 10 tests: return DataLabelPtr(this);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicktextinput
  • tst_qquickworkerscript
  • tst_testfiltering
609
649 }-
650-
651 Jump branchPtrWithPatch(RelationalCondition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))-
652 {-
653 dataLabel = moveWithPatch(initialRightValue, scratchRegister);-
654 return branch64(cond, left, scratchRegister);
never executed: return branch64(cond, left, scratchRegister);
0
655 }-
656-
657 Jump branchPtrWithPatch(RelationalCondition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))-
658 {-
659 dataLabel = moveWithPatch(initialRightValue, scratchRegister);-
660 return branch64(cond, left, scratchRegister);
never executed: return branch64(cond, left, scratchRegister);
0
661 }-
662-
663 DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address)-
664 {-
665 DataLabelPtr label = moveWithPatch(initialValue, scratchRegister);-
666 store64(scratchRegister, address);-
667 return label;
executed 610 times by 10 tests: return label;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicktextinput
  • tst_qquickworkerscript
  • tst_testfiltering
610
668 }-
669 -
670 using MacroAssemblerX86Common::branchTest8;-
671 Jump branchTest8(ResultCondition cond, ExtendedAddress address, TrustedImm32 mask = TrustedImm32(-1))-
672 {-
673 TrustedImmPtr addr(reinterpret_cast<void*>(address.offset));-
674 MacroAssemblerX86Common::move(addr, scratchRegister);-
675 return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask);
executed 3752 times by 3 tests: return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
3752
676 }-
677 -
678 Jump branchTest8(ResultCondition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1))-
679 {-
680 MacroAssemblerX86Common::move(TrustedImmPtr(address.m_ptr), scratchRegister);-
681 return MacroAssemblerX86Common::branchTest8(cond, Address(scratchRegister), mask);
never executed: return MacroAssemblerX86Common::branchTest8(cond, Address(scratchRegister), mask);
0
682 }-
683-
684 static bool supportsFloatingPoint() { return true; }
never executed: return true;
0
685 // See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()-
686 static bool supportsFloatingPointTruncate() { return true; }
never executed: return true;
0
687 static bool supportsFloatingPointSqrt() { return true; }
never executed: return true;
0
688 static bool supportsFloatingPointAbs() { return true; }
never executed: return true;
0
689 -
690 static FunctionPtr readCallTarget(CodeLocationCall call)-
691 {-
692 return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation()));
never executed: return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-3).dataLocation()));
0
693 }-
694-
695 static RegisterID scratchRegisterForBlinding() { return scratchRegister; }
never executed: return scratchRegister;
0
696-
697 static bool canJumpReplacePatchableBranchPtrWithPatch() { return true; }
never executed: return true;
0
698 -
699 static CodeLocationLabel startOfBranchPtrWithPatchOnRegister(CodeLocationDataLabelPtr label)-
700 {-
701 const int rexBytes = 1;-
702 const int opcodeBytes = 1;-
703 const int immediateBytes = 8;-
704 const int totalBytes = rexBytes + opcodeBytes + immediateBytes;-
705 ASSERT(totalBytes >= maxJumpReplacementSize());-
706 return label.labelAtOffset(-totalBytes);
never executed: return label.labelAtOffset(-totalBytes);
0
707 }-
708 -
709 static CodeLocationLabel startOfPatchableBranchPtrWithPatchOnAddress(CodeLocationDataLabelPtr label)-
710 {-
711 return startOfBranchPtrWithPatchOnRegister(label);
never executed: return startOfBranchPtrWithPatchOnRegister(label);
0
712 }-
713 -
714 static void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel instructionStart, Address, void* initialValue)-
715 {-
716 X86Assembler::revertJumpTo_movq_i64r(instructionStart.executableAddress(), reinterpret_cast<intptr_t>(initialValue), scratchRegister);-
717 }
never executed: end of block
0
718-
719 static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID, void* initialValue)-
720 {-
721 X86Assembler::revertJumpTo_movq_i64r(instructionStart.executableAddress(), reinterpret_cast<intptr_t>(initialValue), scratchRegister);-
722 }
never executed: end of block
0
723-
724private:-
725 template <typename, template <typename> class> friend class LinkBufferBase;-
726 friend class RepatchBuffer;-
727-
728 static void linkCall(void* code, Call call, FunctionPtr function)-
729 {-
730 if (!call.isFlagSet(Call::Near))
!call.isFlagSet(Call::Near)Description
TRUEnever evaluated
FALSEnever evaluated
0
731 X86Assembler::linkPointer(code, call.m_label.labelAtOffset(-REPTACH_OFFSET_CALL_R11), function.value());
never executed: X86Assembler::linkPointer(code, call.m_label.labelAtOffset(-3), function.value());
0
732 else-
733 X86Assembler::linkCall(code, call.m_label, function.value());
never executed: X86Assembler::linkCall(code, call.m_label, function.value());
0
734 }-
735-
736 static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)-
737 {-
738 X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());-
739 }
never executed: end of block
0
740-
741 static void repatchCall(CodeLocationCall call, FunctionPtr destination)-
742 {-
743 X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());-
744 }
never executed: end of block
0
745-
746};-
747-
748} // namespace JSC-
749-
750#endif // ENABLE(ASSEMBLER)-
751-
752#endif // MacroAssemblerX86_64_h-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0