} by {
; Peephole 107 removed redundant ljmp
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jc %1
ljmp %5
%1:
} by {
- ; Peephole 108 removed ljmp by inverse jump logic
+ ; Peephole 108.a removed ljmp by inverse jump logic
jnc %5
%1:
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%1 -1)
replace {
jz %1
ljmp %5
%1:
} by {
- ; Peephole 109 removed ljmp by inverse jump logic
+ ; Peephole 108.b removed ljmp by inverse jump logic
jnz %5
%1:
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%1 -1)
replace {
jnz %1
ljmp %5
%1:
} by {
- ; Peephole 110 removed ljmp by inverse jump logic
+ ; Peephole 108.c removed ljmp by inverse jump logic
jz %5
%1:
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%1 -1)
replace {
jb %1,%2
ljmp %5
%2:
} by {
- ; Peephole 111 removed ljmp by inverse jump logic
+ ; Peephole 108.d removed ljmp by inverse jump logic
jnb %1,%5
%2:
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%2 -1)
replace {
jnb %1,%2
ljmp %5
%2:
} by {
- ; Peephole 112.a removed ljmp by inverse jump logic
+ ; Peephole 108.e removed ljmp by inverse jump logic
jb %1,%5
%2:
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%2 -1)
replace {
ljmp %5
rrc a
mov %4,c
} by {
- ; Peephole 113 optimized misc sequence
+ ; Peephole 113.a optimized misc sequence
clr %4
cjne %1,%2,%3
setb %4
rrc a
mov %4,c
} by {
- ; Peephole 114 optimized misc sequence
+ ; Peephole 113.b optimized misc sequence
clr %4
cjne %1,%2,%3
cjne %10,%11,%3
%3:
jnz %4
} by {
- ; Peephole 115.a jump optimization
+ ; Peephole 115.a jump optimization (acc not set)
cjne %1,%2,%3
sjmp %4
%3:
mov %1,a
jz %3
%2:
-}
+} labelRefCountChange(%2 -1)
replace {
clr a
%3:
jnz %4
} by {
- ; Peephole 116 jump optimization
+ ; Peephole 115.c jump optimization (acc not set)
cjne %1,%2,%3
cjne %9,%10,%3
sjmp %4
%3:
jnz %4
} by {
- ; Peephole 117 jump optimization
+ ; Peephole 115.d jump optimization (acc not set)
cjne %1,%2,%3
cjne %9,%10,%3
cjne %11,%12,%3
%3:
jnz %4
} by {
- ; Peephole 118 jump optimization
+ ; Peephole 115.e jump optimization (acc not set)
cjne %1,%2,%3
cjne %9,%10,%3
cjne %11,%12,%3
%3:
jnz %4
} by {
- ; Peephole 119 jump optimization
+ ; Peephole 115.f jump optimization (acc not set)
cjne %1,%2,%4
%3:
-} if labelRefCount %3 1
+} if labelRefCount(%3 1), labelRefCountChange(%3 -1)
replace {
mov a,#0x01
%3:
jnz %4
} by {
- ; Peephole 120 jump optimization
+ ; Peephole 115.g jump optimization (acc not set)
cjne %1,%2,%4
cjne %10,%11,%4
%3:
-} if labelRefCount %3 2
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%4 1)
replace {
mov a,#0x01
%3:
jnz %4
} by {
- ; Peephole 121 jump optimization
+ ; Peephole 115.h jump optimization (acc not set)
cjne %1,%2,%4
cjne %10,%11,%4
cjne %12,%13,%4
%3:
-} if labelRefCount %3 3
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%4 2)
replace {
mov a,#0x01
%3:
jnz %4
} by {
- ; Peephole 122 jump optimization
+ ; Peephole 115.i jump optimization (acc not set)
cjne %1,%2,%4
cjne %10,%11,%4
cjne %12,%13,%4
cjne %14,%15,%4
%3:
-} if labelRefCount %3 4
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%4 3)
replace {
mov a,#0x01
%3:
jz %4
} by {
- ; Peephole 123 jump optimization
+ ; Peephole 115.j jump optimization (acc not set)
cjne %1,%2,%3
sjmp %4
%3:
%3:
jz %4
} by {
- ; Peephole 124 jump optimization
+ ; Peephole 115.k jump optimization (acc not set)
cjne %1,%2,%3
cjne %10,%11,%3
sjmp %4
%3:
jz %4
} by {
- ; Peephole 125 jump optimization
+ ; Peephole 115.l jump optimization (acc not set)
cjne %1,%2,%3
cjne %10,%11,%3
cjne %12,%13,%3
%3:
jz %4
} by {
- ; Peephole 126 jump optimization
+ ; Peephole 115.m jump optimization (acc not set)
cjne %1,%2,%3
cjne %10,%11,%3
cjne %12,%13,%3
anl ar%1,%2
mov a,r%1
} by {
- ; Peephole 139 removed redundant mov
+ ; Peephole 139.a removed redundant mov
anl a,%2
mov r%1,a
}
orl ar%1,%2
mov a,r%1
} by {
- ; Peephole 140 removed redundant mov
+ ; Peephole 139.b removed redundant mov
orl a,%2
mov r%1,a }
xrl ar%1,%2
mov a,r%1
} by {
- ; Peephole 141 removed redundant mov
+ ; Peephole 139.c removed redundant mov
xrl a,%2
mov r%1,a
}
rlc a
mov acc.0,c
} by {
- ; Peephole 143 converted rlc to rl
+ ; Peephole 143.a converted rlc to rl
rl a
}
rrc a
mov acc.7,c
} by {
- ; Peephole 144 converted rrc to rc
+ ; Peephole 143.b converted rrc to rc
rr a
}
clr c
addc a,%1
} by {
- ; Peephole 145 changed to add without carry
+ ; Peephole 145.a changed to add without carry
add a,%1
}
mov a,%1
addc a,%2
} by {
- ; Peephole 146 changed to add without carry
+ ; Peephole 145.b changed to add without carry
mov a,%1
add a,%2
}
+// what are #147-#149 for?
replace {
orl r%1,a
} by {
%9:
ret
} by {
- ; Peephole 150 removed misc moves via dpl before return
+ ; Peephole 150.a removed misc moves via dpl before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 151 removed misc moves via dph, dpl before return
+ ; Peephole 150.b removed misc moves via dph, dpl before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 152 removed misc moves via dph, dpl before return
+ ; Peephole 150.c removed misc moves via dph, dpl before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 153 removed misc moves via dph, dpl, b before return
+ ; Peephole 150.d removed misc moves via dph, dpl, b before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 154 removed misc moves via dph, dpl, b before return
+ ; Peephole 150.e removed misc moves via dph, dpl, b before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 155 removed misc moves via dph, dpl, b before return
+ ; Peephole 150.f removed misc moves via dph, dpl, b before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 156 removed misc moves via dph, dpl, b, a before return
+ ; Peephole 150.g removed misc moves via dph, dpl, b, a before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 157 removed misc moves via dph, dpl, b, a before return
+ ; Peephole 150.h removed misc moves via dph, dpl, b, a before return
%9:
ret
}
%9:
ret
} by {
- ; Peephole 158 removed misc moves via dph, dpl, b, a before return
+ ; Peephole 150.i removed misc moves via dph, dpl, b, a before return
%9:
ret
}
sjmp %2
%1:
} by {
- ; Peephole 160 removed sjmp by inverse jump logic
+ ; Peephole 160.a removed sjmp by inverse jump logic
jc %2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jc %1
sjmp %2
%1:
} by {
- ; Peephole 161 removed sjmp by inverse jump logic
+ ; Peephole 160.b removed sjmp by inverse jump logic
jnc %2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jnz %1
sjmp %2
%1:
} by {
- ; Peephole 162 removed sjmp by inverse jump logic
+ ; Peephole 160.c removed sjmp by inverse jump logic
jz %2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jz %1
sjmp %2
%1:
} by {
- ; Peephole 163 removed sjmp by inverse jump logic
+ ; Peephole 160.d removed sjmp by inverse jump logic
jnz %2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jnb %3,%1
sjmp %2
%1:
} by {
- ; Peephole 164 removed sjmp by inverse jump logic
+ ; Peephole 160.e removed sjmp by inverse jump logic
jb %3,%2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
jb %3,%1
sjmp %2
%1:
} by {
- ; Peephole 165 removed sjmp by inverse jump logic
+ ; Peephole 160.f removed sjmp by inverse jump logic
jnb %3,%2
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
mov %1,%2
; Peephole 168 jump optimization
jb %1,%3
%2:
-}
+} labelRefCountChange(%2 -1)
replace {
jb %1,%2
; Peephole 169 jump optimization
jnb %1,%3
%2:
-}
+} labelRefCountChange(%2 -1)
replace {
clr a
; Peephole 170 jump optimization
cjne %1,%2,%4
%3:
-} if labelRefCount %3 1
+} if labelRefCount(%3 1), labelRefCountChange(%3 -1)
replace {
clr a
cjne %1,%2,%4
cjne %9,%10,%4
%3:
-} if labelRefCount %3 2
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%4 1)
replace {
clr a
cjne %9,%10,%4
cjne %11,%12,%4
%3:
-} if labelRefCount %3 3
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%4 2)
replace {
clr a
cjne %11,%12,%4
cjne %13,%14,%4
%3:
-} if labelRefCount %3 4
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%4 3)
replace {
mov r%1,%2
subb a,#0x01
mov %2,a
} by {
- ; Peephole 174 optimized decrement (acc not set to %2, flags undefined)
+ ; Peephole 174.a optimized decrement (acc not set to %2, flags undefined)
mov r%1,%2
dec %2
}
add a,#0x01
mov %2,a
} by {
- ; Peephole 175 optimized increment (acc not set to %2, flags undefined)
+ ; Peephole 174.b optimized increment (acc not set to %2, flags undefined)
mov r%1,%2
inc %2
}
inc %1
mov @r%2,%1
} by {
- ; Peephole 176 optimized increment, removed redundant mov
+ ; Peephole 174.c optimized increment, removed redundant mov
inc @r%2
mov %1,@r%2
} if notVolatile
mov a,%12
cjne %13,%14,%8
sjmp %7
-;%3:
-} if labelRefCount %3 4
+%3:
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%8 3)
replace {
cjne %1,%2,%3
mov a,%12
cjne %13,%14,%8
sjmp %7
-;%3:
-} if labelRefCount %3 4
+%3:
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%8 3)
replace {
cjne @%1,%2,%3
inc %1
cjne @%1,%14,%8
sjmp %7
-;%3:
-} if labelRefCount %3 4
+%3:
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%8 3)
replace {
cjne %1,%2,%3
cjne %10,%11,%8
cjne %13,%14,%8
sjmp %7
-;%3:
-} if labelRefCount %3 4
+%3:
+} if labelRefCount(%3 4), labelRefCountChange(%3 -4), labelRefCountChange(%8 3)
replace {
jnz %3
mov a,%9
cjne %10,%11,%8
sjmp %7
-;%3:
-} if labelRefCount %3 3
+%3:
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%8 2)
replace {
cjne %1,%2,%3
mov a,%9
cjne %10,%11,%8
sjmp %7
-;%3:
-} if labelRefCount %3 3
+%3:
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%8 2)
replace {
cjne @%1,%2,%3
inc %1
cjne @%1,%11,%8
sjmp %7
-;%3:
-} if labelRefCount %3 3
+%3:
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%8 2)
replace {
cjne %1,%2,%3
cjne %5,%6,%8
cjne %10,%11,%8
sjmp %7
-;%3:
-} if labelRefCount %3 3
+%3:
+} if labelRefCount(%3 3), labelRefCountChange(%3 -3), labelRefCountChange(%8 2)
replace {
jnz %3
mov a,%4
cjne %5,%6,%8
sjmp %7
-;%3:
-} if labelRefCount %3 2
+%3:
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%8 1)
replace {
cjne %1,%2,%3
mov a,%4
cjne %5,%6,%8
sjmp %7
-;%3:
-} if labelRefCount %3 2
+%3:
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%8 1)
replace {
cjne @%1,%2,%3
inc %1
cjne @%1,%6,%8
sjmp %7
-;%3:
-} if labelRefCount %3 2
+%3:
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%8 1)
replace {
cjne %1,%2,%3
%3:
sjmp %8
} by {
- ; Peephole 198 optimized misc jump sequence
+ ; Peephole 198.a optimized misc jump sequence
cjne %1,%2,%8
cjne %5,%6,%8
sjmp %7
-;%3:
-} if labelRefCount %3 2
+%3:
+} if labelRefCount(%3 2), labelRefCountChange(%3 -2), labelRefCountChange(%8 1)
replace {
cjne %1,%2,%3
%3:
sjmp %5
} by {
- ; Peephole 199 optimized misc jump sequence
+ ; Peephole 198.b optimized misc jump sequence
cjne %1,%2,%5
sjmp %4
-;%3:
-} if labelRefCount %3 1
+%3:
+} if labelRefCount(%3 1), labelRefCountChange(%3 -1)
replace {
sjmp %1
%1:
} by {
- ; Peephole 200 removed redundant sjmp
+ ; Peephole 200.a removed redundant sjmp
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
sjmp %1
%2:
%1:
} by {
- ; Peephole 201 removed redundant sjmp
+ ; Peephole 200.b removed redundant sjmp
%2:
%1:
-}
+} labelRefCountChange(%1 -1)
replace {
push acc
djnz %1,%4
%2:
%3:
-} if labelRefCount %2 1
+} if labelRefCount(%2 1), labelRefCountChange(%2 -1), labelRefCountChange(%3 -1)
replace {
mov %1,%1
dec r%1
mov @r%1,a
} by {
- ; Peephole 216 simplified clear (2bytes)
+ ; Peephole 216.a simplified clear (2bytes)
mov r%1,%2
clr a
mov @r%1,a
dec r%1
mov @r%1,a
} by {
- ; Peephole 217 simplified clear (3bytes)
+ ; Peephole 216.b simplified clear (3bytes)
mov r%1,%2
clr a
mov @r%1,a
dec r%1
mov @r%1,a
} by {
- ; Peephole 218 simplified clear (4bytes)
+ ; Peephole 216.c simplified clear (4bytes)
mov r%1,%2
clr a
mov @r%1,a
clr a
movx @dptr,a
} by {
- ; Peephole 219 removed redundant clear
+ ; Peephole 219.a removed redundant clear
clr a
movx @dptr,a
mov dptr,%1
clr a
movx @dptr,a
} by {
- ; Peephole 219.a removed redundant clear
+ ; Peephole 219.b removed redundant clear
clr a
movx @dptr,a
mov dptr,%1
mov dpl,%1
mov dph,%2
} by {
- ; Peephole 223 removed redundant dph/dpl moves
+ ; Peephole 223.a removed redundant dph/dpl moves
mov %1,dpl
mov %2,dph
} if notVolatile %1 %2
mov dpl,%1
mov dph,(%1 + 1)
} by {
- ; Peephole 224 removed redundant dph/dpl moves
+ ; Peephole 223.b removed redundant dph/dpl moves
mov %1,dpl
mov (%1 + 1),dph
} if notVolatile %1
lcall __decdptr
movx @dptr,a
} by {
- ; Peephole 227 replaced inefficient 32 bit clear
+ ; Peephole 227.a replaced inefficient 32 bit clear
mov dptr,#%1
clr a
movx @dptr,a
mov a,#%2
movx @dptr,a
} by {
- ; Peephole 228 replaced inefficient 32 constant
+ ; Peephole 227.b replaced inefficient 32 constant
mov dptr,#%1
mov a,#%2
movx @dptr,a
lcall __decdptr
movx @dptr,a
} by {
- ; Peephole 229 replaced inefficient 16 bit clear
+ ; Peephole 227.c replaced inefficient 16 bit clear
mov dptr,#%1
clr a
movx @dptr,a
mov a,#%2
movx @dptr,a
} by {
- ; Peephole 230 replaced inefficient 16 bit constant
+ ; Peephole 227.d replaced inefficient 16 bit constant
mov dptr,#%1
mov a,#%2
movx @dptr,a
mov dptr,#%1
}
-// this last peephole often removes the last mov from 227-230
+// this last peephole often removes the last mov from 227.a - 227.d
replace {
mov dptr,#%1
mov dptr,#%2
} by {
- ; Peephole 231 removed redundant mov to dptr
+ ; Peephole 227.e removed redundant mov to dptr
mov dptr,#%2
}
%2:
ret
} by {
- ; Peephole 234 loading dpl directly from a(ccumulator), r%1 not set
+ ; Peephole 234.a loading dpl directly from a(ccumulator), r%1 not set
mov dpl,a
%2:
ret
%3:
ret
} by {
- ; Peephole 235 loading dph directly from a(ccumulator), r%1 not set
+ ; Peephole 234.b loading dph directly from a(ccumulator), r%1 not set
mov dpl,r%2
mov dph,a
%3:
mov %3,%4
%1:
ret
-}
+} labelRefCountChange(%1 -1)
replace {
sjmp %1
mov dph,%6
%1:
ret
-}
+} labelRefCountChange(%1 -1)
// applies to f.e. device/lib/log10f.c
replace {
inc a
%3:
%10:
-}
+} labelRefCountChange(%10 -1)
// applies to f.e. time.c
replace {
inc a
%3:
%6:
-}
+} labelRefCountChange(%6 -1)
// applies to f.e. malloc.c
replace {
inc a
%3:
%4:
-}
+} labelRefCountChange(%4 -1)
// applies to f.e. j = (k!=0x1000);
// with volatile idata long k;
inc a
%3:
%7:
-}
+} labelRefCountChange(%7 -1)
// applies to f.e. j = (k!=0x1000);
// with volatile idata int k;
inc a
%3:
%7:
-}
+} labelRefCountChange(%7 -1)
// applies to f.e. vprintf.asm (--stack-auto)
replace {
inc a
%3:
%7:
-}
+} labelRefCountChange(%7 -1)
// applies to f.e. scott-bool1.c
replace {
inc %4
%3:
sjmp %5
-} if labelInRange
+} if labelInRange(), labelRefCountChange(%3 -1), labelRefCountChange(%5 1)
// applies to f.e. simplefloat.c (saving 1 cycle)
replace {
clr a
rlc a
mov r%1,a
-} if labelRefCount %2 1
+} if labelRefCount(%2 1), labelRefCountChange(%2 -1)
// this one will not be triggered if 245 is present
// please remove 245 if 245.a 245.b are found to be safe
} by {
; Peephole 245.a optimized conditional jump (r%1 and acc not set!)
jc %3
-} if labelRefCount %2 1
+} if labelRefCount(%2 1), labelRefCountChange(%2 -1)
// this one will not be triggered if 245 is present
// please remove 245 if 245.a 245.b are found to be safe
} by {
; Peephole 245.b optimized conditional jump (r%1 and acc not set!)
jnc %3
-} if labelRefCount %2 1
+} if labelRefCount(%2 1), labelRefCountChange(%2 -1)
// rules 246.x apply to f.e. bitfields.c
%1:
} by {
; Peephole 249.a jump optimization
-} if labelRefCount %1 1
+} if labelRefCount(%1 1), labelRefCountChange(%1 -1)
replace {
jz %1
%1:
} by {
; Peephole 249.b jump optimization
-} if labelRefCount %1 1
+} if labelRefCount(%1 1), labelRefCountChange(%1 -1)
// This allows non-interrupt and interrupt code to safely compete
jbc %1,%3
sjmp %2
%3:
-} if labelRefCount %3 0
+} if labelRefCount(%3 0), labelRefCountChange(%3 1)
replace {
jb %1,%2
} by {
; Peephole 251.a replaced ljmp to ret with ret
ret
-} if labelIsReturnOnly
+} if labelIsReturnOnly(), labelRefCountChange(%5 -1)
// not before peephole 250.b
replace {
} by {
; Peephole 251.b replaced sjmp to ret with ret
ret
-} if labelIsReturnOnly
+} if labelIsReturnOnly(), labelRefCountChange(%5 -1)
// applies to shifts.c and when accessing arrays with an unsigned integer index
// saving 1 byte, 2 cycles
} by {
; Peephole 253.b replaced lcall/ret with ljmp
ljmp %1
+ ;
} if labelRefCount %2 0
// applies to f.e. scott-bool1.c
mov %1,a
%4:
%3:
-} if notVolatile %1
+} if notVolatile(%1), labelRefCountChange(%3 -1)
// in_byte<<=1; if(in_bit) in_byte|=1;
replace {
mov r%1,a
%4:
%3:
-}
+} labelRefCountChange(%3 -1)
// in_byte>>=1; if(in_bit) in_byte|=0x80;
replace {
mov %1,a
%4:
%3:
-} if notVolatile %1
+} if notVolatile(%1), labelRefCountChange(%3 -1)
// in_byte>>=1; if(in_bit) in_byte|=0x80;
replace {
mov r%1,a
%4:
%3:
-}
+} labelRefCountChange(%3 -1)
// out_bit=out_byte&0x80; out_byte<<=1;
// helps f.e. writing data on a 3-wire (SPI) bus
mov %1,a
} if notVolatile %1
-// Peepholes 259.x are not compatible with peepholex 250.x
-// Peepholes 250.x add jumps to a previously unused label. As the
+// Peepholes 259.x rely on the correct labelRefCount. Otherwise they are
+// not compatible with peepholes 250.x
+// Peepholes 250.x add jumps to a previously unused label. If the
// labelRefCount is not increased, peepholes 259.x are (mistakenly) applied.
// (Mail on sdcc-devel 2004-10-25)
-// Note: Peepholes 193..199, 251 remove jumps to previously used labels without
-// decreasing labelRefCount (less dangerous - this f.e. leads to 253.c being
-// applied instead of 253.b))
//
// applies to f.e. vprintf.c
-//replace {
-// sjmp %1
-//%2:
-// ret
-//} by {
-// sjmp %1
-// ; Peephole 259.a removed redundant label %2 and ret
-// ;
-//} if labelRefCount %2 0
+replace {
+ sjmp %1
+%2:
+ ret
+} by {
+ sjmp %1
+ ; Peephole 259.a removed redundant label %2 and ret
+ ;
+} if labelRefCount %2 0
// applies to f.e. gets.c
-//replace {
-// ljmp %1
-//%2:
-// ret
-//} by {
-// ljmp %1
-// ; Peephole 259.b removed redundant label %2 and ret
-// ;
-//} if labelRefCount %2 0
+replace {
+ ljmp %1
+%2:
+ ret
+} by {
+ ljmp %1
+ ; Peephole 259.b removed redundant label %2 and ret
+ ;
+} if labelRefCount %2 0
// optimizing jumptables
// Please note: to enable peephole 260.x you currently have to set
mov acc.7,c
mov %1,a
}
+
+// should be one of the last peepholes
+replace{
+%1:
+} by {
+ ; Peephole 300 removed redundant label %1
+} if labelRefCount(%1 0)