1 // peeph
-tlcs90.def
- TLCS
-90 peephole rules
3 // (c
) Philipp Klaus
Krause (pkk@spth.de
, philipp@colecovision.eu
) 2006 - 2015
5 // This program is free software
; you can redistribute it and
/or modify it
6 // under the terms of the GNU General Public License as published by the
7 // Free Software Foundation
; either version
2, or (at your option
) any
10 // This program is distributed in the hope that it will be useful
,
11 // but WITHOUT ANY WARRANTY
; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program
; if not
, write to the Free Software
17 // Foundation
, 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA.
25 ; tlcs90 peephole
0 loaded
%7 into
%2 (%3) directly instead of going through
%1.
27 } if
canAssign(%2 %3 %7), notVolatile(%1), notUsed(%1), notSame(%1 %4 %1 'hl')
38 ; tlcs90 peephole
1 used hl instead of iy.
39 } if
notUsed('iy'), notUsed('hl')
49 ; tlcs90 peephole
2 incremented once in hl instead of incrementing in de twice.
61 ; tlcs90 peephole
3 incremented once in hl instead of incrementing in hl twice.
71 ; tlcs90 peephole
4 incremented a once instead of adding #
0x04 to a.
83 ; tlcs90 peephole
5 incremented once in hl instead of incrementing in hl twice.
93 ; tlcs90 peephole
6 combined constant loads into register pair.
101 ; tlcs90 peephole
7 combined constant loads into register pair.
109 ; tlcs90 peephole
8 combined constant loads into register pair.
117 ; tlcs90 peephole
9 combined constant loads into register pair.
125 ; tlcs90 peephole
10 combined constant loads into register pair.
133 ; tlcs90 peephole
11 combined constant loads into register pair.
147 ; tlcs90 peephole
12 loaded
%6 from a directly instead of going through
%1.
148 } if
notUsed(%1), notSame(%5 %1), notSame(%5 '(hl)' '(de)' '(bc)'), notSame(%5 %6), notSame(%6 '(hl)' '(de)' '(bc)'), notSame(%5 'a'), notSame(%6 'a')