| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 48bfbd3 commit 83410eb
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | 39 | # Reset this number to 0 on major V8 upgrades. | |
| 40 | 40 | # Increment by one for each non-official patch applied to deps/v8. | |
| 41 | - 'v8_embedder_string': '-node.30', | ||
| 41 | + 'v8_embedder_string': '-node.31', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2776,14 +2776,38 @@ void LiftoffAssembler::CallC(const std::initializer_list<VarState> args, | |||
| 2776 | 2776 | parallel_move.LoadIntoRegister(LiftoffRegister{kCArgRegs[reg_args]}, arg); | |
| 2777 | 2777 | ++reg_args; | |
| 2778 | 2778 | } else { | |
| 2779 | - int bias = 0; | ||
| 2780 | - // On BE machines values with less than 8 bytes are right justified. | ||
| 2781 | - // bias here is relative to the stack pointer. | ||
| 2782 | - if (arg.kind() == kI32 || arg.kind() == kF32) bias = -stack_bias; | ||
| 2783 | 2779 | int offset = | |
| 2784 | 2780 | (kStackFrameExtraParamSlot + stack_args) * kSystemPointerSize; | |
| 2785 | - MemOperand dst{sp, offset + bias}; | ||
| 2786 | - liftoff::StoreToMemory(this, dst, arg, r0, ip); | ||
| 2781 | + MemOperand dst{sp, offset}; | ||
| 2782 | + Register scratch1 = r0; | ||
| 2783 | + Register scratch2 = ip; | ||
| 2784 | + if (arg.is_reg()) { | ||
| 2785 | + switch (arg.kind()) { | ||
| 2786 | + case kI16: | ||
| 2787 | + extsh(scratch1, arg.reg().gp()); | ||
| 2788 | + StoreU64(scratch1, dst); | ||
| 2789 | + break; | ||
| 2790 | + case kI32: | ||
| 2791 | + extsw(scratch1, arg.reg().gp()); | ||
| 2792 | + StoreU64(scratch1, dst); | ||
| 2793 | + break; | ||
| 2794 | + case kI64: | ||
| 2795 | + StoreU64(arg.reg().gp(), dst); | ||
| 2796 | + break; | ||
| 2797 | + default: | ||
| 2798 | + UNREACHABLE(); | ||
| 2799 | + } | ||
| 2800 | + } else if (arg.is_const()) { | ||
| 2801 | + mov(scratch1, Operand(static_cast<int64_t>(arg.i32_const()))); | ||
| 2802 | + StoreU64(scratch1, dst); | ||
| 2803 | + } else if (value_kind_size(arg.kind()) == 4) { | ||
| 2804 | + LoadS32(scratch1, liftoff::GetStackSlot(arg.offset()), scratch2); | ||
| 2805 | + StoreU64(scratch1, dst); | ||
| 2806 | + } else { | ||
| 2807 | + DCHECK_EQ(8, value_kind_size(arg.kind())); | ||
| 2808 | + LoadU64(scratch1, liftoff::GetStackSlot(arg.offset()), scratch1); | ||
| 2809 | + StoreU64(scratch1, dst); | ||
| 2810 | + } | ||
| 2787 | 2811 | ++stack_args; | |
| 2788 | 2812 | } | |
| 2789 | 2813 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3135,14 +3135,37 @@ void LiftoffAssembler::CallC(const std::initializer_list<VarState> args, | |||
| 3135 | 3135 | parallel_move.LoadIntoRegister(LiftoffRegister{kCArgRegs[reg_args]}, arg); | |
| 3136 | 3136 | ++reg_args; | |
| 3137 | 3137 | } else { | |
| 3138 | - int bias = 0; | ||
| 3139 | - // On BE machines values with less than 8 bytes are right justified. | ||
| 3140 | - // bias here is relative to the stack pointer. | ||
| 3141 | - if (arg.kind() == kI32 || arg.kind() == kF32) bias = -stack_bias; | ||
| 3142 | 3138 | int offset = | |
| 3143 | 3139 | (kStackFrameExtraParamSlot + stack_args) * kSystemPointerSize; | |
| 3144 | - MemOperand dst{sp, offset + bias}; | ||
| 3145 | - liftoff::StoreToMemory(this, dst, arg, r0); | ||
| 3140 | + MemOperand dst{sp, offset}; | ||
| 3141 | + Register scratch = ip; | ||
| 3142 | + if (arg.is_reg()) { | ||
| 3143 | + switch (arg.kind()) { | ||
| 3144 | + case kI16: | ||
| 3145 | + LoadS16(scratch, arg.reg().gp()); | ||
| 3146 | + StoreU64(scratch, dst); | ||
| 3147 | + break; | ||
| 3148 | + case kI32: | ||
| 3149 | + LoadS32(scratch, arg.reg().gp()); | ||
| 3150 | + StoreU64(scratch, dst); | ||
| 3151 | + break; | ||
| 3152 | + case kI64: | ||
| 3153 | + StoreU64(arg.reg().gp(), dst); | ||
| 3154 | + break; | ||
| 3155 | + default: | ||
| 3156 | + UNREACHABLE(); | ||
| 3157 | + } | ||
| 3158 | + } else if (arg.is_const()) { | ||
| 3159 | + mov(scratch, Operand(static_cast<int64_t>(arg.i32_const()))); | ||
| 3160 | + StoreU64(scratch, dst); | ||
| 3161 | + } else if (value_kind_size(arg.kind()) == 4) { | ||
| 3162 | + LoadS32(scratch, liftoff::GetStackSlot(arg.offset()), scratch); | ||
| 3163 | + StoreU64(scratch, dst); | ||
| 3164 | + } else { | ||
| 3165 | + DCHECK_EQ(8, value_kind_size(arg.kind())); | ||
| 3166 | + LoadU64(scratch, liftoff::GetStackSlot(arg.offset()), scratch); | ||
| 3167 | + StoreU64(scratch, dst); | ||
| 3168 | + } | ||
| 3146 | 3169 | ++stack_args; | |
| 3147 | 3170 | } | |
| 3148 | 3171 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments