Git Product home page Git Product logo

riscv-collab / v8 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from v8/v8

237.0 237.0 32.0 990.55 MB

Port of Google v8 engine to RISC-V.

Home Page: https://github.com/v8-riscv/v8/wiki

License: Other

Python 1.23% Makefile 0.01% JavaScript 26.37% HTML 0.14% CSS 0.02% C 0.26% C++ 71.54% Shell 0.06% Scheme 0.01% Batchfile 0.01% R 0.01% TypeScript 0.19% Assembly 0.01% Starlark 0.15% Vim Script 0.01%

v8's People

Contributors

ajklein avatar backes avatar bmeurer avatar camillobruni avatar danelphick avatar frankyftang avatar gahaas avatar georgneis avatar gsathya avatar hannespayer avatar hashseed avatar isheludko avatar jakobkummerow avatar jaro-sevcik avatar jeisinger avatar leszekswirski avatar marjakh avatar mi-ac avatar miladfarca avatar mlippautz avatar ngzhian avatar psmarshall avatar ripsawridge avatar rmcilroy avatar santiaboy avatar schuay avatar sigurdschneider avatar tebbi avatar ulan avatar verwaest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v8's Issues

Verification failure: `F32SSub0(signalling_NaN)` from `mjsunit/wasm/float-constant-folding.js`

Describe the bug
float-constant-folding.js fails to verify the result of F32Sub0(signalling_NaN)

To Reproduce
Steps to reproduce the behavior:

  1. Use the simulated build following instructions here
  2. Run test/program
out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/float-constant-folding.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --expose-wasm

To debug, use wasm2wat translator in https://github.com/webassembly/wabt to convert the test case to human-readable WASM format.

  1. See error
F32: sNaN - 0 = qNaN
test/mjsunit/mjsunit.js:315: Failure: expected <2145386496> found <2143289344>

Stack: MjsUnitAssertionError
    at assertEquals test/mjsunit/mjsunit.js 405:7
    at              test/mjsunit/wasm/float-constant-folding.js 18:3
    at              test/mjsunit/wasm/float-constant-folding.js 19:3
    throw new MjsUnitAssertionError(message);
    ^
MjsUnitAssertionError
    at assertEquals test/mjsunit/mjsunit.js 405:7
    at              test/mjsunit/wasm/float-constant-folding.js 18:3
    at              test/mjsunit/wasm/float-constant-folding.js 19:3

Expected behavior
When the test passes, it produces no error message.

Errors/Logs

Additional context

This bug may cause failures in other tests such as wasm/f32.js and wasm/f64.js.

Rebase on newer tag

With our current branch, we are no longer compatible with the version of buildtools that is fetched by v8. This will cause the following error:

FAILED: obj/v8_base_without_compiler/js-number-format.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/v8_base_without_compiler/js-number-format.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"n359864-04b9a46c-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_DEBUG=0 -DCR_LIBCXX_REVISION=375504 -DCR_SYSROOT_HASH=d6879d611f3dcf3da8dd92e080029394aa30bc42 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_MIPS_TARGET_SIMULATOR -DV8_TARGET_ARCH_RISCV64 -D__riscv_xlen=64 -DCAN_USE_FPU_INSTRUCTIONS -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DDEBUG -DV8_ENABLE_CHECKS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DV8_ENABLE_CHECKS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -I../.. -Igen -I../.. -Igen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../include -I../../third_party/zlib -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -mllvm -basic-aa-recphi=0 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c ../../src/objects/js-number-format.cc -o obj/v8_base_without_compiler/js-number-format.o
../../src/objects/js-number-format.cc:1227:15: error: no member named 'getAllFieldPositions' in 'icu_67::number::FormattedNumber'
    formatted.getAllFieldPositions(*fp_iter, status);
    ~~~~~~~~~ ^
1 error generated.

We currently avoid this by checking out an older version of buildtools.

internal error in test-code-generator/FuzzAssembleMove runned on hifive-unleashed failed

Describe the bug
Run test-code-generator/FuzzAssembleMove on hifive-unleashed failed, but Test pass on qemu.

To Reproduce

  1. Build with options riscv64.native.debug
  2. Run test/program ./cctest test-code-generator/FuzzAssembleMove --random-seed=658291538 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner
  3. See Fatal error

Expected behavior
Run test success.

Errors/Logs

#
# Fatal error in ../../test/cctest/compiler/test-code-generator.cc, line 796
# Expected: '0.423357 (kRepFloat32 stack slot)' but got 'nan (kRepFloat32 stack slot)'
#
#
#
#FailureMessage Object: 0x3fffbf7b78
==== C stack trace ===============================

    ./cctest(+0x31c2a4c) [0x2ad3254a4c]
    ./cctest(+0x313564c) [0x2ad31c764c]
    ./cctest(+0x2f30692) [0x2ad2fc2692]
    ./cctest(+0x8c199c) [0x2ad095399c]
    ./cctest(+0x8c6b84) [0x2ad0958b84]
    ./cctest(+0x8908f0) [0x2ad09228f0]
    ./cctest(+0x81c4b0) [0x2ad08ae4b0]
    /lib64/lp64d/libc.so.6(__libc_start_main+0xa6) [0x3fd76cd204]
    ./cctest(_start+0x2c) [0x2ad091f894]
Aborted (core dumped)

Additional context
Board:HIFIVE UNLEASHED
OS:Linux fedora-riscv-sifive 5.5.0-0.rc5.git0.1.1.riscv64.fc32.riscv64 #1 SMP Mon Jan 6 17:31:22 UTC 2020 riscv64 riscv64 riscv64 GNU/Linux

Enable fuzzer test cases

tools/run-tests.py --outdir=out.gn/mips64el.debug/ fuzzer does not run any tests.

There probably requires some setup to enable the fuzzer tests.

