Commit ee6c6a2f authored by QiuJi's avatar QiuJi Committed by V8 LUCI CQ

[riscv64] Using SystemPointerSize to index address for PrologueFillFrame

Also remove useless comment in test-assembler-riscv64

Change-Id: I28451386449f15542b02383d8bf1aa9c4539469c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669660
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: 's avatarYahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80768}
parent 86a219d9
...@@ -41,7 +41,8 @@ void BaselineCompiler::PrologueFillFrame() { ...@@ -41,7 +41,8 @@ void BaselineCompiler::PrologueFillFrame() {
DCHECK_LE(new_target_index, register_count); DCHECK_LE(new_target_index, register_count);
__ masm()->Add64(sp, sp, Operand(-(kPointerSize * new_target_index))); __ masm()->Add64(sp, sp, Operand(-(kPointerSize * new_target_index)));
for (int i = 0; i < new_target_index; i++) { for (int i = 0; i < new_target_index; i++) {
__ masm()->Sd(kInterpreterAccumulatorRegister, MemOperand(sp, i * 8)); __ masm()->Sd(kInterpreterAccumulatorRegister,
MemOperand(sp, i * kSystemPointerSize));
} }
// Push new_target_or_generator. // Push new_target_or_generator.
__ Push(kJavaScriptCallNewTargetRegister); __ Push(kJavaScriptCallNewTargetRegister);
...@@ -51,12 +52,14 @@ void BaselineCompiler::PrologueFillFrame() { ...@@ -51,12 +52,14 @@ void BaselineCompiler::PrologueFillFrame() {
// If the frame is small enough, just unroll the frame fill completely. // If the frame is small enough, just unroll the frame fill completely.
__ masm()->Add64(sp, sp, Operand(-(kPointerSize * register_count))); __ masm()->Add64(sp, sp, Operand(-(kPointerSize * register_count)));
for (int i = 0; i < register_count; ++i) { for (int i = 0; i < register_count; ++i) {
__ masm()->Sd(kInterpreterAccumulatorRegister, MemOperand(sp, i * 8)); __ masm()->Sd(kInterpreterAccumulatorRegister,
MemOperand(sp, i * kSystemPointerSize));
} }
} else { } else {
__ masm()->Add64(sp, sp, Operand(-(kPointerSize * register_count))); __ masm()->Add64(sp, sp, Operand(-(kPointerSize * register_count)));
for (int i = 0; i < register_count; ++i) { for (int i = 0; i < register_count; ++i) {
__ masm()->Sd(kInterpreterAccumulatorRegister, MemOperand(sp, i * 8)); __ masm()->Sd(kInterpreterAccumulatorRegister,
MemOperand(sp, i * kSystemPointerSize));
} }
} }
} }
......
...@@ -1962,7 +1962,6 @@ TEST(li_estimate) { ...@@ -1962,7 +1962,6 @@ TEST(li_estimate) {
-256, -255, 0, 255, 8192, 0x7FFFFFFF, -256, -255, 0, 255, 8192, 0x7FFFFFFF,
INT32_MIN, INT32_MAX / 2, INT32_MAX, UINT32_MAX, INT64_MAX, INT64_MAX / 2, INT32_MIN, INT32_MAX / 2, INT32_MAX, UINT32_MAX, INT64_MAX, INT64_MAX / 2,
INT64_MIN}; INT64_MIN};
// Test jump tables with backward jumps and embedded heap objects.
CcTest::InitializeVM(); CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate); HandleScope scope(isolate);
......
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