Hi all:

I have this source line in my modified or1200 test suite:

  // Subtract a large negative from a large positive number. Should set
  // both the overflow and carry flags.
TEST_INST_FF_I32_I32 0, SPR_SR_CY | SPR_SR_OV, l.sub, 0x7fffffff, 0x80000000

which translates into the following pseudo-instructions:

  set carry flag
  set overflow flag
  l.sub 0x7fffffff, 0x80000000

When run against or1ksim, it generates the following results:

  0xffffffff, carry flag set, overflow flag set

However, it looks different when run against ORPSoC V2's or1200 RTL model (simulated with Icarus Verilog):

  0xffffffff, carry flag set, _NO_ overflow flag

I'm having similar issues with the multiply instructions, many carry and overflow flags are different. I wonder if I've made a mistake somewhere. Or are we really so lucky that nobody has ever noticed?

Thanks,
  rdiez
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to