Commit Graph

2 Commits

Author SHA1 Message Date
Michael Martin
e5ac21f0f9 Second attempt at implementation of the BBXn instructions for Rockwell 65c02 chips.
Reliable technical documentation for how these instructions are decoded is a
little thin on the ground online, so some of this implementation is still
speculative.
2013-01-27 20:18:08 -08:00
Michael C. Martin
f8bc917601 A new 'correctness optimization': ExtendBranches.
This pass actually isn't an optimizer in that it produces larger
binaries when it triggers. However, the larger binaries created
will actually assemble properly.

The ExtendBranches pass detects Relative instructions (that is,
branches) that extend past the signed-8-bit range Relative instructions
permit, and replaces them with a branch-jump combination with identical
semantics.

Since this may be evidence of a program bug, Ophis will warn when
the optimization is triggered.

Due to similarities between this pass and UpdateLabels, both passes
have been refactored in passing.
2012-05-27 15:57:23 -07:00