diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2023-07-02 18:45:39 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2025-03-13 14:34:58 +0200 |
| commit | 5bf81d0bd73bfddd693a3297383c2e01763a1bf3 (patch) | |
| tree | fe6db497dc19351a7b1129a5be5475348ed5f4b7 | |
| parent | 2e996ba595df830d4c472b94732daa445509708a (diff) | |
fixup node-12 riscv64 support
| -rw-r--r-- | gnu/packages/node.scm | 6 | ||||
| -rw-r--r-- | gnu/packages/patches/node-12-riscv64-support.patch | 31 |
2 files changed, 33 insertions, 4 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 02a4b5cd392..d74d590bb87 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm | |||
| @@ -513,6 +513,12 @@ devices.") | |||
| 513 | "test/parallel/test-https-strict.js" | 513 | "test/parallel/test-https-strict.js" |
| 514 | "test/parallel/test-release-npm.js")) | 514 | "test/parallel/test-release-npm.js")) |
| 515 | 515 | ||
| 516 | ;; Some architecture dependant test failures: | ||
| 517 | (cond | ||
| 518 | (,(target-ppc64le?) | ||
| 519 | (delete-file "test/parallel/test-worker-nearheaplimit-deadlock.js")) | ||
| 520 | (else #t)) | ||
| 521 | |||
| 516 | ;; These tests have an expiry date: they depend on the validity of | 522 | ;; These tests have an expiry date: they depend on the validity of |
| 517 | ;; TLS certificates that are bundled with the source. We want this | 523 | ;; TLS certificates that are bundled with the source. We want this |
| 518 | ;; package to be reproducible forever, so remove those. | 524 | ;; package to be reproducible forever, so remove those. |
diff --git a/gnu/packages/patches/node-12-riscv64-support.patch b/gnu/packages/patches/node-12-riscv64-support.patch index dd4162123d0..ba8b67bbdbc 100644 --- a/gnu/packages/patches/node-12-riscv64-support.patch +++ b/gnu/packages/patches/node-12-riscv64-support.patch | |||
| @@ -31457,10 +31457,10 @@ index e0bc4b8e323..a46a9ba196d 100644 | |||
| 31457 | #endif | 31457 | #endif |
| 31458 | diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc | 31458 | diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc |
| 31459 | new file mode 100644 | 31459 | new file mode 100644 |
| 31460 | index 00000000000..ddd7444c255 | 31460 | index 00000000000..7882d3b978b |
| 31461 | --- /dev/null | 31461 | --- /dev/null |
| 31462 | +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc | 31462 | +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc |
| 31463 | @@ -0,0 +1,1269 @@ | 31463 | @@ -0,0 +1,1289 @@ |
| 31464 | +// Copyright 2021 the V8 project authors. All rights reserved. | 31464 | +// Copyright 2021 the V8 project authors. All rights reserved. |
| 31465 | +// Use of this source code is governed by a BSD-style license that can be | 31465 | +// Use of this source code is governed by a BSD-style license that can be |
| 31466 | +// found in the LICENSE file. | 31466 | +// found in the LICENSE file. |
| @@ -32423,6 +32423,26 @@ index 00000000000..ddd7444c255 | |||
| 32423 | + return kRISCVImplementation; | 32423 | + return kRISCVImplementation; |
| 32424 | +} | 32424 | +} |
| 32425 | + | 32425 | + |
| 32426 | +void RegExpMacroAssemblerRISCV::LoadCurrentCharacterImpl(int cp_offset, | ||
| 32427 | + Label* on_end_of_input, | ||
| 32428 | + bool check_bounds, | ||
| 32429 | + int characters, | ||
| 32430 | + int eats_at_least) { | ||
| 32431 | + // It's possible to preload a small number of characters when each success | ||
| 32432 | + // path requires a large number of characters, but not the reverse. | ||
| 32433 | + DCHECK_GE(eats_at_least, characters); | ||
| 32434 | + | ||
| 32435 | + DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works). | ||
| 32436 | + if (check_bounds) { | ||
| 32437 | + if (cp_offset >= 0) { | ||
| 32438 | + CheckPosition(cp_offset + eats_at_least - 1, on_end_of_input); | ||
| 32439 | + } else { | ||
| 32440 | + CheckPosition(cp_offset, on_end_of_input); | ||
| 32441 | + } | ||
| 32442 | + } | ||
| 32443 | + LoadCurrentCharacterUnchecked(cp_offset, characters); | ||
| 32444 | +} | ||
| 32445 | + | ||
| 32426 | +void RegExpMacroAssemblerRISCV::PopCurrentPosition() { | 32446 | +void RegExpMacroAssemblerRISCV::PopCurrentPosition() { |
| 32427 | + Pop(current_input_offset()); | 32447 | + Pop(current_input_offset()); |
| 32428 | +} | 32448 | +} |
| @@ -32732,10 +32752,10 @@ index 00000000000..ddd7444c255 | |||
| 32732 | +#endif // V8_TARGET_ARCH_RISCV64 | 32752 | +#endif // V8_TARGET_ARCH_RISCV64 |
| 32733 | diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h | 32753 | diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h |
| 32734 | new file mode 100644 | 32754 | new file mode 100644 |
| 32735 | index 00000000000..7311d411897 | 32755 | index 00000000000..35feeb772b2 |
| 32736 | --- /dev/null | 32756 | --- /dev/null |
| 32737 | +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h | 32757 | +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h |
| 32738 | @@ -0,0 +1,214 @@ | 32758 | @@ -0,0 +1,217 @@ |
| 32739 | +// Copyright 2021 the V8 project authors. All rights reserved. | 32759 | +// Copyright 2021 the V8 project authors. All rights reserved. |
| 32740 | +// Use of this source code is governed by a BSD-style license that can be | 32760 | +// Use of this source code is governed by a BSD-style license that can be |
| 32741 | +// found in the LICENSE file. | 32761 | +// found in the LICENSE file. |
| @@ -32799,6 +32819,9 @@ index 00000000000..7311d411897 | |||
| 32799 | + virtual IrregexpImplementation Implementation(); | 32819 | + virtual IrregexpImplementation Implementation(); |
| 32800 | + virtual void LoadCurrentCharacterUnchecked(int cp_offset, | 32820 | + virtual void LoadCurrentCharacterUnchecked(int cp_offset, |
| 32801 | + int character_count); | 32821 | + int character_count); |
| 32822 | + virtual void LoadCurrentCharacterImpl(int cp_offset, Label* on_end_of_input, | ||
| 32823 | + bool check_bounds, int characters, | ||
| 32824 | + int eats_at_least); | ||
| 32802 | + virtual void PopCurrentPosition(); | 32825 | + virtual void PopCurrentPosition(); |
| 32803 | + virtual void PopRegister(int register_index); | 32826 | + virtual void PopRegister(int register_index); |
| 32804 | + virtual void PushBacktrack(Label* label); | 32827 | + virtual void PushBacktrack(Label* label); |
