|
Lines 383-388
macro callToJavaScriptEpilogue()
Source/JavaScriptCore/llint/LowLevelInterpreter.asm_sec1
|
| 383 |
end |
383 |
end |
| 384 |
end |
384 |
end |
| 385 |
|
385 |
|
|
|
386 |
# On Windows we need to check if the stack pointer moves over the stack guard page of size 4K. |
| 387 |
# If so, we need to read or write some data on every following guard page |
| 388 |
# to make sure the system commits the previously uncommitted stack memory. |
| 389 |
# Otherwise we might crash later if we access uncommitted stack memory. |
| 390 |
# See http://msdn.microsoft.com/en-us/library/ms686774%28VS.85%29.aspx |
| 391 |
|
| 392 |
macro moveStackPointerAndGuardPage(reg, scratch) |
| 393 |
const winStackGuardPageSize = 4096 |
| 394 |
const delta = winStackGuardPageSize - 16 |
| 395 |
|
| 396 |
subi reg, scratch |
| 397 |
addi sp, scratch |
| 398 |
.updateSpLoop: |
| 399 |
bilt scratch, delta, .almostDoneUpdateSp |
| 400 |
subi delta, scratch |
| 401 |
subi delta, sp |
| 402 |
# Dummy operation to make sure the system commits memory, and moves the guard page. |
| 403 |
subi 0, [sp] |
| 404 |
jmp .updateSpLoop |
| 405 |
.almostDoneUpdateSp: |
| 406 |
subi scratch, sp |
| 407 |
end |
| 408 |
|
| 386 |
macro moveStackPointerForCodeBlock(codeBlock, scratch) |
409 |
macro moveStackPointerForCodeBlock(codeBlock, scratch) |
| 387 |
loadi CodeBlock::m_numCalleeRegisters[codeBlock], scratch |
410 |
loadi CodeBlock::m_numCalleeRegisters[codeBlock], scratch |
| 388 |
lshiftp 3, scratch |
411 |
lshiftp 3, scratch |
|
Lines 390-395
macro moveStackPointerForCodeBlock(codeB
Source/JavaScriptCore/llint/LowLevelInterpreter.asm_sec2
|
| 390 |
if ARMv7 |
413 |
if ARMv7 |
| 391 |
subp cfr, scratch, scratch |
414 |
subp cfr, scratch, scratch |
| 392 |
move scratch, sp |
415 |
move scratch, sp |
|
|
416 |
elsif X86_WIN |
| 417 |
moveStackPointerAndGuardPage(cfr, scratch) |
| 393 |
else |
418 |
else |
| 394 |
subp cfr, scratch, sp |
419 |
subp cfr, scratch, sp |
| 395 |
end |
420 |
end |
|
Lines 991-996
_llint_op_call_varargs:
Source/JavaScriptCore/llint/LowLevelInterpreter.asm_sec3
|
| 991 |
if ARMv7 |
1016 |
if ARMv7 |
| 992 |
subp t1, CallerFrameAndPCSize, t2 |
1017 |
subp t1, CallerFrameAndPCSize, t2 |
| 993 |
move t2, sp |
1018 |
move t2, sp |
|
|
1019 |
elsif X86_WIN |
| 1020 |
move CallerFrameAndPCSize, t2 |
| 1021 |
moveStackPointerAndGuardPage(t1, t2) |
| 994 |
else |
1022 |
else |
| 995 |
subp t1, CallerFrameAndPCSize, sp |
1023 |
subp t1, CallerFrameAndPCSize, sp |
| 996 |
end |
1024 |
end |