Commit Graph

8 Commits

Author SHA1 Message Date
Vas Crabb
4a7c424657 -bus/isa/ubpnic.cpp: Added side effect checks.
-cpu/uml.cpp: Added a simplification rule for pathological cases of
 SEXT.

-docs: Documented the DRC UML SEXT instruction.

-Tidied some random stuff.
2025-09-09 02:29:16 +10:00
Vas Crabb
5cca9a22a4 -cpu/drcbec.cpp: Improved behaviour for float-to-int conversion.
-docs: Documented several DRC UML shift/rotate instructions.
2025-09-08 13:55:25 +10:00
Vas Crabb
e49cbb909f cpu/drcbearm64.cpp: Implemented float-to-int conversion using rounding mode.
Also optimised code generation for UML ROL (rotate left) and slightly
optimised carry flag calculation for left shift (save one instruction).
2025-09-06 19:54:04 +10:00
Vas Crabb
72f1d62b4b docs: Documented more DRC UML floating point instructions.
* cpu/uml.cpp: Added simplification rules for FFRINT and FFRFLT.
* cup/drcumlsh.h: Use "src" rather than "src1" if there's only one
  source operand.
* cpu/drcbearm64.cpp: Added a fixme comment.
2025-09-06 12:47:42 +10:00
Vas Crabb
366df9419c -docs: Documented some UML floating point arithmetic instructions.
* Also replaced mathematical symbols for Boolean algebra with less
  desirable C operators as they were upsetting pdflatex.

-cpu/uml.cpp: Got rid of a redundant assignment.
2025-09-05 14:58:58 +10:00
Vas Crabb
a418fb4267 Various small improvements:
misc/crystal.cpp: Added lamp outputs used by Office Yeoin Cheonha and
Urachacha Mudaeri, and fixed button order/names for Urachacha Mudaeri.

cpu/uml.cpp: Added a couple of simplification rules.  ADDC's inputs are
commutative, and TEST with an immediate zero operand effectively ignores
the other operand.

namco/namcos23.cpp: Treat spinny things as a dial rather than half a
mouse.

cpu/arm7: Removed the recompiler that had never been completed.

cpu/drcumlsh.h: Removed helpers for generating the unimplemented JMPH
instrcution.  Trying to use it would cause a compile error.

docs: Documented the most common DRC UML integer arithmetic and logical
instructions.
2025-09-05 02:06:54 +10:00
Vas Crabb
de40641555 More recompiler fixes:
* cpu/drcbec.cpp: Interpret index operand for load/store instructions as
  a signed value for consistency with other back-ends.
* cpu/drcbec.cpp: Honour alignment rules when packing immediate values.
* cpu/drcbex64.cpp: Don't special-case SEXT with an immediate source -
  the simplifier takes care of this.
* cpu/drcbex86.cpp: Be explicit about preserving flags in load/store
  instructions.
* docs: Added a couple more UML data movement instructions.
2025-04-12 13:25:58 +10:00
Vas Crabb
3e3d27dde5 Started moving UML instruction reference to main documentation, fixed more recompiler issues:
* cpu/drcbearm64.cpp Interpret index operand for load and store
  instructions as a signed 32-bit value for consistency with x86-64.
  Moved code to interpret load and scale the index for integer
  load/store to a helper function to make it easier to update if it
  needs changes or fixes.
* cpu/drcbearm64.cpp: Use and/orr to set carry flag directly rahter than
  using an intermediate register when both operands of a CARRY
  instruction are immediates.
* cpu/drcbearm64.cpp: Fixed incorrect operand type assertion for FREAD.
* cpu/drcbearm64.cpp: Use less verbose asmjit helper functions for shift
  operations and addressing modes.
* cpu/drcbex64.cpp: Interpret index operand for floating point
  load/store as a signed 32-bit value for consistency with integer
  load/store.
* cpu/drcbex64.cpp: Guard against any possibility of load and store
  instructions altering the flags.
* cpu/drcbex64.cpp: Reduced copy/paste in floating point load/store
  instructions.
* cpu/drcbex64.cpp: Cleaned up some casts between integer types with
  differing size and signedness.
* docs: Added reference for UML flow control, data movement and emulated
  memory access instructions.
* cpu/uml.cpp: Truncate immediates to size for a few more instructions.
* cpu/uml.cpp: Added SPACE_OPCODES since it's a well-known address space
  now.
* cpu/uml.cpp: Removed SCALE_DEFAULT.  It's unimplemented by back-ends
  and unused by front-ends.
* cpu/uml.h, cpu/drcumlsh.h: Less confusing names for parameters to read
  and write instruction generators.
* cpu/drcbex86.cpp: Templated 64-bit multiplication helpers on the
  zero/sign flag source, cleaned up casting pointers to integers.
2025-04-12 02:58:15 +10:00