https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100266
Bug ID: 100266 Summary: [RISCV] Provide programmatic implementation of CAS Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: christophm30 at gmail dot com Target Milestone: --- At the moment CAS is implemented in form of a hard-coded sequence in sync.md. When implementing this in a programmatic way (i.e. in riscv.c) we can make this code much more maintainable. Moving this into C-code also allows to properly emit the proper fences for ensuring the required memory ordering. To do so we need to basically do the following: * model LR and SC INSNs * implement riscv_expand_compare_and_swap () in riscv.c