>I've loocked at this file (as I mentioned earlier). Some moments push me to
>ask questions. There are parameters like
>
>notUsed('a'),
>notSame(%2 'push' 'pop'),
>notSame(%1 'xl' 'xh' 'yl' 'yh'),
>immdInRange(0 255 '+' %1 %2 %9),
>labelIsUncondJump(),
>labelRefCountChange
>and many others. i can look at examples and make my own like a monkey, but
>it's not best pra>ctice.
>Tried too lokk at sources of sdcc, but my sw skill isn't enough to understand
>code.
>And second. Some params of peep riules are numbered in series like %1, %2, %3
>etc,
>and some like %1, %5, %9. Why is it so?
What I found useful is to examine line ~1409 in
https://sourceforge.net/p/sdcc/code/HEAD/tree/trunk/sdcc/src/SDCCpeeph.c#l1409
(static const struct ftab). This structure defines all the conditions that can
be placed on peephole rules. Their implementation is just above that
structure. This is what I wish I had known about when I first started making
my own peephole rules.
You can use the existing peephole set for examples of how to use these
qualifiers.
The %n are text strings. Inside the peephole rules they represent strings
found in the source code. The numbers are only identifiers and are not
important.
The description of peepholer posted by R0b0t1 describes simple peepholers.
Sdcc's is a little more sophisticated.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user