-->
Page 1 of 55

New Working GCC for ESP8266

PostPosted: Mon Sep 15, 2014 8:57 am
by jcmvbkbc
@sounds or anyone with gcc hacking experience,
I've taken stab at adding call0 support in gcc: https://github.com/jcmvbkbc/gcc-xtensa/ ... all0-4.8.2
The cross-compiler is now able to bootstrap, but
- stack frame support is broken (-fomit-frame-pointer "fixes" that)
- callee-saved registers are not saved, a0 is not saved in non-leaf functions
- non-local jump code is just commented out, needs more attention.

Looks like after fixing callee-saved register saving and a0 it should be able to generate working code.
I'll continue on it next weekend, pointers and patches are welcome meanwhile.

Re: Using GCC to program the ESP8266

PostPosted: Mon Sep 15, 2014 9:44 am
by Squonk
@jcmvbkbc: Thank you for your work!

Unfortunately, I don't know GCC enough to be able to help :roll:

However, from the above Cadence presentation, it looks like XCC is much more efficient than GCC (15-20% average performance improvement on general C code and up to 10% code size improvement when compiling for optimal code size).

As the document is from 2007, is it still true today?

Re: Using GCC to program the ESP8266

PostPosted: Mon Sep 15, 2014 10:44 am
by jcmvbkbc
Squonk wrote:However, from the above Cadence presentation, it looks like XCC is much more efficient than GCC (15-20% average performance improvement on general C code and up to 10% code size improvement when compiling for optimal code size).

As the document is from 2007, is it still true today?

...and the gcc mentioned is from 2001. Well. It says a lot about VLIW (that lx106 doesn't have) and SIMD (that lx106 doesn't have as well) and TIE instructions (that lx106 doesn't have either). I don't know how efficient xcc is when limited to basic instructions.

Re: Using GCC to program the ESP8266

PostPosted: Mon Sep 15, 2014 10:50 am
by jonsmirl
Someone has posted the disassembled ROM source. Compare a couple of subroutines and see how they handle registers.