xspe is a kit for emulators: each machine is a behaviour description in Common Lisp, lowered to C99 at build time. Every instruction set is described once, from its specification, in its own folder of src/isa/; these are those models, each definition with its encoding and its Lisp.
| Model | Definitions | Diagrams | What |
|---|---|---|---|
| gs | 41 | 37 | The GS is driven by 64-bit writes to its general registers (through the GIF's packets) and by the EE's accesses to its privileged registers. Its instructions are those register writes, as the RSX's are method writes (src... |
| mips | 371 | 371 | Package ISA.MIPS. One description of MIPS, instantiated per CPU model on one abstract machine (the mips state struct). Each model is an ISA of its own to the rest of the kit (R3000A, R5900): its own executor, decoder, st... |
| ppc | 254 | 224 | Package ISA.PPC. One description of the PowerPC for every machine that has one: what Book I-III leave to the implementation belongs to a CPU model chosen at build time (XSPE_PPC_MODEL; the PS3 sets cell). The ISA and its... |
| psxgpu | 26 | 26 | The PlayStation's GPU (CXD8514Q/CXD8561Q) takes 32-bit words on two ports: GP0 (1F801810h), rendering and VRAM transfer commands of 1 to 12 words, and GP1 (1F801814h), one-word display control commands ([PSXSPX] "Graphic... |
| rsx | 171 | 0 | The RSX (the PS3's GPU, an NV47) is translated the way the CPUs are: as a match problem (docs/isel.md). Its instructions are methods: the command processor (the FIFO) writes 32-bit values to method addresses. Each method... |
| rv64 | 10 | 10 | Package ISA.RV64. This is the worked example of docs/isa.md, "Adding an ISA". It is small and real. It is not a complete RISC-V. |
| spirv | 113 | 0 | Package ISA.SPIRV. SPIR-V is the GPU host's shader ISA (XSPE_GPU=vk): SPU code becomes SPIR-V compute work. SPIR-V is never emulated here. Its description lets ctil find, for each SPU operation, the cheapest SPIR-V opera... |
| spu | 199 | 199 | All 199 SPU ISA 1.2 instructions (every opcode the SPU decoder knows) have a definsn. tests/isa/spu/isa.lisp checks that each decodes to itself. |
| vk | 59 | 0 | The RSX is translated the way the guest CPUs are: as a match problem (docs/isel.md). Here the host side is Vulkan, treated as an instruction set. Each Vulkan command (vkCmdSetViewport, vkCmdBindPipeline, vkCreateGraphics... |
| vu | 122 | 122 | Package ISA.VU (uses CL and CORE; its arithmetic is ISA.MIPS's, see below). VU0 and VU1 run micro programs from their micro memories: 64-bit instructions, an upper (FMAC) and a lower (integer, load/store, FDIV, EFU, bran... |
| x86 | 1791 | 0 | Package ISA.X86. x86-64 is the CPU host of today's builds: the PS3's PowerPC code is translated to it (docs/isel.md). Like every ISA of src/isa, it is described from its specification so that it can play either role; as ... |
Made from xspe at b2fac33349db by tools/gen-xspe.py. xspe is GPL-3.0-or-later.