Bug 932

Summary: [simulator]
Product: Libre-SOC's first SoC Reporter: Konstantinos Margaritis (markos) <konstantinos>
Component: Source CodeAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: RESOLVED INVALID    
Severity: enhancement CC: libre-soc-bugs
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:

Description Konstantinos Margaritis (markos) 2022-09-21 17:58:58 BST
sv.lha seems to be loading values incorrectly:

Let's assume the buffer of 16-bit ints


00be 00ba 00de 0083

the following snippet:

setvl   0,0,4,0,1,1
sv.lha  *10, 0(3)

Produces the following results:
reg  8 00000000 00000000 ffffffffffffbabe ffffffffffffbabe ffffffffffffbabe ffffffffffffbabe 00000000 00000000

Which seems incorrect. For one, it should not sign-extend.
Secondly, the order seems wrong, if I am not mistaken the resulting values should be:

0000000000ba00be etc.
Comment 1 Konstantinos Margaritis (markos) 2022-09-21 19:18:00 BST
Please ignore this bug, it's not a bug at all, memory was not copied correctly to the simulator which led to these invalid register contents.