Skip to content

Commit

Permalink
Pacify Valgrind (by fixing a somewhat theoretical bug).
Browse files Browse the repository at this point in the history
  • Loading branch information
argosphil committed Mar 3, 2024
1 parent 64b2fa7 commit 9d254ea
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Source/JavaScriptCore/llint/InPlaceInterpreter.asm
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,8 @@ macro ipintCatchCommon()
# 1 << 4 == StackValueSize
lshiftq 4, t0
addq IPIntCalleeSaveSpaceStackAligned, t0
subp cfr, t0, sp
subp cfr, t0, t0
move t0, sp
end

global _ipint_catch_entry
Expand Down
3 changes: 2 additions & 1 deletion Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,8 @@ macro restoreStackPointerAfterCall()
subp cfr, t2, t2
move t2, sp
else
subp cfr, t2, sp
subp cfr, t2, t2
move t2, sp
end
end

Expand Down
9 changes: 6 additions & 3 deletions Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ macro doVMEntry(makeCall)
subp cfr, CalleeRegisterSaveSize, t5
move t5, sp
else
subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t5
move t5, sp
end

popCalleeSaves()
Expand Down Expand Up @@ -379,7 +380,8 @@ _llint_throw_stack_overflow_error_from_vm_entry:
subp cfr, CalleeRegisterSaveSize, t5
move t5, sp
else
subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t5
move t5, sp
end

popCalleeSaves()
Expand Down Expand Up @@ -452,7 +454,8 @@ op(llint_handle_uncaught_exception, macro()
subp cfr, CalleeRegisterSaveSize, t3
move t3, sp
else
subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t3
move t3, sp
end

popCalleeSaves()
Expand Down
9 changes: 6 additions & 3 deletions Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ macro doVMEntry(makeCall)
storep t2, VM::topEntryFrame[vm]
end

subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t2
move t2, sp

popCalleeSaves()
functionEpilogue()
Expand All @@ -383,7 +384,8 @@ _llint_throw_stack_overflow_error_from_vm_entry:

move ValueUndefined, r0

subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t4
move t4, sp
popCalleeSaves()
functionEpilogue()
ret
Expand Down Expand Up @@ -445,7 +447,8 @@ op(llint_handle_uncaught_exception, macro ()

move ValueUndefined, r0

subp cfr, CalleeRegisterSaveSize, sp
subp cfr, CalleeRegisterSaveSize, t3
move t3, sp
popCalleeSaves()
functionEpilogue()
ret
Expand Down
9 changes: 6 additions & 3 deletions Source/JavaScriptCore/llint/WebAssembly.asm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ if ARMv7
subp cfr, ws1, ws1
move ws1, sp
else
subp cfr, ws1, sp
subp cfr, ws1, ws1
move ws1, sp
end
end

Expand Down Expand Up @@ -1012,7 +1013,8 @@ if ARMv7
subp cfr, ws1, ws1
move ws1, sp
else
subp cfr, ws1, sp
subp cfr, ws1, ws1
move ws1, sp
end

wgetu(ctx, m_numberOfStackArgs, ws1)
Expand Down Expand Up @@ -1169,7 +1171,8 @@ if ARMv7
subp cfr, ws1, ws1
move ws1, sp
else
subp cfr, ws1, sp
subp cfr, ws1, ws1
move ws1, sp
end

storeWasmInstance(targetWasmInstance)
Expand Down

0 comments on commit 9d254ea

Please sign in to comment.