There is a bunch of buzzers under out/riscv/v8_simple_xxx_fuzzer. Please take a look at those too.

Review `SmiTag`

The current implementation shifts the value by 32-bits for a 64-bit architecture, which is based off of the MIPS implementation that does the same. This seems wrong. The ARM backend shifts the value by 1, as I would expect. Investigate this further.

internal error:test-icache.cc:line 163、118、188

Describe the bug
Run test case failed

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.native.release'
  2. Run test/program 'python2 ./tools/run-tests.py --outdir=./ cctest' on hifive unleashed
  3. See error

Expected behavior
not error occurs

Errors/Logs

=== cctest/test-icache/TestFlushICacheOfExecutable ===
#
# Fatal error in ../../test/cctest/test-icache.cc, line 163
# Check failed: 23 == f.Call(23) (23 vs. 87).
#
#
#
#FailureMessage Object: 0x3fffe06c88
=== cctest/test-icache/TestFlushICacheOfWritable ===
#
# Fatal error in ../../test/cctest/test-icache.cc, line 118
# Check failed: 23 == f.Call(23) (23 vs. 71).
#
#
#
#FailureMessage Object: 0x3fff9fbc88
=== cctest/test-icache/TestFlushICacheOfWritableAndExecutable ===
#
# Fatal error in ../../test/cctest/test-icache.cc, line 188
# Check failed: 23 == f.Call(23) (23 vs. 91).
#
#
#
#FailureMessage Object: 0x3fffe09c78

Additional context
None

Testing simulated build w/ stress-opt options

This work is to stress-test compilation and optimization for simulated build. With these flags, a lot more codes will be compiled (instead of going through the Ignition path).

the configuration is --stress-opt --always-opt, and it's available as a mode of the test runner. In file tools/testrunner/local/variants.py:

  "stress": [["--stress-opt", "--always-opt", "--no-liftoff",
              "--stress-lazy-source-positions"]],

and it can be chosen by added --variants=stress to the run-tests.py command line arguments

Let's test the simulate.debug build w/ stress tests and open issues for any additional failures from either normal simulated.debug build or normal simulated.release build.

You can also stress test simulated.release build and open issues for any additional failures.

Internal Error: not instance of in `test/mjsunit/mjsunit.js:15`

Describe the bug
Testcase throw not an instance of error

To Reproduce
Steps to reproduce the behavior:

  1. Build simulated release build (tools/dev/gm.py release.riscv64)
  2. Run test/program
out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/harmony/object-fromentries.js --random-seed=94924148 --nohard-abort --testing-d8-test-runner
  1. See error
/root/home/v8_root/v8/test/mjsunit/mjsunit.js:315: Object <Error(Error: IteratorClose must not be performed if IteratorStep throws)> is not an instance of <ThrewDuringIteratorNext> but of <Error>

Stack: MjsUnitAssertionError
    at assertThrows                         /root/home/v8_root/v8/test/mjsunit/mjsunit.js 510:7
    at Object.exceptionIfIteratorNextThrows /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 76:5
    at                                      /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 436:10
    throw new MjsUnitAssertionError(message);
    ^
MjsUnitAssertionError
    at assertThrows                         /root/home/v8_root/v8/test/mjsunit/mjsunit.js 510:7
    at Object.exceptionIfIteratorNextThrows /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 76:5
    at                                      /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 436:10

Expected behavior
No error message/log produced

Not Instance of Error: in `test/mjsunit/mjsunit.js:315`

Describe the bug
Running test/mjsunit/harmony/object-fromentries.js triggers a not instance of error

To Reproduce
Steps to reproduce the behavior:

  1. Build release build (see instructions here)
  2. Run program:
out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/harmony/object-fromentries.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner
  1. See error
============ Stress 1/5 ============
/root/home/v8_root/v8/test/mjsunit/mjsunit.js:315: Object <Error(Error: IteratorClose must not be performed if IteratorStep throws)> is not an instance of <ThrewDuringIteratorNext> but of <Error>

Stack: MjsUnitAssertionError
    at assertThrows                         /root/home/v8_root/v8/test/mjsunit/mjsunit.js 510:7
    at Object.exceptionIfIteratorNextThrows /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 76:5
    at                                      /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 436:10
    throw new MjsUnitAssertionError(message);
    ^
MjsUnitAssertionError
    at assertThrows                         /root/home/v8_root/v8/test/mjsunit/mjsunit.js 510:7
    at Object.exceptionIfIteratorNextThrows /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 76:5
    at                                      /root/home/v8_root/v8/test/mjsunit/harmony/object-fromentries.js 436:10

======== Full Deoptimization =======

Expected behavior
No error log shown

internal error:cctest/test-intl.cc:225

Describe the bug
Run test case failed

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.native.release'
  2. Run test/program 'python2 ./tools/run-tests.py --outdir=./ cctest' on hifive unleashed
  3. See error

Expected behavior
not error occurs

Errors/Logs

=== cctest/test-intl/GetAvailableLocales ===
#
# Fatal error in ../../test/cctest/test-intl.cc, line 225
# Check failed: locales.count("en-US").
#
#
#
#FailureMessage Object: 0x3fff966c78

Additional context
Add any other context about the problem here.

Refactor test-assembler-riscv64.cc and test-macro-assembler-riscv64.cc to use value-helper.h

  • Use value-helper.h to thoroughly tests all value ranges of RISCV assembler instructions. This approach will test all corner cases of RISC-V Assembly APIs, which can be especially useful for porting from simulated build to native build.

  • Refactor type names in the template (in_type, out_type, inout_type) to be more intuitive (e.g., operand_t, result_t)

  • Refactor the type arguments of mulhsu which multiplies signed w/ unsigned integer so the two operands should take a signed operand and an unsigned operand

internal error: cctest/test-run-machops.cc 2233

