riscv-collab / v8

Port of Google v8 engine to RISC-V.
https://github.com/v8-riscv/v8/wiki
Other
238 stars 31 forks source link

cctest test-code-generator/Regress_1171759 fails on native test mode #667

Closed qjivy closed 2 years ago

qjivy commented 2 years ago

cmd line:

out/riscv32.native.release/cctest test-code-generator/Regress_1171759 --random-seed=1418596419 --nohard-abort --testing-d8-test-runner
luyahan commented 2 years ago
luyahan@plct-dev-7:~/v8/v8/out/riscv32.debug $ ./cctest test-code-generator/Regress_1171759 --random-seed=1418596419 --nohard-abort --testing-d8-test-runner --riscv_trap_to_simulator_debugger --print-code --code-comments
--- Code ---
kind = WASM_FUNCTION
name = testing
compiler = turbofan
address = 0x30c04001

Instructions (size = 64)
                  [ Frame: MANUAL
                  -- B0 start (construct frame) (deconstruct frame) --
                  [  StubPrologue(info()->GetOutputStackFrameType());
                    [ StubPrologue
0x30c04040     0  00800e13       li        t3, 8
0x30c04044     4  ff410113       addi      sp, sp, -12
0x30c04048     8  00112423       sw        ra, 8(sp)
0x30c0404c     c  00812223       sw        fp, 4(sp)
0x30c04050    10  01c12023       sw        t3, 0(sp)
0x30c04054    14  00410413       addi      fp, sp, 4
                    ]
                  ]
                  [  Push(kWasmInstanceRegister);
0x30c04058    18  ffc10113       addi      sp, sp, -4
0x30c0405c    1c  00a12023       sw        a0, 0(sp)
                  ]
                  [  li(dst, Operand(src.ToInt32()));
0x30c04060    20  00000513       mv        a0, zero_reg
                  ]
                  [  Sw(dst, g.ToMemOperand(destination));
                  ]
                    [ AssembleReturn
                  [  bind(&return_label_);
                  ]
                  [  Move(sp, fp);
0x30c04064    24  00040113       mv        sp, fp
                  ]
                  [  Pop(ra, fp);
0x30c04068    28  00012403       lw        fp, 0(sp)
0x30c0406c    2c  00412083       lw        ra, 4(sp)
0x30c04070    30  00810113       addi      sp, sp, 8
                  ]
                  [  Drop(parameter_slots + additional_count);
0x30c04074    34  05810113       addi      sp, sp, 88
                  ]
                  [  Ret();
0x30c04078    38  00008067       ret
                  ]
                    ]
                  -- B1 start (no frame) --
0x30c0407c    3c  00000013       nop

Safepoints (entries = 0, byte size = 8)

RelocInfo (size = 0)

--- End code ---
--- WebAssembly code ---
name: anonymous function
kind: wasm function
compiler: TurboFan
Body (size = 896 = 866 + 30 padding)
Instructions (size = 64)
                  [ Frame: MANUAL
                  -- B0 start (construct frame) (deconstruct frame) --
                  [  StubPrologue(info()->GetOutputStackFrameType());
                    [ StubPrologue
0x112356a0     0  00800e13       li        t3, 8
0x112356a4     4  ff410113       addi      sp, sp, -12
0x112356a8     8  00112423       sw        ra, 8(sp)
0x112356ac     c  00812223       sw        fp, 4(sp)
0x112356b0    10  01c12023       sw        t3, 0(sp)
0x112356b4    14  00410413       addi      fp, sp, 4
                    ]
                  ]
                  [  Push(kWasmInstanceRegister);
0x112356b8    18  ffc10113       addi      sp, sp, -4
0x112356bc    1c  00a12023       sw        a0, 0(sp)
                  ]
                  [  li(dst, Operand(src.ToInt32()));
0x112356c0    20  00000513       mv        a0, zero_reg
                  ]
                  [  Sw(dst, g.ToMemOperand(destination));
                  ]
                    [ AssembleReturn
                  [  bind(&return_label_);
                  ]
                  [  Move(sp, fp);
0x112356c4    24  00040113       mv        sp, fp
                  ]
                  [  Pop(ra, fp);
0x112356c8    28  00012403       lw        fp, 0(sp)
0x112356cc    2c  00412083       lw        ra, 4(sp)
0x112356d0    30  00810113       addi      sp, sp, 8
                  ]
                  [  Drop(parameter_slots + additional_count);
0x112356d4    34  05810113       addi      sp, sp, 88
                  ]
                  [  Ret();
0x112356d8    38  00008067       ret
                  ]
                    ]
                  -- B1 start (no frame) --
0x112356dc    3c  00000013       nop

Safepoints (entries = 0, byte size = 8)

RelocInfo (size = 0)

--- End code ---
--- Code ---
kind = FOR_TESTING
name = testing
compiler = turbofan
address = 0x30c043c1

Instructions (size = 348)
                  [ Frame: MANUAL
                  -- B0 start (construct frame) (deconstruct frame) --
                  [  Push(ra, fp);
0x30c04400     0  ff810113       addi      sp, sp, -8
0x30c04404     4  00112223       sw        ra, 4(sp)
0x30c04408     8  00812023       sw        fp, 0(sp)
                  ]
                  [  Move(fp, sp);
0x30c0440c     c  00010413       mv        fp, sp
                  ]
                  [  MultiPushFPU(saves_fpu);
0x30c04410    10  fa010113       addi      sp, sp, -96
0x30c04414    14  05b13c27       fsd       fs11, 88(sp)
0x30c04418    18  05a13827       fsd       fs10, 80(sp)
0x30c0441c    1c  05913427       fsd       fs9, 72(sp)
0x30c04420    20  05813027       fsd       fs8, 64(sp)
0x30c04424    24  03713c27       fsd       fs7, 56(sp)
0x30c04428    28  03613827       fsd       fs6, 48(sp)
0x30c0442c    2c  03513427       fsd       fs5, 40(sp)
0x30c04430    30  03413027       fsd       fs4, 32(sp)
0x30c04434    34  01313c27       fsd       fs3, 24(sp)
0x30c04438    38  01213827       fsd       fs2, 16(sp)
0x30c0443c    3c  00913427       fsd       fs1, 8(sp)
0x30c04440    40  00813027       fsd       fs0, 0(sp)
                  ]
                  [  MultiPush(saves);
0x30c04444    44  fd410113       addi      sp, sp, -44
0x30c04448    48  03b12423       sw        s11, 40(sp)
0x30c0444c    4c  03a12223       sw        s10, 36(sp)
0x30c04450    50  03912023       sw        s9, 32(sp)
0x30c04454    54  01812e23       sw        s8, 28(sp)
0x30c04458    58  01712c23       sw        s7, 24(sp)
0x30c0445c    5c  01612a23       sw        s6, 20(sp)
0x30c04460    60  01512823       sw        s5, 16(sp)
0x30c04464    64  01412623       sw        s4, 12(sp)
0x30c04468    68  01312423       sw        s3, 8(sp)
0x30c0446c    6c  01212223       sw        s2, 4(sp)
0x30c04470    70  00912023       sw        s1, 0(sp)
                  ]
0x30c04474    74  5adfbb37       lui       s6, 0x5adfb       ;; external reference (Isolate::isolate_root())
0x30c04478    78  550b0b13       addi      s6, s6, 1360
                  [  Sub(sp, sp, Operand(i.InputInt32(0)));
0x30c0447c    7c  fac10113       addi      sp, sp, -84
                  ]
                  [  LoadFPRImmediate(dst, src.ToFloat64().value());
                    [ LoadFPRImmediate
0x30c04480    80  d2000853       fcvt.d.w  fa6, zero_reg
                    ]
                  ]
0x30c04484    84  01013027       fsd       fa6, 0(sp)
0x30c04488    88  01013427       fsd       fa6, 8(sp)
0x30c0448c    8c  01013827       fsd       fa6, 16(sp)
0x30c04490    90  01013c27       fsd       fa6, 24(sp)
0x30c04494    94  03013027       fsd       fa6, 32(sp)
0x30c04498    98  03013427       fsd       fa6, 40(sp)
0x30c0449c    9c  03013827       fsd       fa6, 48(sp)
0x30c044a0    a0  03013c27       fsd       fa6, 56(sp)
0x30c044a4    a4  05013027       fsd       fa6, 64(sp)
                  [  LoadFPRImmediate(dst, src.ToFloat32());
                    [ LoadFPRImmediate
0x30c044a8    a8  f00000d3       fmv.w.x   ft1, zero_reg
                    ]
                  ]
0x30c044ac    ac  04112427       fsw       ft1, 72(sp)
0x30c044b0    b0  05013827       fsd       fa6, 80(sp)
                  [  li(dst, Operand(src.ToInt32()));
0x30c044b4    b4  112355b7       lui       a1, 0x11235
0x30c044b8    b8  6a058593       addi      a1, a1, 1696
                  ]
                  [  Sw(dst, g.ToMemOperand(destination));
                  ]
                  [  li(dst, Operand(src.ToInt32()));
0x30c044bc    bc  00000513       mv        a0, zero_reg
                  ]
                  [  Sw(dst, g.ToMemOperand(destination));
                  ]
                  [  Move(dst, src);
0x30c044c0    c0  23080553       fmv.d     fa0, fa6
                  ]
                  [  Move(dst, src);
0x30c044c4    c4  230805d3       fmv.d     fa1, fa6
                  ]
                  [  Move(dst, src);
0x30c044c8    c8  23080653       fmv.d     fa2, fa6
                  ]
                  [  Move(dst, src);
0x30c044cc    cc  230806d3       fmv.d     fa3, fa6
                  ]
                  [  Move(dst, src);
0x30c044d0    d0  23080753       fmv.d     fa4, fa6
                  ]
                  [  Move(dst, src);
0x30c044d4    d4  230807d3       fmv.d     fa5, fa6
                  ]
                  [  Add(t6, i.InputOrZeroRegister(0), 0);
0x30c044d8    d8  00058f93       mv        t6, a1
                  ]
                  [  Call(t6);
0x30c044dc    dc  000f80e7       jalr      t6
                  ]
                    [ AssembleReturn
                  [  MultiPop(saves);
0x30c044e0    e0  00012483       lw        s1, 0(sp)
0x30c044e4    e4  00412903       lw        s2, 4(sp)
0x30c044e8    e8  00812983       lw        s3, 8(sp)
0x30c044ec    ec  00c12a03       lw        s4, 12(sp)
0x30c044f0    f0  01012a83       lw        s5, 16(sp)
0x30c044f4    f4  01412b03       lw        s6, 20(sp)
0x30c044f8    f8  01812b83       lw        s7, 24(sp)
0x30c044fc    fc  01c12c03       lw        s8, 28(sp)
0x30c04500   100  02012c83       lw        s9, 32(sp)
0x30c04504   104  02412d03       lw        s10, 36(sp)
0x30c04508   108  02812d83       lw        s11, 40(sp)
0x30c0450c   10c  02c10113       addi      sp, sp, 44
                  ]
                  [  MultiPopFPU(saves_fpu);
0x30c04510   110  00013407       fld       fs0, 0(sp)
0x30c04514   114  00813487       fld       fs1, 8(sp)
0x30c04518   118  01013907       fld       fs2, 16(sp)
0x30c0451c   11c  01813987       fld       fs3, 24(sp)
0x30c04520   120  02013a07       fld       fs4, 32(sp)
0x30c04524   124  02813a87       fld       fs5, 40(sp)
0x30c04528   128  03013b07       fld       fs6, 48(sp)
0x30c0452c   12c  03813b87       fld       fs7, 56(sp)
0x30c04530   130  04013c07       fld       fs8, 64(sp)
0x30c04534   134  04813c87       fld       fs9, 72(sp)
0x30c04538   138  05013d07       fld       fs10, 80(sp)
0x30c0453c   13c  05813d87       fld       fs11, 88(sp)
0x30c04540   140  06010113       addi      sp, sp, 96
                  ]
                  [  Move(sp, fp);
0x30c04544   144  00040113       mv        sp, fp
                  ]
                  [  Pop(ra, fp);
0x30c04548   148  00012403       lw        fp, 0(sp)
0x30c0454c   14c  00412083       lw        ra, 4(sp)
0x30c04550   150  00810113       addi      sp, sp, 8
                  ]
                  [  Drop(parameter_slots + additional_count);
                  ]
                  [  Ret();
0x30c04554   154  00008067       ret
                  ]
                    ]
                  -- B1 start (no frame) --
0x30c04558   158  00000013       nop