openrisc/or1ksim — pull request #5 by skristiansson (2014-05-04 15:43:16+00:00)
Title: add support for atomic operation instructions

This adds support for the atomic load-link/store-conditional
instruction l.lwa and l.swa.
In addition to that, tests that ensure their correct behaviour
are also added.

* ChangeLog:

2014-05-04 Stefan Kristiansson

* cpu/common/abstract.c:
(set_mem32) Clear atomic reserve on write to atomic address.
(set_mem16) Likewise.
(set_mem8) Likewise.
* cpu/common/execute.h : Add loadlock_active and
loadlock_address members.
* cpu/or1k/except.c (except_handle): Clear atomic reserve on
exceptions.
* cpu/or32/insnset.c:
(l_swa): New function.
(l_lwa): Likewise.
* cpu/or32/or32.c : Add l.lwa and l.swa
instructions.
* cpu/or32/simpl32-defs.h: Add l_swa and l_lwa declarations.
* cuc/load.c : Add l.lwa and l.swa instructions.

* testsuite/ChangeLog:

2014-05-04 Stefan Kristiansson

* or1ksim.tests/atomic.exp: New file. Test for atomic
(l.lwa/l.swa) instructions.

* testsuite/test-code-or1k/ChangeLog:

2014-05-04 Stefan Kristiansson

* atomic: New directory. Tests for l.lwa and l.swa atomic
instructions.
* atomic/atomic.S: New file.
* atomic/Makefile.in: Likewise.
* atomic/Makefile.am: Likewise.
* Makefile.am: Add atomic test.
* configure.ac: Likewise.
* Makefile.in: Regenerated.
* configure: Likewise.