matanlurey / gba.dart-archived

A gameboy advanced emulator written in Dart
https://github.com/matanlurey/gba.dart
12 stars 4 forks source link

Refactor instructions to avoid specialization for {S} #79

Open matanlurey opened 7 years ago

matanlurey commented 7 years ago

It looks like we could just have a bool get isSVariant field, and if true:

gprs.cpsr
  ..n = uint32.isNegative(result)
  ..z = isZero(gprs.get(rd))
  ..c = uint32.hasCarryBit(result)
  ..v = uint32.doesAddOverflow(op1, op2, result);

... versus re-creating this over and over.

WUD @kharland?