Bug 1222

Summary: setvl Rc=1 needs to be more sophisticated
Product: Libre-SOC's first SoC Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: SpecificationAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: CONFIRMED ---    
Severity: enhancement CC: libre-soc-isa
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Linux   
NLnet milestone: --- total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation:
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:
Bug Depends on:    
Bug Blocks: 672    

Description Luke Kenneth Casson Leighton 2023-11-28 21:10:16 GMT
* when VL is set to greater than MAXVL (and truncated), CR0.GT is set to 1
* when VL is non-zero, CR0.LT is set to 1
* when VL is set to zero, CR0.EQ is set to 1

in that order because MAXVL might be zero.
overflow (CR0.SO) should be fine

this allows detection of some loop conditions that
are useful.  for example when detecting that VL is
set to a last value (between 0 and MAXVL) you know
that a loop is terminating, so sv.bc has no need
to branch back.  this *without* using CTR.