| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c6e3d5d commit 9b69baf
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.24', | ||
| 41 | + 'v8_embedder_string': '-node.25', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2893,14 +2893,38 @@ void LiftoffAssembler::CallC(const std::initializer_list<VarState> args, | |||
| 2893 | 2893 | parallel_move.LoadIntoRegister(LiftoffRegister{kCArgRegs[reg_args]}, arg); | |
| 2894 | 2894 | ++reg_args; | |
| 2895 | 2895 | } else { | |
| 2896 | - int bias = 0; | ||
| 2897 | - // On BE machines values with less than 8 bytes are right justified. | ||
| 2898 | - // bias here is relative to the stack pointer. | ||
| 2899 | - if (arg.kind() == kI32 || arg.kind() == kF32) bias = -stack_bias; | ||
| 2900 | 2896 | int offset = | |
| 2901 | 2897 | (kStackFrameExtraParamSlot + stack_args) * kSystemPointerSize; | |
| 2902 | - MemOperand dst{sp, offset + bias}; | ||
| 2903 | - liftoff::StoreToMemory(this, dst, arg, r0, ip); | ||
| 2898 | + MemOperand dst{sp, offset}; | ||
| 2899 | + Register scratch1 = r0; | ||
| 2900 | + Register scratch2 = ip; | ||
| 2901 | + if (arg.is_reg()) { | ||
| 2902 | + switch (arg.kind()) { | ||
| 2903 | + case kI16: | ||
| 2904 | + extsh(scratch1, arg.reg().gp()); | ||
| 2905 | + StoreU64(scratch1, dst); | ||
| 2906 | + break; | ||
| 2907 | + case kI32: | ||
| 2908 | + extsw(scratch1, arg.reg().gp()); | ||
| 2909 | + StoreU64(scratch1, dst); | ||
| 2910 | + break; | ||
| 2911 | + case kI64: | ||
| 2912 | + StoreU64(arg.reg().gp(), dst); | ||
| 2913 | + break; | ||
| 2914 | + default: | ||
| 2915 | + UNREACHABLE(); | ||
| 2916 | + } | ||
| 2917 | + } else if (arg.is_const()) { | ||
| 2918 | + mov(scratch1, Operand(static_cast<int64_t>(arg.i32_const()))); | ||
| 2919 | + StoreU64(scratch1, dst); | ||
| 2920 | + } else if (value_kind_size(arg.kind()) == 4) { | ||
| 2921 | + LoadS32(scratch1, liftoff::GetStackSlot(arg.offset()), scratch2); | ||
| 2922 | + StoreU64(scratch1, dst); | ||
| 2923 | + } else { | ||
| 2924 | + DCHECK_EQ(8, value_kind_size(arg.kind())); | ||
| 2925 | + LoadU64(scratch1, liftoff::GetStackSlot(arg.offset()), scratch1); | ||
| 2926 | + StoreU64(scratch1, dst); | ||
| 2927 | + } | ||
| 2904 | 2928 | ++stack_args; | |
| 2905 | 2929 | } | |
| 2906 | 2930 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3271,14 +3271,37 @@ void LiftoffAssembler::CallC(const std::initializer_list<VarState> args, | |||
| 3271 | 3271 | parallel_move.LoadIntoRegister(LiftoffRegister{kCArgRegs[reg_args]}, arg); | |
| 3272 | 3272 | ++reg_args; | |
| 3273 | 3273 | } else { | |
| 3274 | - int bias = 0; | ||
| 3275 | - // On BE machines values with less than 8 bytes are right justified. | ||
| 3276 | - // bias here is relative to the stack pointer. | ||
| 3277 | - if (arg.kind() == kI32 || arg.kind() == kF32) bias = -stack_bias; | ||
| 3278 | 3274 | int offset = | |
| 3279 | 3275 | (kStackFrameExtraParamSlot + stack_args) * kSystemPointerSize; | |
| 3280 | - MemOperand dst{sp, offset + bias}; | ||
| 3281 | - liftoff::StoreToMemory(this, dst, arg, ip); | ||
| 3276 | + MemOperand dst{sp, offset}; | ||
| 3277 | + Register scratch = ip; | ||
| 3278 | + if (arg.is_reg()) { | ||
| 3279 | + switch (arg.kind()) { | ||
| 3280 | + case kI16: | ||
| 3281 | + LoadS16(scratch, arg.reg().gp()); | ||
| 3282 | + StoreU64(scratch, dst); | ||
| 3283 | + break; | ||
| 3284 | + case kI32: | ||
| 3285 | + LoadS32(scratch, arg.reg().gp()); | ||
| 3286 | + StoreU64(scratch, dst); | ||
| 3287 | + break; | ||
| 3288 | + case kI64: | ||
| 3289 | + StoreU64(arg.reg().gp(), dst); | ||
| 3290 | + break; | ||
| 3291 | + default: | ||
| 3292 | + UNREACHABLE(); | ||
| 3293 | + } | ||
| 3294 | + } else if (arg.is_const()) { | ||
| 3295 | + mov(scratch, Operand(static_cast<int64_t>(arg.i32_const()))); | ||
| 3296 | + StoreU64(scratch, dst); | ||
| 3297 | + } else if (value_kind_size(arg.kind()) == 4) { | ||
| 3298 | + LoadS32(scratch, liftoff::GetStackSlot(arg.offset()), scratch); | ||
| 3299 | + StoreU64(scratch, dst); | ||
| 3300 | + } else { | ||
| 3301 | + DCHECK_EQ(8, value_kind_size(arg.kind())); | ||
| 3302 | + LoadU64(scratch, liftoff::GetStackSlot(arg.offset()), scratch); | ||
| 3303 | + StoreU64(scratch, dst); | ||
| 3304 | + } | ||
| 3282 | 3305 | ++stack_args; | |
| 3283 | 3306 | } | |
| 3284 | 3307 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments