Skip to content
  • Screwtape's avatar
    Represent the number of extra cycles of an instruction in the data. · 19833063
    Screwtape authored
    Previously, optional extra cycles (such as the extra cycle incurred when a
    branch instruction is taken) were only mentioned in comments, not in the actual
    data, with the understanding that an emulator would just silently add them when
    necessary. Some operations made those optional cycles mandatory, or impossible,
    so we added the "force_cycles" field, meant to signal to emulators that they
    should *not* add the extra optional cycles to this operation, but this was
    unsatisfying. It meant emulators had to know about this special convention, and
    it would be impossible for automated tests to know if they'd covered all the
    situations that might incur optional cycles.
    
    Now, instead of "cycles" and "force_cycles" we have "base_cycles" (the absolute
    minimum number of cycles an operation takes) and "extra_cycles" (an additional
    number of cycles the operation might take under some circumstances. For any
    operations with extra_cycles=0, emulators shoul...
    19833063