Commit 98790715 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64] Introduce dedicated JSBoundFunction to represent bound functions.

Port 97def807

Change-Id: If4f135be03e7ab719e091f02bdace49f9bcafcfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928143
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: 's avatarBrice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74938}
parent 359d44df
This diff is collapsed.
......@@ -3510,11 +3510,11 @@ void MacroAssembler::LoadStackLimit(Register destination, StackLimitKind kind) {
void MacroAssembler::StackOverflowCheck(Register num_args, Register scratch1,
Register scratch2,
Label* stack_overflow) {
Label* stack_overflow, Label* done) {
// Check the stack for overflow. We are not trying to catch
// interruptions (e.g. debug break and preemption) here, so the "real stack
// limit" is checked.
DCHECK(stack_overflow != nullptr || done != nullptr);
LoadStackLimit(scratch1, StackLimitKind::kRealStackLimit);
// Make scratch1 the space we have left. The stack might already be overflowed
// here which will cause scratch1 to become negative.
......@@ -3522,7 +3522,13 @@ void MacroAssembler::StackOverflowCheck(Register num_args, Register scratch1,
// Check if the arguments will overflow the stack.
Sll64(scratch2, num_args, kSystemPointerSizeLog2);
// Signed comparison.
Branch(stack_overflow, le, scratch1, Operand(scratch2));
if (stack_overflow != nullptr) {
Branch(stack_overflow, le, scratch1, Operand(scratch2));
} else if (done != nullptr) {
Branch(done, gt, scratch1, Operand(scratch2));
} else {
UNREACHABLE();
}
}
void MacroAssembler::InvokePrologue(Register expected_parameter_count,
......
......@@ -893,6 +893,13 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
const Register& source);
void DecompressAnyTagged(const Register& destination,
const MemOperand& field_operand);
void CmpTagged(const Register& rd, const Register& rs1, const Register& rs2) {
if (COMPRESS_POINTERS_BOOL) {
Sub32(rd, rs1, rs2);
} else {
Sub64(rd, rs1, rs2);
}
}
protected:
inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch);
......@@ -1145,7 +1152,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
enum StackLimitKind { kInterruptStackLimit, kRealStackLimit };
void LoadStackLimit(Register destination, StackLimitKind kind);
void StackOverflowCheck(Register num_args, Register scratch1,
Register scratch2, Label* stack_overflow);
Register scratch2, Label* stack_overflow,
Label* done = nullptr);
// -------------------------------------------------------------------------
// Smi utilities.
......
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