riscv-software-src / riscv-tests

Other
906 stars 463 forks source link

strange behaviors in div.S #550

Closed qian160 closed 7 months ago

qian160 commented 7 months ago

I don't know if I've found some bugs, but in isa/rv64um/div.S:

  TEST_RR_OP( 7, div, -1<<63, -1<<63, -1 );
  TEST_RR_OP( 8, div, -1, -1<<63, 0 );
  TEST_RR_OP( 9, div, -1,      1, 0 );

These codes below don't seem to work correctly. For example, TEST_9 is trying to assert 1 / -1 == 0, which makes me confused. Or maybe I've got things wrong.