Commit 598ec7e4 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Registers used in writeBarrierOnOperand can cause clobbering on some platforms

https://bugs.webkit.org/show_bug.cgi?id=127357

Reviewed by Filip Pizlo.

Some platforms use t0 and t1 for their first two arguments, so using those to load the
cell for the write barrier is a bad idea because it will get clobbered.

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 909a2e9a
2014-01-21 Mark Hahnenberg <mhahnenberg@apple.com>
Registers used in writeBarrierOnOperand can cause clobbering on some platforms
https://bugs.webkit.org/show_bug.cgi?id=127357
Reviewed by Filip Pizlo.
Some platforms use t0 and t1 for their first two arguments, so using those to load the
cell for the write barrier is a bad idea because it will get clobbered.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
2014-01-21 Mark Rowe <mrowe@apple.com>
Mac production build fix.
......
......@@ -494,14 +494,14 @@ end
macro writeBarrierOnOperand(cellOperand)
if GGC
loadisFromInstruction(cellOperand, t1)
loadConstantOrVariablePayload(t1, CellTag, t0, .writeBarrierDone)
checkMarkByte(t0, t1, t2,
loadConstantOrVariablePayload(t1, CellTag, t2, .writeBarrierDone)
checkMarkByte(t2, t1, t3,
macro(marked)
btbz marked, .writeBarrierDone
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
cCall2(_llint_write_barrier_slow, cfr, t0)
cCall2(_llint_write_barrier_slow, cfr, t2)
addp 8, sp
pop PC, cfr
end
......@@ -526,15 +526,15 @@ macro writeBarrierOnGlobalObject(valueOperand)
loadisFromInstruction(valueOperand, t1)
bineq t0, CellTag, .writeBarrierDone
loadp CodeBlock[cfr], t0
loadp CodeBlock::m_globalObject[t0], t0
checkMarkByte(t0, t1, t2,
loadp CodeBlock[cfr], t3
loadp CodeBlock::m_globalObject[t3], t3
checkMarkByte(t3, t1, t2,
macro(marked)
btbz marked, .writeBarrierDone
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
cCall2(_llint_write_barrier_slow, cfr, t0)
cCall2(_llint_write_barrier_slow, cfr, t3)
addp 8, sp
pop PC, cfr
end
......
......@@ -334,12 +334,12 @@ end
macro writeBarrierOnOperand(cellOperand)
if GGC
loadisFromInstruction(cellOperand, t1)
loadConstantOrVariableCell(t1, t0, .writeBarrierDone)
checkMarkByte(t0, t1, t2,
loadConstantOrVariableCell(t1, t2, .writeBarrierDone)
checkMarkByte(t2, t1, t3,
macro(marked)
btbz marked, .writeBarrierDone
push PB, PC
cCall2(_llint_write_barrier_slow, cfr, t0)
cCall2(_llint_write_barrier_slow, cfr, t2)
pop PC, PB
end
)
......@@ -364,13 +364,13 @@ macro writeBarrierOnGlobalObject(valueOperand)
loadConstantOrVariable(t1, t0)
btpz t0, .writeBarrierDone
loadp CodeBlock[cfr], t0
loadp CodeBlock::m_globalObject[t0], t0
checkMarkByte(t0, t1, t2,
loadp CodeBlock[cfr], t3
loadp CodeBlock::m_globalObject[t3], t3
checkMarkByte(t3, t1, t2,
macro(marked)
btbz marked, .writeBarrierDone
push PB, PC
cCall2(_llint_write_barrier_slow, cfr, t0)
cCall2(_llint_write_barrier_slow, cfr, t3)
pop PC, PB
end
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment