Logo
Explore Mirrors Help
Sign In
6502/Ophis
1
0
Fork 0
You've already forked Ophis
mirror of https://github.com/michaelcmartin/Ophis.git synced 2025-05-23 12:38:30 +00:00
Code Issues Projects Releases Wiki Activity
Ophis/tests/longbranch.oph

38 lines
509 B
Plaintext
Raw Permalink Normal View History

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-24 18:12:35 -07:00
.text
.org $0800
early:
bpl late
bmi late
bvc late
bvs late
bcc late
bcs late
bne late
beq late
bpl early
bmi early
bvc early
bvs early
bcc early
bcs early
bne early
beq early
.advance $0900
late:
bpl late
bmi late
bvc late
bvs late
bcc late
bcs late
bne late
beq late
bpl early
bmi early
bvc early
bvs early
bcc early
bcs early
bne early
beq early
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 57ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API