I now went through all backends except sh and made the required changes.
 So far all I tested is that gcc compiles with one target per port. :-)
 Plus, i386-linux bootstraps and regtests okay.

Right now I aim at 100% identical assembly, maybe I'll have to relax
that.  Besides obvious register allocation differences (which did not
happen for i386 on simple testcases, so it is possible to avoid them),
I'm not sure I can achieve that on cc0 targets because of the tst
patterns, but probably combine can be taught to try them if it is not
already doing it.

Each port took no more than 30-45 minutes to convert.  It is very
mechanical: you basically duplicate the cmp patterns into cbranch and
cstore patterns and eliminate all occurrences of the *_compare_op
variables from the emitters.  Then you go through mov*cc and add*cc
patterns, and replace *_compare_op there too (with elements of the
comparison passed in operand 1).  Then you zap all code you do not need.

The positive surprises: PA was already very clean.  bfin was very
different from the others but easy.

The only ports for which I substantially rewrote some of the code in a
non-mechanical way are m32r and sparc, and mcore somewhat.  The only
ports that "grew" are cris, h8300 and i386.

Overall over 5000 lines were deleted.

Here is the diffstat:

config/picochip 1 file changed, 1 insertion(+), 112 deletions(-)
config/fr30 3 files changed, 7 insertions(+), 185 deletions(-)
config/score 8 files changed, 18 insertions(+), 152 deletions(-)
config/crx 3 files changed, 22 insertions(+), 97 deletions(-)
config/cris 1 file changed, 29 insertions(+), 17 deletions(-)
config/bfin 4 files changed, 31 insertions(+), 234 deletions(-)
config/m68hc11 3 files changed, 33 insertions(+), 242 deletions(-)
config/stormy16 4 files changed, 34 insertions(+), 99 deletions(-)
config/iq2000 4 files changed, 39 insertions(+), 272 deletions(-)
config/arc 3 files changed, 41 insertions(+), 318 deletions(-)
config/v850 1 file changed, 42 insertions(+), 199 deletions(-)
config/m32c 4 files changed, 50 insertions(+), 150 deletions(-)
config/pa 4 files changed, 53 insertions(+), 520 deletions(-)
config/mn10300 1 file changed, 54 insertions(+), 110 deletions(-)
config/frv 3 files changed, 55 insertions(+), 197 deletions(-)
config/xtensa 3 files changed, 58 insertions(+), 75 deletions(-)
config/mmix 4 files changed, 63 insertions(+), 261 deletions(-)
config/mcore 3 files changed, 67 insertions(+), 307 deletions(-)
config/pdp11 3 files changed, 68 insertions(+), 447 deletions(-)
config/vax 4 files changed, 81 insertions(+), 56 deletions(-)
config/avr 1 file changed, 82 insertions(+), 155 deletions(-)
config/h8300 3 files changed, 87 insertions(+), 73 deletions(-)
config/mips 5 files changed, 93 insertions(+), 148 deletions(-)
config/spu 3 files changed, 95 insertions(+), 181 deletions(-)
config/s390 4 files changed, 96 insertions(+), 126 deletions(-)
config/arm 4 files changed, 97 insertions(+), 350 deletions(-)
config/alpha 4 files changed, 103 insertions(+), 277 deletions(-)
config/rs6000 5 files changed, 126 insertions(+), 346 deletions(-)
config/m32r 4 files changed, 155 insertions(+), 405 deletions(-)
config/m68k 4 files changed, 156 insertions(+), 273 deletions(-)
config/ia64 4 files changed, 190 insertions(+), 243 deletions(-)
config/i386 4 files changed, 286 insertions(+), 207 deletions(-)
config/sparc 4 files changed, 327 insertions(+), 861 deletions(-)

Overall:

 128 files changed, 2990 insertions(+), 8261 deletions(-)

Paolo

Reply via email to