Skip to content

Commit

Permalink
[mips][wasm][x64] Fix OSR shadow stack violation
Browse files Browse the repository at this point in the history
Port 06a2c2e

Change-Id: I0901804ce7d403c284f944251e09afe6dd7ad77b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831162
Auto-Submit: Liu yu <[email protected]>
Reviewed-by: Zhao Jiazhong <[email protected]>
Commit-Queue: Zhao Jiazhong <[email protected]>
Cr-Commit-Position: refs/heads/master@{#74020}
  • Loading branch information
LiuYu396 authored and Commit Bot committed Apr 19, 2021
1 parent fd968ef commit 5795454
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/builtins/mips/builtins-mips.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2364,6 +2364,12 @@ void Builtins::Generate_WasmDebugBreak(MacroAssembler* masm) {
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
__ Trap();
}

void Builtins::Generate_WasmOnStackReplace(MacroAssembler* masm) {
// Only needed on x64.
__ Trap();
}

#endif // V8_ENABLE_WEBASSEMBLY

void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
Expand Down
6 changes: 6 additions & 0 deletions src/builtins/mips64/builtins-mips64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2456,6 +2456,12 @@ void Builtins::Generate_WasmDebugBreak(MacroAssembler* masm) {
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
__ Trap();
}

void Builtins::Generate_WasmOnStackReplace(MacroAssembler* masm) {
// Only needed on x64.
__ Trap();
}

#endif // V8_ENABLE_WEBASSEMBLY

void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
Expand Down
4 changes: 4 additions & 0 deletions src/wasm/baseline/mips/liftoff-assembler-mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ void LiftoffAssembler::SpillInstance(Register instance) {
sw(instance, liftoff::GetInstanceOperand());
}

void LiftoffAssembler::ResetOSRTarget() {}

void LiftoffAssembler::FillInstanceInto(Register dst) {
lw(dst, liftoff::GetInstanceOperand());
}
Expand Down Expand Up @@ -2998,6 +3000,8 @@ void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
addiu(sp, sp, size);
}

void LiftoffAssembler::MaybeOSR() {}

void LiftoffStackSlots::Construct(int param_slots) {
DCHECK_LT(0, slots_.size());
SortInPushOrder();
Expand Down
4 changes: 4 additions & 0 deletions src/wasm/baseline/mips64/liftoff-assembler-mips64.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ void LiftoffAssembler::SpillInstance(Register instance) {
Sd(instance, liftoff::GetInstanceOperand());
}

void LiftoffAssembler::ResetOSRTarget() {}

void LiftoffAssembler::FillInstanceInto(Register dst) {
Ld(dst, liftoff::GetInstanceOperand());
}
Expand Down Expand Up @@ -3166,6 +3168,8 @@ void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
Daddu(sp, sp, size);
}

void LiftoffAssembler::MaybeOSR() {}

void LiftoffStackSlots::Construct(int param_slots) {
DCHECK_LT(0, slots_.size());
SortInPushOrder();
Expand Down

0 comments on commit 5795454

Please sign in to comment.