Discuss here different C compiler set ups, and compiling executables for the ESP8266
User avatar
By Squonk
#584
jcmvbkbc wrote:...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.

OK, a good test will be to compile the IoT Demo and at apps that we have and we will be able to get an idea on at least the generated code size.

As for speed, we can generate common testbenches (for what they are), and see if there is an impact on performance or not.
User avatar
By sounds
#609 How hard would it be to measure the number of cycles for the supported instructions?

@jcmvbkbc I'm taking a look. I may not post any contributions until I actually have something solid. It doesn't bother me to rebase on top of your commits. :)
User avatar
By jcmvbkbc
#610
sounds wrote:How hard would it be to measure the number of cycles for the supported instructions?

Rough first approximation is one cycle/instruction, taken branch adds minimum 2 cycle delay, using register right after load adds 1 cycle delay.
There's an exhaustive description of the pipeline in the end of xtensa data book, if you have VM with Tensilica tools it must be located in the tools tree, XtDevTools/downloads/<release>/docs/xtensa*_data_book.pdf

Edit: and if you want to actually measure there's ccount special register that gets incremented on each cycle, you can use rsr.ccount to read it and wsr.ccount to write.

sounds wrote:@jcmvbkbc I'm taking a look. I may not post any contributions until I actually have something solid. It doesn't bother me to rebase on top of your commits. :)

Ok.
User avatar
By Sprite_tm
#794 Does anyone here have had any progress? I've tried marking A0 as clobbered in xtensa.md for the call_whatever instruction expansions, like the arm sources have, but no dice. Also tried to declare #define EPILOGUE_USES(REGNO) ((REGNO)==A0_REG) which should tell gcc that A0 is used by the epilogue, but it just doesn't seem to want to save the damn register when doing calls. I *think* I'm missing something in the prologue that tells gcc that there's something important in the A0 register that shouldn't be overwritten, but I can't figure for the life of me how to do that...