Currently there is nobody actively developing for the
hc08 I'm afraid. But feel free to try and implement
optimizations. We do accept patches if they do not break
regression tests.
> Hi,
>
> I've been playing around with SDCC for about a week now and overall I'm
> impressed and positively surpriced.
>
> However, I was slightly disappointed in the code generated, based on
> the few peeks I had at the generated code.
> This is HC08 which I'm talking about, which is, if I understand
> correctly, rather a resent port,
> so I understand that it is early days yet.
>
> My simple litle function:
>
> static char* bf;
>
> static void out(char c) {
> *bf++ = c;
> }
>
> compiled into:
>
> 89 ;printf.c:37: static void out(char c) {
> 90
> ; -----------------------------------------
> 91 ; function out
> 92
> ; -----------------------------------------
> E051 93 _out:
> E051 C7 00 98 94 sta _out_c_1_1
> 95 ;printf.c:38: *bf++ = c;
> E054 C6 00 87 96 lda _bf
> E057 B7 85 97 sta *_out_sloc0_1_0
> E059 C6 00 88 98 lda (_bf + 1)
> E05C B7 86 99 sta *(_out_sloc0_1_0 + 1)
> E05E 55 85 100 ldhx *_out_sloc0_1_0
> E060 C6 00 98 101 lda _out_c_1_1
> E063 F7 102 sta ,x
> E064 B6 86 103 lda *(_out_sloc0_1_0 + 1)
> E066 AB 01 104 add #0x01
> E068 C7 00 88 105 sta (_bf + 1)
> E06B B6 85 106 lda *_out_sloc0_1_0
> E06D A9 00 107 adc #0x00
> E06F C7 00 87 108 sta _bf
> E072 109 00101$:
> E072 81 110 rts
>
> where as I was expecting something along the lines:
>
> ldxh _bf
> sta ,x
> aix #1
> stxh _bf
> rts
>
> Please don't get me wrong, I'm not critizing but more interested in
> weather
> this is going to improve and if so, what sort of time span we are
> talking
> about?
>
> Is anyone specifically working on this (HC08 port)?
>
> I've writen one or two compilers and assemblers myself so I
> know getting the compiler to produce efficient code for small cpus is
> not trivial.
>
>
> br Kusti
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user