Describe the bug
Run test case failed

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.native.release'
  2. Run test/program 'python2 ./tools/run-tests.py --outdir=./ cctest' on hifive unleashed
  3. See error

Expected behavior
not error occurs

Errors/Logs

=== cctest/test-run-machops/RunUint32MulHighP ===
#
# Fatal error in ../../test/cctest/compiler/test-run-machops.cc, line 2233
# Check failed: expected == bt.call(bit_cast<int32_t>(i), bit_cast<int32_t>(j)) (-2 vs. 4294967294).
#
#
#
#FailureMessage Object: 0x3fffc05b88

Additional context
Add any other context about the problem here.

TurboAssembler API refactoring

Our turbo assembler APIs still follow the naming convention of the MIPS backend (e.g., Daddu). Should refactor to reflect RISCV instruction naming convention.

Enable `stop`, `break`, and `gdb` commands in the debugger in the RISCV simulator

Currently the built-in debugger ini the built-in riscv simulator (i.e., simulator-riscv64.cc does not yet support stop, break, gdb commands yet.

For stop and break, the problem seems to be that we cannot instructions in the generated code buffer to special ebreak or stop instruction due to some access permission issues.

gdb command is not yet supported because we need to understand better of the riscv gdb interface w/ native codes.

Verification failure: expected <55> found <28> (asm-wasm.js)

Describe the bug

Wrong result is produced when testing WASM function table features.

To Reproduce
Steps to reproduce the behavior:

  1. Build as simulated debug build following instructions here
  2. Run test/program
    out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/asm-wasm.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --validate-asm --allow-natives-syntax
  3. See error
Testing EmptyTest...
Testing VoidReturnTest...
Testing IntTest...
Testing Float64Test...
Testing TestReturnInBlock...
Testing TestAddSimple...
Testing TestWhileSimple...
Testing TestWhileWithoutBraces...
Testing TestReturnInWhile...
Testing TestReturnInWhileWithoutBraces...
Testing TestBreakInIf...
Testing TestBreakInIfInDoWhileFalse...
Testing TestBreakInElse...
Testing TestBreakInWhile...
Testing TestBreakInIfInWhile...
Testing TestBreakInNestedWhile...
Testing TestBreakInBlock...
Testing TestBreakInNamedWhile...
Testing TestContinue...
Testing TestContinueInNamedWhile...
Testing TestContinueInDoWhileFalse...
Testing TestContinueInForLoop...
Testing TestNot...
Testing TestNotEquals...
Testing TestUnsignedComparison...
Testing TestMixedAdd...
Testing TestConvertI32...
Testing TestConvertF64FromInt...
Testing TestConvertF64FromUnsigned...
Testing TestModInt...
Testing TestModUnsignedInt...
Testing TestModDouble...
Testing TestModDoubleNegative...
Testing TestForLoop...
Testing TestForLoopWithoutInit...
Testing TestForLoopWithoutCondition...
Testing TestForLoopWithoutNext...
Testing TestForLoopWithoutBody...
Testing TestDoWhile...
Testing TestConditional...
Testing TestInitFunctionWithNoGlobals...
Testing TestFunctionTableSingleFunction...
Testing TestFunctionTableMultipleFunctions...
TestFunctionTable...
test/mjsunit/mjsunit.js:315: Failure: expected <55> found <28>

Stack: MjsUnitAssertionError
    at assertEquals test/mjsunit/mjsunit.js 405:7
    at              test/mjsunit/wasm/asm-wasm.js 932:1
    at              test/mjsunit/wasm/asm-wasm.js 938:3
    throw new MjsUnitAssertionError(message);
    ^
MjsUnitAssertionError
    at assertEquals test/mjsunit/mjsunit.js 405:7
    at              test/mjsunit/wasm/asm-wasm.js 932:1
    at              test/mjsunit/wasm/asm-wasm.js 938:3

Expected behavior
No error message on TestFunctionTable if tests passes

Additional context
This may be the same error that causes poppler to fail?

Two other similar failures:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/compilation-hints-interpreter.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --experimental-wasm-compilation-hints --wasm-lazy-validation

Error output

testInterpreterCallsLazyFunctionInOtherInstance
testInterpreterCallsLazyBadFunctionInOtherInstance
testInterpreterCallsLazyFunctionThroughIndirection
/home/peng/projects/V8/v8-riscv/test/mjsunit/mjsunit.js:315: Failure: expected <99> found <24>

Stack: MjsUnitAssertionError
    at assertEquals                                       /home/peng/projects/V8/v8-riscv/test/mjsunit/mjsunit.js 405:7
    at testInterpreterCallsLazyFunctionThroughIndirection /home/peng/projects/V8/v8-riscv/test/mjsunit/wasm/compilation-hints-interpreter.js 84:3
    at                                                    /home/peng/projects/V8/v8-riscv/test/mjsunit/wasm/compilation-hints-interpreter.js 85:3
    throw new MjsUnitAssertionError(message);
    ^
MjsUnitAssertionError
    at assertEquals                                       /home/peng/projects/V8/v8-riscv/test/mjsunit/mjsunit.js 405:7
    at testInterpreterCallsLazyFunctionThroughIndirection /home/peng/projects/V8/v8-riscv/test/mjsunit/wasm/compilation-hints-interpreter.js 84:3

Another test

 out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-6196.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --validate-asm --allow-natives-syntax

Error output

test/mjsunit/mjsunit.js:315: Failure: expected <165> found <65>

Stack: MjsUnitAssertionError
    at assertEquals test/mjsunit/mjsunit.js 405:7
    at              test/mjsunit/regress/regress-6196.js 31:1
    throw new MjsUnitAssertionError(message);
    ^

Cleanup of remaining MIPS legacy

Use this issue to track all the remaining, smaller MacroAssembler refactoring items.

  1. Remove the "RV_" prefix for "RV_li"

This is the only remaining item in the refactoring task to remove "RV_" prefix. Need to rename TurboAssembler::li(..) to something else so that Assembler::RV_li after removing the RV_ prefix will not conflict w/ TurboAssembler API signature.

May consider to use TurboAssembler::Li(..) to follow other TurboAssembler naming convention. Also Assembler::li() may generate multiple RISCV instructions. Usually Assembler interfaces should only generate a single instruction, shall we move it to TurboAssembler instead?

  1. Remove Dlsa and Lsa APIs as they are legacies of MIPS instructions.

  2. Re-examine Mulh APIs, they also seem to come from MIPS legacy

  3. In code-generator-riscv64.cc some opcodes, e.g., kRiscvDaddu is named following MIPS instruction names, refactor them away following the convention described in #3.

Enable asm/ and wasm/ tests in mjsunit.status

Currently we skipped all wasm/ and asm/ tests under mjsunit.status.

This issue will individually skip failing asm and wasm test cases so that we can enable the rest of them in the CI.

There are also many tests in mjsunit.status being skipped for riscv because they are skipped by mips. Need to run these tests individually and unskip them if they pass fine.

Internal error: unimplemented code in assembler-riscv64-inl.h

Describe the bug
mjsunit/wasm/compiled-module-serialization.js triggers an internal assertion in assembler-riscv64-inl.h

To Reproduce
Steps to reproduce the behavior:

  1. Build with the simulated and debug build (as specified here)
  2. Run test/program
out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/compiled-module-serialization.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --expose-wasm --allow-natives-syntax --expose-gc
  1. See error
erializeAndDeserializeModule
DeserializeInvalidObject
RelationBetweenModuleAndClone
SerializeWrappersWithSameSignature
SerializeAfterInstantiation
SerializeAfterInstantiationWithMemory
GlobalsArePrivateBetweenClones
SharedTableTest
StackOverflowAfterSerialization
TrapAfterDeserialization
DirectCallAfterSerialization
ImportCallAfterSerialization
BranchTableAfterSerialization
#
# Fatal error in ../../src/codegen/riscv64/assembler-riscv64-inl.h, line 137
# unimplemented code
#
#
#
#FailureMessage Object: 0x7ffd24ce1c90
==== C stack trace ===============================

    out/riscv64.sim/d8(+0x1da4b83) [0x557760ca8b83]
    out/riscv64.sim/d8(+0x1da3bdd) [0x557760ca7bdd]
    out/riscv64.sim/d8(+0x1d9ae03) [0x557760c9ee03]
    out/riscv64.sim/d8(+0xf1b146) [0x55775fe1f146]
    out/riscv64.sim/d8(+0xd6049a) [0x55775fc6449a]
    out/riscv64.sim/d8(+0xf7c563) [0x55775fe80563]
    out/riscv64.sim/d8(+0xf7b5a0) [0x55775fe7f5a0]
    out/riscv64.sim/d8(+0xf8afb0) [0x55775fe8efb0]
    out/riscv64.sim/d8(+0xf8b482) [0x55775fe8f482]
    out/riscv64.sim/d8(+0x701896) [0x55775f605896]
    out/riscv64.sim/d8(+0x700403) [0x55775f604403]
    out/riscv64.sim/d8(+0x4d979c) [0x55775f3dd79c]
    out/riscv64.sim/d8(+0x4a32b0) [0x55775f3a72b0]
    out/riscv64.sim/d8(+0x4aee47) [0x55775f3b2e47]
    out/riscv64.sim/d8(+0x4b151e) [0x55775f3b551e]
    out/riscv64.sim/d8(+0x4b369b) [0x55775f3b769b]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f7814db3b97]
    out/riscv64.sim/d8(_start+0x2a) [0x55775f3a036a]
Received signal 6
Aborted (core dumped)

Expected behavior
No assert error if test passes successfully.

Additional context
None

Internal error: unimplemented code in diagnostics/perf-jit.h

Describe the bug
Testcase triggers unimplemented code in src/diagnostics/perf-jit.h

To Reproduce
Steps to reproduce the behavior:

  1. Use simulated debug build (see instructions here)
  2. Run test/program
out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/wasm/regress-1032753.js --random-seed=-812327453 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --perf-prof --perf-prof-delete-file
  1. See error
#
# Fatal error in ../../src/diagnostics/perf-jit.h, line 105
# unimplemented code
#

Expected behavior
No error message if test passes

Additional context
None

Rewrite `RV_li`

Originally, code in RV_li was copied from LLVM. Rewrite this code from scratch so that we can remove the LLVM license.

A internal error occurs in mjsunit/es6/promises by the latest code.

==== C stack trace ===============================
Describe the bug
Hi @fw-brice , the latest code(commit:6d9a4ef6ce25f09278828883ad26bb3b5812e19a) in riscv-porting-dev occurs internal error in mjsunit/es6/promises.

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.sim'
  2. Run test/program ./out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/promises.js --randomseed=1058420632 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
  3. See error
    `
[23:19|%  36|+ 1821|-   1]: mjsunit/es6/promises
=== mjsunit/es6/promises ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
#
# Fatal error in ../../src/codegen/safepoint-table.cc, line 62
# unreachable code
#
#
#
#FailureMessage Object: 0x7ffdbd921c00`

Expected behavior
A clear and concise description of what you expected to happen.

Errors/Logs
If applicable, copy/paste the errors or log messages here.

Additional context
Add any other context about the problem here.

Fatal Failure: Debug check failed in `codegen/riscv64/macro-assembler-riscv64.cc`

Describe the bug
Running test/mjsunit/regress/regress-1122.js triggers a fatal failure of Debug Check

To Reproduce
Steps to reproduce the behavior:

  1. Build with simulated and debug build (see instruction here)
  2. Run test/program
out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-1122.js --random-seed=-827882926 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner
  1. See error
============ Stress 1/2 ============
============ Stress 2/2 ============
#
# Fatal error in ../../src/codegen/riscv64/macro-assembler-riscv64.cc, line 3210
# Debug check failed: is_int12(drop * kPointerSize).
#
#
#
#FailureMessage Object: 0x7ffffba9b7a0

Expected behavior
A clear and concise description of what you expected to happen.

Errors/Logs
No other errors

Additional context
Other tests are also affected by this:

Test:
test/mjsunit/regress/wasm/regress-810973.js

Command:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/wasm/regress-810973.js --random-seed=-827882926 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner

Test:
test/mjsunit/regress/regress-353058.js

Command:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-353058.js --random-seed=-827882926 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --stack-size=150

Test:
test/mjsunit/regress/regress-492.js

Command:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-492.js --random-seed=-827882926 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner

Test:
test/mjsunit/regress/wasm/regress-810973b.js

Command:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/wasm/regress-810973b.js --random-seed=-827882926 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner

internal error: cctest/test-run-wasm-atomic

Describe the bug
Run test case failed

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.native.release'
  2. Run test/program 'python2 ./tools/run-tests.py --outdir=./ cctest' on hifive unleashed
  3. See error

Expected behavior
not error occurs

Errors/Logs

=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAdd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1403684).
#
#
#
#FailureMessage Object: 0x3fffea0928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAdd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 52163).
#
#
#
#FailureMessage Object: 0x3fffe0c978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAdd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 46).
#
#
#
#FailureMessage Object: 0x3fff9d4988
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAnd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffa96928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicCompareExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 113
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffdd78f8
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAnd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) (\x1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fff84a988
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicAnd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffbf7978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicCompareExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 156
# Check failed: initial == r.Call(i, j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fff9e8978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicCompareExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 135
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff88e8f8
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffbfa918
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffc0c978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3ffffd5978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicOr ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff88f928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicOr16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff932988
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicOr8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 87
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\x1 vs. '\0').
#
#
#
#FailureMessage Object: 0x3fffc57988
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicSub8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 87
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\xff vs. '\0').
#
#
#
#FailureMessage Object: 0x3fffaf4988
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicSub ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 4293747064).
#
#
#
#FailureMessage Object: 0x3fffa50928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicSub16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 43774).
#
#
#
#FailureMessage Object: 0x3fffd0a978
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicStoreParameter ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 304
# Check failed: 10 == r.Call(10) (10 vs. 4522580).
#
#
#
#FailureMessage Object: 0x3fffeda9c8
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicXor16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff984978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAdd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 4276534).
#
#
#
#FailureMessage Object: 0x3fffb14928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicXor ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff913928
=== cctest/test-run-wasm-atomics/RunWasmLiftoff_I32AtomicXor8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 87
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\x1 vs. '\0').
#
#
#
#FailureMessage Object: 0x3fffb7f988
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAdd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 120).
#
#
#
#FailureMessage Object: 0x3fffb7b978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAdd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 31525).
#
#
#
#FailureMessage Object: 0x3fff8a3978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAnd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffa0b978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAnd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3ffff2c928
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicCompareExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 135
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffeaf8f8
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicCompareExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 156
# Check failed: initial == r.Call(i, j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fffeca978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicCompareExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 113
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff9de8f8
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicAnd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) (\x1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffd4f978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffe1c978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffc81918
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicOr ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3ffff79928
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicOr8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fffa27988
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fff9c4978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicOr16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3ffffd4978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicSub ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 4294936098).
#
#
#
#FailureMessage Object: 0x3fffdef928
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicSub16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 49247).
#
#
#
#FailureMessage Object: 0x3fff89d978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicStoreParameter ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 304
# Check failed: 10 == r.Call(10) (10 vs. 17535450).
#
#
#
#FailureMessage Object: 0x3ffff399c8
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicSub8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 87
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\xff vs. '\0').
#
#
#
#FailureMessage Object: 0x3ffff53978
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicXor ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 30
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffdb5928
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicXor16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffcc3978
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAdd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 86
# Check failed: initial == r.Call(j) (0 vs. 65010).
#
#
#
#FailureMessage Object: 0x3fffd65998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAdd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1157974).
#
#
#
#FailureMessage Object: 0x3fffd24928
=== cctest/test-run-wasm-atomics/RunWasmTurbofan_I32AtomicXor8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics.cc, line 85
# Check failed: initial == r.Call(j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fffbb3978
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I32AtomicCompareExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 206
# Check failed: initial == r.Call(i, j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3fffc4f998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAddConvertDrop ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 459
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (2459584641779389781 vs. 12297848147757808847).
#
#
#
#FailureMessage Object: 0x3fff9749b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAdd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 116
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\x1 vs. '\0').
#
#
#
#FailureMessage Object: 0x3fff878998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAddDrop ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 376
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (2459584641779389781 vs. 2459584641779339114).
#
#
#
#FailureMessage Object: 0x3ffffee9a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAdd32U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 57
# Check failed: initial == r.Call(j) (0 vs. 159828).
#
#
#
#FailureMessage Object: 0x3fff9c0918
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAddUseOnlyLowWord ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 737
# Check failed: 0x90abcdef == r.Call() (2427178479 vs. 2427669733).
#
#
#
#FailureMessage Object: 0x3fffc649b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAnd16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 86
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffd89998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAnd8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 114
# Check failed: initial == r.Call(j) (\x1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffa6c998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAnd32U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 57
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffad4918
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicAnd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 28
# Check failed: initial == r.Call(j) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffb18928
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicCompareExchange32U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 164
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff88f8e8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicCompareExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 142
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffb328f8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicCompareExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 186
# Check failed: initial == r.Call(i, j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3ffffbe988
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexAdd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 913123828).
#
#
#
#FailureMessage Object: 0x3ffffba9a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexAnd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 858980352).
#
#
#
#FailureMessage Object: 0x3fffb5e9a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexAddNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (2863320268 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffbc59a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexAndNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (858980352 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffab79a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexOrNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (2004339916 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffc729a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexExchangeNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (2004322440 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffec5998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 2004322440).
#
#
#
#FailureMessage Object: 0x3ffff629a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexOr ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 2004339916).
#
#
#
#FailureMessage Object: 0x3fffd7c9a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexXor ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 1145359564).
#
#
#
#FailureMessage Object: 0x3fff8389a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexXorNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (1145359564 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffb189a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexSubNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 540
# Check failed: static_cast<uint32_t>(op(initial, local)) == static_cast<uint32_t>(r.builder().ReadMemory(&memory[0])) (3149642684 vs. 858997828).
#
#
#
#FailureMessage Object: 0x3fffa979a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConstIndexSub ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 539
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 3550054092).
#
#
#
#FailureMessage Object: 0x3ffffc69a8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertAnd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 493
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 286326784).
#
#
#
#FailureMessage Object: 0x3fff8ca9b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertOr ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 493
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 859002197).
#
#
#
#FailureMessage Object: 0x3fffcd99b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 493
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 286331153).
#
#
#
#FailureMessage Object: 0x3fff9b79b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertCompareExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 518
# Check failed: static_cast<uint32_t>(initial) == r.Call(initial, local) (858997828 vs. 286331153).
#
#
#
#FailureMessage Object: 0x3fffc33968
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertAdd ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 493
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 572657745).
#
#
#
#FailureMessage Object: 0x3fffbbe9b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertXor ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 495
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (56294709024085 vs. 1229801703532086340).
#
#
#
#FailureMessage Object: 0x3fffc229b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff88a918
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicConvertSub ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 493
# Check failed: static_cast<uint32_t>(initial) == r.Call(local) (858997828 vs. 286349748).
#
#
#
#FailureMessage Object: 0x3ffff179b8
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicExchange16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 86
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fff929998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicExchange8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 114
# Check failed: initial == r.Call(j) ('\0' vs. 1).
#
#
#
#FailureMessage Object: 0x3ffff28998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicExchange32U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 59
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (1 vs. 0).
#
#
#
#FailureMessage Object: 0x3fffe05918
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicOr ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 28
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3fffadb928
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicNonConstIndexCompareExchangeNarrow ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 575
# Check failed: static_cast<uint16_t>(CompareExchange(initial, initial, local)) == static_cast<uint16_t>(r.builder().ReadMemory(&memory[0])) (26214 vs. 13879).
#
#
#
#FailureMessage Object: 0x3fffada958
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicOr16U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 86
# Check failed: initial == r.Call(j) (0 vs. 1).
#
#
#
#FailureMessage Object: 0x3ffff7f998
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicNonConstIndexCompareExchange ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 593
# Check failed: static_cast<uint32_t>(initial) == r.Call(initial, local) (4243535415 vs. 2004313702).
#
#
#
#FailureMessage Object: 0x3fffb48958
=== cctest/test-run-wasm-atomics64/RunWasmLiftoff_I64AtomicOr8U ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-atomics64.cc, line 116
# Check failed: expected == r.builder().ReadMemory(&memory[0]) (\x1 vs. '\0').
#
#
#
#FailureMessage Object: 0x3fffcd5998

Additional context
Add any other context about the problem here.

Internal error: unreachable code in `codegen/safepoint-table.cc`

Describe the bug
Running mjsunit/es6/block-conflicts-sloppy.js triggers an internal error of unreachable code

To Reproduce
Steps to reproduce the behavior:

  1. Build with simulated and debug build (see instruction here)
  2. Run test/program
out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/block-conflicts-sloppy.js --random-seed=1881563104 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --validate-asm --allow-natives-syntax
  1. See error
#
# Fatal error in ../../src/codegen/safepoint-table.cc, line 62
# unreachable code
#
#
#
#FailureMessage Object: 0x7ffefb8d51d0

Expected behavior
No assert errors or other error messages if test passes.

Additional context

Another test fails in a similar way.

To reproduce:

out/riscv64.sim/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/shared-memory-gc-stress.js --random-seed=-1611652631 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner

Output:

iteration 6125
iteration 6150
iteration 6175
#
# Fatal error in ../../src/codegen/safepoint-table.cc, line 62
# unreachable code
#
#
#
#FailureMessage Object: 0x7fff56b5f230

RV32 backend

Dev branch:

Status:

  • RV32 simulator
  • RV32IM cctests

TODO:

  • RV32 compiler
  • RV32A
  • re-enabling RV64 testcases

Fatal error: unreachable code in ` , line 0`

Describe the bug
Running test/intl/date-format/format-range.js triggers an internal error

To Reproduce
Steps to reproduce the behavior:

  1. Build release build (see instructions here)
  2. Run program:
out/riscv64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/date-format/format-range.js --random-seed=-819243071 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax
  1. See error
=== intl/date-format/format-range ===
============ Stress 1/5 ============
============ Stress 2/5 ============
============ Stress 3/5 ============
============ Stress 4/5 ============
============ Stress 5/5 ============
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0x7ffc90639100

Expected behavior
No error messages
Errors/Logs
Full stack trace:

==== C stack trace ===============================

    /root/home/v8_root/v8/out/riscv64.release/d8(v8::base::debug::StackTrace::StackTrace()+0x13) [0x5580bd6f75b3]
    /root/home/v8_root/v8/out/riscv64.release/d8(+0x12bcbad) [0x5580bd6f6bad]
    /root/home/v8_root/v8/out/riscv64.release/d8(V8_Fatal(char const*, ...)+0x150) [0x5580bd6f1290]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::SafepointTable::FindEntry(unsigned long) const+0xc4) [0x5580bcc30d54]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Code::GetSafepointEntry(unsigned long)+0x50) [0x5580bce1bb10]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::OptimizedFrame::GetDeoptimizationData(int*) const+0xcb) [0x5580bcc93ffb]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::OptimizedFrame::Summarize(std::__1::vector<v8::internal::FrameSummary, std::__1::allocator<v8::internal::FrameSummary> >*) const+0x76) [0x5580bcc93926]
    /root/home/v8_root/v8/out/riscv64.release/d8(+0x86003a) [0x5580bcc9a03a]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Isolate::CaptureAndSetSimpleStackTrace(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::FrameSkipMode, v8::internal::Handle<v8::internal::Object>)+0x62) [0x5580bcc9a7a2]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::ErrorUtils::Construct(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::FrameSkipM$
de, v8::internal::Handle<v8::internal::Object>, v8::internal::ErrorUtils::StackTraceCollection)+0xca) [0x5580bccad26a]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::ErrorUtils::MakeGenericError(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::MessageTemplate, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::inter$
al::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::FrameSkipMode)+0x166) [0x5580bccad536]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Factory::NewError(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::MessageTemplate, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal:[10/1790]
8::internal::Object>)+0x4f) [0x5580bccd045f]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Object v8::internal::DateTimeFormatRange<v8::internal::JSArray>(v8::internal::BuiltinArguments, v8::internal::Isolate*, char const*, v8::internal::MaybeHandle<v8::internal::JSArray> (*)(v8::internal::Isolate
*, v8::internal::Handle<v8::internal::JSDateTimeFormat>, double, double))+0x185) [0x5580bcbf9e85]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Builtin_DateTimeFormatPrototypeFormatRange(int, unsigned long*, v8::internal::Isolate*)+0x4d) [0x5580bcbeae0d]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Simulator::SoftwareInterrupt()+0x4c3) [0x5580bd1b6f83]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Simulator::InstructionDecode(v8::internal::Instruction*)+0x1d0) [0x5580bd1b57a0]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Simulator::Execute()+0xab) [0x5580bd1be93b]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Simulator::CallInternal(unsigned long)+0xab) [0x5580bd1bea4b]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Simulator::CallImpl(unsigned long, int, long const*)+0x294) [0x5580bd1bee44]
    /root/home/v8_root/v8/out/riscv64.release/d8(+0x8538ab) [0x5580bcc8d8ab]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*)+0xf6) [0x5580bcc8cbf6]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::Script::Run(v8::Local<v8::Context>)+0x273) [0x5580bcb5afc3]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::Value>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue)+0x5f9) [0x5580bcb34299]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::SourceGroup::Execute(v8::Isolate*)+0x24a) [0x5580bcb3ee9a]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::Shell::RunMain(v8::Isolate*, int, char**, bool)+0x257) [0x5580bcb418c7]
    /root/home/v8_root/v8/out/riscv64.release/d8(v8::Shell::Main(int, char**)+0xd19) [0x5580bcb43299]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fc61558ab97]
    /root/home/v8_root/v8/out/riscv64.release/d8(_start+0x2a) [0x5580bcb2f7aa]

Additional context
There are additional tests that also have this error

Test:
test-api/InternalFieldsSubclassing

Command:

out/riscv64.release/cctest test-api/InternalFieldsSubclassing --random-seed=1724000608 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/message/wasm-finish-compilation.js

Command:

out/riscv64.release/d8 --test test/message/wasm-finish-compilation.js --random-seed=-1663505519 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --no-stress-opt

Test:
test/inspector/debugger/max-async-call-chain-depth.js

Command:

out/riscv64.release/inspector-test test/inspector/protocol-test.js test/inspector/debugger/max-async-call-chain-depth.js --random-seed=-345118250 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/debugger/debug/debug-enable-disable-breakpoints.js

Command:

 out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/debug-enable-disable-breakpoints.js --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --enable-inspector --allow-natives-syntax

Test:
test/debugger/debug/debug-receiver.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/debug-receiver.js --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --enable-inspector --allow-natives-syntax

Test:
test/debugger/debug/debug-step-3.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/debug-step-3.js --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --enable-inspector --allow-natives-syntax

Test:
test/debugger/debug/es8/async-debug-builtin-predictions.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/es8/async-debug-builtin-predictions.js --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --enable-inspector --allow-natives-syntax

Test:
test/debugger/debug/harmony/modules-debug-scopes1.mjs

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/harmony/modules-debug-scopes1.mjs --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax --noanalyze-environment-liveness --enable-inspector --allow-natives-syntax

Test:
test/debugger/debug/side-effect/debug-evaluate-no-side-effect-builtins.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/debugger/test-api.js test/debugger/debug/side-effect/debug-evaluate-no-side-effect-builtins.js --random-seed=2018349753 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --no-enable-one-shot-optimization --enable-inspector --allow-natives-syntax

Test:
test/mjsunit/wasm/grow-memory.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/grow-memory.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --expose-wasm --stress-compaction

Test:
test/mjsunit/array-push8.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/array-push8.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax

Test:
test/mjsunit/messages.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/messages.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax --stack-size=100 --harmony

Test:
test/mjsunit/es6/default-parameters.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/default-parameters.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/es6/reflect-apply.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/reflect-apply.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/es6/reflect-construct.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/reflect-construct.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-unsafe-function-constructor

Test:
test/mjsunit/es6/super.js

Command:

 out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/super.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax

Test:
test/mjsunit/es6/typedarray.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/es6/typedarray.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax

Test:
test/mjsunit/harmony/atomics.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/harmony/atomics.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --harmony-sharedarraybuffer

Test:
test/mjsunit/regress/regress-145201.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-145201.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/regress/regress-3926.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-3926.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/regress/regress-4815.js

Command:

 out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-4815.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/regress/regress-crbug-706642.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-crbug-706642.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --allow-natives-syntax

Test:
test/mjsunit/regress/regress-crbug-981701.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/regress-crbug-981701.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --throws --enable-lazy-source-positions --stress-lazy-source-positions

Test:
test/mjsunit/regress/wasm/regress-02862.js
Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/wasm/regress-02862.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --random-seed=1557792826 --expose-gc --invoke-weak-callbacks --omit-quit --gc-interval=469 --validate-asm

Test:
test/mjsunit/regress/wasm/regress-02862.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/regress/wasm/regress-02862.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --random-seed=1557792826 --expose-gc --invoke-weak-callbacks --omit-quit --gc-interval=469 --validate-asm

Test:
test/mjsunit/wasm/atomics.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/atomics.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --experimental-wasm-threads

Test:
test/mjsunit/wasm/globals.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/globals.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --expose-wasm

Test:
test/mjsunit/wasm/mutable-globals.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/mutable-globals.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner

Test:
test/mjsunit/wasm/unicode-validation.js

Command:

out/riscv64.release/d8 --test test/mjsunit/mjsunit.js test/mjsunit/wasm/unicode-validation.js --random-seed=-534112441 --stress-opt --always-opt --no-liftoff --stress-lazy-source-positions --nohard-abort --testing-d8-test-runner --expose-wasm

internal error: cctest/test-run-wasm-64.cc:753 821

Describe the bug
Run test case failed

To Reproduce
Steps to reproduce the behavior:

  1. Build with options 'riscv64.native.release'
  2. Run test/program 'python2 ./tools/run-tests.py --outdir=./ cctest' on hifive unleashed
  3. See error

Expected behavior
not error occurs

Errors/Logs

=== cctest/test-run-wasm-64/RunWasmLiftoff_I64SConvertSatF32 ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-64.cc, line 753
# Check failed: expected == found (-9223372036854775808 vs. 9223372036854775807).
#
#
#
#FailureMessage Object: 0x3fffa7f928
=== cctest/test-run-wasm-64/RunWasmLiftoff_I64UConvertSatF32 ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-64.cc, line 821
# Check failed: expected == found (0 vs. 18446744073709551615).
#
#
#
#FailureMessage Object: 0x3fff8eb928
=== cctest/test-run-wasm-64/RunWasmTurbofan_I64SConvertSatF32 ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-64.cc, line 753
# Check failed: expected == found (-9223372036854775808 vs. 9223372036854775807).
#
#
#
#FailureMessage Object: 0x3fffdab928
=== cctest/test-run-wasm-64/RunWasmTurbofan_I64UConvertSatF32 ===
#
# Fatal error in ../../test/cctest/wasm/test-run-wasm-64.cc, line 821
# Check failed: expected == found (0 vs. 18446744073709551615).
#
#
#
#FailureMessage Object: 0x3fff825928

Additional context
Add any other context about the problem here.

Improve analyze.py tool

This tool is currently very fragile. It could be improved by parsing the file using a Lark grammar.

Remove the patch step

In our current build instructions, users are required to manually patch some code in the build directory, because it comes from another repository. The correct solution would be to also fork this repository and have users pull our changes from the fork.

Add a few CI buildbots to speed up build speed.

There are lots of CI cloud services for github repos, many of them provide free service for open projects. But as we may noticed, they are slow, sometimes very very slow.

v8-riscv/v8 may need some CI infra itself, which new buildbots are needed.

IIRC github provides some hooks for services to be triggered, and then our buildbots would be started.

I'd have a try.

Enable more wasm-spec-tests

There is a large discrepency between tests run by the arm64.simulated build and riscv64.simulated.debug build that cannot be completely accounted for by known failures in f32 and f64 tests.

build tests passed run rate
arm64.simulated 203 49%
riscv64.simulated.debug 85 44%

Need to investigate wasm-spec-tests.status to run all the skipped tests for riscv64 and see if we can enable more tests or identify new issues.

Since our backend is closest to mips64 backend, please add mips64 run-rate and test passed stats to the table as well.

Compilation Error: test/cctest/test-macro-assembler-riscv64.cc:1480:9

Describe the bug
Running tools/dev/gm.py riscv64.check will result a compiler error for the file v8/test/cctesttest-macro-assembler-riscv64.cc.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure riscv64.release/ is in out/ i.e. ($V8_ROOT/v8/out/riscv64.release/). If it exists go to step 3.
  2. If it has not then in $V8_ROOT/v8 run
    tools/dev/gm.py riscv64.release
  3. Run the program
    tools/dev/gm.py riscv64.check

Expected behavior
Expect for the compilation to pass and tests to start running

Errors/Logs

FAILED: obj/test/cctest/cctest_sources/test-macro-assembler-riscv64.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/test/cctest/cctest_sources/test-macro-assembler-riscv64.o.d -DV8_INTL_SUPPORT -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"n359864-04b9a46c-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -DCR_SYSROOT_HASH=d6879d611f3dcf3da8dd92e080029394aa30bc42 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_MIPS_TARGET_SIMULATOR -DV8_TARGET_ARCH_RISCV64 -D__riscv_xlen=64 -DCAN_USE_FPU_INSTRUCTIONS -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -I../.. -Igen -I../../include -Igen/include -I../.. -Igen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../include -I../../tools/debug_helper -ffp-contract=off -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -mllvm -basic-aa-recphi=0 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wmax-tokens -fno-omit-frame-pointer -g0 -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -c ../../test/cctest/test-macro-assembler-riscv64.cc -o obj/test/cctest/cctest_sources/test-macro-assembler-riscv64.o
../../test/cctest/test-macro-assembler-riscv64.cc:1480:9: error: unused variable 'error' [-Werror,-Wunused-variable]
  Label error, done;
        ^
1 error generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.