Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LR/SC implementation inconsistent with specs
According to the unprivileged ISA specs. at section 8.2 > An SC may succeed only if no store from another hart to the > reservation set can be observed to have occurred between the LR and > the SC, and if there is no other SC between the LR and itself in > program order. An SC may succeed only if no write from a device other > than a hart to the bytes accessed by the LR instruction can be > observed to have occurred between the LR and SC. By this mechanism, the LR/SC instructions can resolve the ABA problem by reserving the address of loaded bytes. In this commit, it prevents the LR/SC in semu from suffering ABA problem by strictly obeying the rules mentioned above
- Loading branch information