yield from self.svstate_pre_inc()
pre = yield from self.update_new_svstate_steps()
if pre:
+ # reset at end of loop including exit Vertical Mode
log ("SVSTATE_NEXT: end of loop, reset")
self.svp64_reset_loop()
+ self.msr[MSRb.SVF] = 0
self.update_nia()
- results = [SelectableInt(0, 64)]
- self.handle_comparison(results) # CR0
+ if rc_en:
+ results = [SelectableInt(0, 64)]
+ self.handle_comparison(results) # CR0
else:
log ("SVSTATE_NEXT: post-inc")
srcstep, dststep = self.new_srcstep, self.new_dststep
results = [SelectableInt(endtest, 64)]
self.handle_comparison(results) # CR0
if end_src or end_dst:
+ # reset at end of loop including exit Vertical Mode
+ log ("SVSTATE_NEXT: after increments, reset")
self.svp64_reset_loop()
+ self.msr[MSRb.SVF] = 0
elif self.is_svp64_mode:
yield from self.svstate_post_inc()
self.assertEqual(sim.svstate.dststep.asint(True), 0)
print(" gpr1", sim.gpr(0))
self.assertEqual(sim.gpr(0), SelectableInt(0, 64))
+ # when end reached, vertical mode is exited
print(" msr", bin(sim.msr.value))
- self.assertEqual(sim.msr, SelectableInt(1<<(63-6), 64))
+ self.assertEqual(sim.msr, SelectableInt(0<<(63-6), 64))
CR0 = sim.crl[0]
print(" CR0", bin(CR0.get_range().value))
self.assertEqual(CR0[CRFields.EQ], 1)