On 5/14/26 10:37, James Hilliard wrote:
Implement the Octeon LA* read-modify-write atomic instruction family:
LAI/LAID, LAD/LADD, LAA/LAAD, LAS/LASD, LAC/LACD, and LAW/LAWD.

These operations are architecturally distinct from SAA/SAAD and are used
by existing Octeon user-mode code for atomic counters, bit operations,
and exchange-style updates.

Signed-off-by: James Hilliard<[email protected]>
---
Changes v1 -> v2:
   - Keep LA* atomics naturally aligned per Octeon L2 transaction
     semantics.
   - Use explicit i64 TCG ops in the LA* translator paths.  (suggested by
     Philippe Mathieu-Daudé)

Changes v2 -> v3:
   - Drop redundant TARGET_LONG_BITS guards from doubleword atomic paths.
     (suggested by Richard Henderson)
   - Group LA* translator wrappers by argument shape instead of adding one
     wrapper per instruction.  (suggested by Richard Henderson)

Changes v3 -> v4:
   - Use i64 atomic helpers for both word and doubleword paths and select
     word sign-extension through MO_SL.  (suggested by Richard Henderson)

Changes v5 -> v6:
   - Rename the shared translator helpers to distinguish fetch-add and
     exchange operations.
---
  target/mips/tcg/octeon.decode      | 17 +++++++++
  target/mips/tcg/octeon_translate.c | 74 ++++++++++++++++++++++++++++++++++++++
  2 files changed, 91 insertions(+)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to