Re: [Sdcc-user] STM8 - optimizations

2014-10-02 Thread Ben Shi
georg, 1. could please show a piece of c code which can be compiled to the redundant asm ? as simple & short as possible. 2. you are welcome to create patch tickets on sourceforge with any stm8 optimized functions. ben -- 发自我的网易邮箱手机智能版 在 2014-10-02 22:57:08,"Georg Ottinger" 写道: >ok - aft

Re: [Sdcc-user] STM8 - optimizations

2014-10-02 Thread Georg Ottinger
ok - after figuring out that A is 8Bit wide (what i should have expected on an 8Bit arch) - i have two proposals for Peephole optimizations. 1.) ld a,(x) ld xl,a inc (direct) ld a,xl ret to ld a,(x) inc (direct) ret 2.) ld xl, a ld a, xh to rlwa (rotate word left through accumulator) (unde

Re: [Sdcc-user] STM8 - optimizations

2014-10-02 Thread Georg Ottinger
hmm ... is ld a, (x) on stm8 a byte wise operation??? Am 2014-10-02 um 16:10 schrieb Georg Ottinger: > I just figured out that > s > ld a,(x) > ld xl, a > ld a, xl > > acutally is usefull code - to zero the Upper Byte of A > > > > Am 2014-10-02 um 16:03 schrieb Georg Ottinger: >> congrats

Re: [Sdcc-user] STM8 - optimizations

2014-10-02 Thread Georg Ottinger
I just figured out that ld a,(x) ld xl, a ld a, xl acutally is usefull code - to zero the Upper Byte of A Am 2014-10-02 um 16:03 schrieb Georg Ottinger: > congrats to Ben Shi - his lastest patch - just shrunk my firmware from > 4210 Bytes to 4039 Bytes thanks to _mullong_stm8 > > I had a