[turbofan] Make --branch-load-poisoning work with stock snapshot.
This makes sure that an existing unmodified snapshot works together with the --branch-load-poisoning feature by unconditionally resetting the underlying register in {CEntryStub::Generate}. R=mvstanton@chromium.org Change-Id: I4d9f12a3b45bd7b46eda55a342beadf9b9a4bb8a Reviewed-on: https://chromium-review.googlesource.com/926365 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#51397}
This commit is contained in:
parent
6e547e907e
commit
5a4af7c142
@ -385,10 +385,11 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
|||||||
__ cmp(cp, Operand(0));
|
__ cmp(cp, Operand(0));
|
||||||
__ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne);
|
__ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne);
|
||||||
|
|
||||||
// Reset the masking register.
|
// Reset the masking register. This is done independent of the underlying
|
||||||
if (FLAG_branch_load_poisoning) {
|
// feature flag {FLAG_branch_load_poisoning} to make the snapshot work with
|
||||||
|
// both configurations. It is safe to always do this, because the underlying
|
||||||
|
// register is caller-saved and can be arbitrarily clobbered.
|
||||||
__ ResetSpeculationPoisonRegister();
|
__ ResetSpeculationPoisonRegister();
|
||||||
}
|
|
||||||
|
|
||||||
// Compute the handler entry address and jump to it.
|
// Compute the handler entry address and jump to it.
|
||||||
ConstantPoolUnavailableScope constant_pool_unavailable(masm);
|
ConstantPoolUnavailableScope constant_pool_unavailable(masm);
|
||||||
|
@ -425,10 +425,11 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
|||||||
__ movp(Operand(rbp, StandardFrameConstants::kContextOffset), rsi);
|
__ movp(Operand(rbp, StandardFrameConstants::kContextOffset), rsi);
|
||||||
__ bind(&skip);
|
__ bind(&skip);
|
||||||
|
|
||||||
// Reset the masking register.
|
// Reset the masking register. This is done independent of the underlying
|
||||||
if (FLAG_branch_load_poisoning) {
|
// feature flag {FLAG_branch_load_poisoning} to make the snapshot work with
|
||||||
|
// both configurations. It is safe to always do this, because the underlying
|
||||||
|
// register is caller-saved and can be arbitrarily clobbered.
|
||||||
__ ResetSpeculationPoisonRegister();
|
__ ResetSpeculationPoisonRegister();
|
||||||
}
|
|
||||||
|
|
||||||
// Compute the handler entry address and jump to it.
|
// Compute the handler entry address and jump to it.
|
||||||
__ movp(rdi, masm->ExternalOperand(pending_handler_entrypoint_address));
|
__ movp(rdi, masm->ExternalOperand(pending_handler_entrypoint_address));
|
||||||
|
Loading…
Reference in New Issue
Block a user