Re: [avr-gcc-list] avr-gcc ABI: return 8-bit value from function

2018-06-23 Thread Georg-Johann Lay
Benoit Steinmetz schrieb: hi all I have written a function in AVR assembler that returns an 8-bit result. The function is called from C, so it should respect the avr-gcc ABI. I am a bit confused as to whether the function is required to zero/sign-extend the 8-bit result to 16 bits or not.

Re: [avr-gcc-list] avr-gcc ABI: return 8-bit value from function

2018-06-06 Thread Benoit Steinmetz
One question: Does the omission of sign extension by avr-gcc remain without optimisation for size? Thank you for your suggestion, I did not think of that. When I compile without any optimization at all, the sign extension by the called function is also missing, like with optimizations enabled.

Re: [avr-gcc-list] avr-gcc ABI: return 8-bit value from function

2018-06-05 Thread Bruce D. Lightner
Benoit, See "C WITHOUT RAM" section of this 2006 article named "Tiny AVR Serial Port Programmer". http://www.lightner.net/avr/2605018Lightner.pdf ...and this Webpage... http://www.lightner.net/avr/ATtinyAvrGcc.html Compiling C-code for an AVR like the ATtiny2313 with few resources---and