mips: mips3.lisp

MIPS II, III and IV instructions of the R5900: 64-bit arithmetic, doubleword memory, likely branches, traps.

0/1 a fixed bit, name a field,   a bit the decoder ignores

tlti source

tlti rs (simm imm)

Trap if Less Than Immediate

r5900:

313029282726252423222120191817161514131211109876543210
000001rs01010imm
(defmips tlti (:asm "tlti" rs (simm imm)) (:doc "Trap if Less Than Immediate")
  (when (< (sgpr rs) (sext 16 imm)) (raise +exc-trap+)))

tltiu source

tltiu rs (simm imm)

Trap if Less Than Immediate Unsigned

r5900:

313029282726252423222120191817161514131211109876543210
000001rs01011imm
(defmips tltiu (:asm "tltiu" rs (simm imm)) (:doc "Trap if Less Than Immediate Unsigned")
  (when (< (xgpr rs) (wrap 64 (sext 16 imm))) (raise +exc-trap+)))

sync source

sync

Synchronize Shared Memory (sync.l)

SYNC (stype 0, also written sync.l) and SYNC.P: "order loads and stores"
/ wait for the pipeline [EECORE] SYNC.stype. The interpreter completes
every access in program order, so both are no-ops (as PCSX2's SYNC()).

r5900:

313029282726252423222120191817161514131211109876543210
00000000000000000000000000001111
(defmips sync (:asm "sync") (:doc "Synchronize Shared Memory (sync.l)")
  nil)

sync.p source

sync.p

Synchronize the Pipeline

r5900:

313029282726252423222120191817161514131211109876543210
00000000000000000000010000001111
(defmips sync.p (:asm "sync.p") (:doc "Synchronize the Pipeline")
  nil)

pref source

pref op (simm imm) rs

Prefetch

PREF: "a hint ... does not change the architecturally visible state"
[MIPSIV] PREF.

r5900:

313029282726252423222120191817161514131211109876543210
110011rsopimm
(defmips pref (:asm "pref" op (simm imm) rs) (:doc "Prefetch")
  nil)

cache source

cache op (simm imm) rs

Cache Operation

CACHE: operations on the instruction and data caches and the BTAC
[EECORE] CACHE (op: IXIN, DHWBIN ...). No cache is modelled: a no-op on
the state. Code that relies on a cache line's contents (a write-back
cache read through an uncached alias before the writeback) is the
machine's to model.

r5900:

313029282726252423222120191817161514131211109876543210
101111rsopimm
(defmips cache (:asm "cache" op (simm imm) rs) (:doc "Cache Operation")
  nil)

Made from xspe at b2fac33349db by tools/gen-xspe.py. xspe is GPL-3.0-or-later.