Bug 932 - [simulator]
Summary: [simulator]
Status: RESOLVED INVALID
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2022-09-21 17:58 BST by Konstantinos Margaritis (markos)
Modified: 2022-09-21 19:18 BST (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.