gcc and m68hc11 -- oops...

John S Gwynne jsg
Wed Dec 14 04:42:24 GMT 1994


--------

   When I posted my comments a day or two ago of the Coactive
Aesthetics gcc port, I did not know a new release came out on 
the 9th of this month. This version has improvements that
reduce code size by 30-40% from the beta release I had. Some
comparative data that was given with the distribution:

           compiler            size
            --------            -------
            gcc (old)           24326
            gcc (snapshot)      16166
            gcc (new)           15030
            icc                 14269
            archimedes          12975   (this is an _old_ version)

and the output of the test program that I posted before (with -O4)

------- cut here -------
                              1 ;;;-----------------------------------------
                              2 ;;; Start MC6811 gcc assembly output
                              3 ;;; gcc compiler compiled on TBD
                              4 ;;; OPTIONS:    -mlong_branch optimize  inline-functions
                              5 ;;; OPTIONS:     peephole !omit_frame_pointer !signed-char
                              6 ;;; Source:             t.c
                              7 ;;; Destination:        /usr/tmp/cca12360.s
                              8 ;;; Compiled:   Tue Dec 13 23:24:26 1994
                              9 ;;; (META)compiled by GNU C version 2.6.3.
                             10 ;;;-----------------------------------------
                             11         .module t.c
                             12
                             13 ;;;
                             14 ;;; reload_alter_stack_offsets: altered_frame_size = 0 bytes
                             15 ;;;
                             16         .area   _CODE
                             17         .globl  _main
   0000                      18 _main:
                             19 ;;;-----------------------------------------
                             20 ;;;  PROLOGUE for main
                             21 ;;;-----------------------------------------
   0000 18 3C                22         pshy    ; Save stack frame
   0002 18 30                23         tsy     ; Set current stack frame
   0004 DE 00                24         ldx     *ZD5
   0006 3C                   25         pshx    ; pushed register *ZD5
   0007 DE 00                26         ldx     *ZD6
   0009 3C                   27         pshx    ; pushed register *ZD6
                             28 ;;;END PROLOGUE
   000A BD 00 00             29         jsr     ___main ; CALL: (VOIDmode) ___main (0 bytes)
   000D CC 00 09             30         ldd     #9
   0010 DD 00                31         std     *ZD5    ; movhi: #9 -> *ZD5
   0012 CC 00 12             32         ldd     #_a+18
   0015 DD 00                33         std     *ZD6    ; movhi: #_a+18 -> *ZD6   0017                      34 L11:
   0017 DC 00                35         ldd     *ZD5
   0019 DE 00                36         ldx     *ZD6
   001B ED 00                37         std     0,x     ; movhi: *ZD5 -> 0,x
   001D DC 00                38         ldd     *ZD6
   001F C3 FF FE             39         addd    #-2
   0022 DD 00                40         std     *ZD6    ; addhi3: *ZD6 by #-2 -> *ZD6
   0024 DC 00                41         ldd     *ZD5
   0026 C3 FF FF             42         addd    #-1
   0029 DD 00                43         std     *ZD5    ; addhi3: *ZD5 by #-1 -> *ZD5
   002B 2D 03                44         blt     .+5
   002D 7E 00 17             45         jmp     L11     ; (bge) long branch
                             46 ;;;EPILOGUE
   0030 38                   47         pulx    ; Pulling register *ZD6
   0031 DF 00                48         stx     *ZD6
   0033 38                   49         pulx    ; Pulling register *ZD5
   0034 DF 00                50         stx     *ZD5
   0036 18 38                51         puly    ; Restore stack frame
   0038 39                   52         rts     ; return from function
                             53 ;;;-----------------------------------------
                             54 ;;; END EPILOGUE for main
                             55 ;;;-----------------------------------------
                             56         .area   _BSS
                             57         .globl  _a
   0000                      58 _a:     .blkb   20
                             59         ; END

------- cut here -------

As you can see, this is much better... nowhere near as good as
the 68k optimization, but usable. My apologies for the
inaccurate data I post the other day.
 

                                       John S Gwynne
                                          Gwynne.1 at osu.edu
_______________________________________________________________________________
               T h e   O h i o - S t a t e   U n i v e r s i t y
    ElectroScience Laboratory, 1320 Kinnear Road, Columbus, Ohio 43212, USA
                Telephone: (614) 292-7981 * Fax: (614) 292-7292
-------------------------------------------------------------------------------





More information about the Diy_efi mailing list