Bug 740 - sync instruction incorrectly assigned to OP_NOP
Summary: sync instruction incorrectly assigned to OP_NOP
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: All All
: --- major
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2021-11-05 21:43 GMT by Jacob Lifshay
Modified: 2021-11-05 22:14 GMT (History)
2 users (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 Jacob Lifshay 2021-11-05 21:43:15 GMT
I'm assuming it should be instead assigned to OP_FENCE or similar, but am not changing it right now to not break our code, since treating it as a nop mostly works for a single-core system.

https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/minor_31.csv;h=dcadd41ca276fc3a2046aea5dd505de0702538f5;hb=HEAD#l199
Comment 1 Luke Kenneth Casson Leighton 2021-11-05 22:00:17 GMT
we are copying microwatt verbatim.  microwatt caches are writethru.
therefore sync is inherently a nop.
Comment 2 Jacob Lifshay 2021-11-05 22:14:40 GMT
(In reply to Luke Kenneth Casson Leighton from comment #1)
> we are copying microwatt verbatim.  microwatt caches are writethru.
> therefore sync is inherently a nop.

well, that only works on a single-core system. on a multi-core system, we also need to wait for all in-progress load/stores, and execute a system-wide synchronization of some sort (needed for supporting sequential-consistency atomic thread fences).