I'm sorry I don't have the time to look deeper into your
patches right now. I do welcome them though. And as long
as they are in the tracker they will not be forgotten,
esp. if they solve bugs and the patch is mentioned in
the bug item. My main concern with SDCC is still fixing
as many bugs when I find the time.
Thanks for your patience (I hope)
> Dear SDCC developers and users,
> because of I have stuck on the broken SDCC inline support years
> ago and we still maintain compatibility for MCS51 in our project
> we cannot keep hackery to burden moder RISC cores, I have
> decided to solve things on right side - in SDCC compiler.
> There is wainting series of patches developed to solve BUG #1767885
> from September.
> I believe, that it is usable for many people stuck on
> the same problem. So I bringing attention to it again.
> I am not sure, if it is clean enough for mainline, but nobody
> from people maintaining the SDCC core has not found time to reply.
> - This is required the functions in initializers has to be expanded
> - Move temporary inline return value storage in front of declarators.
> This seems be required for correct functionality of expansion
> of inline functions block variable declarations and default
> values assignment.
> - this patch has been used to help debugging
> Only reply I have received has been from TinyOS community. I have spent
> some time to find problems when they reported problems with my
> patches. The testing resulted in yet two another patches
> - this one fixes missing processing of switch statement
> during inline functions expansion. To solve that, I have
> used case labels suffixed.
> - this patch adds completely missing for statements processing
> during inline functions expansion.
> The patched SDCC can compile complex libraries with multi-levels inline
> functions in headers and result code runs under simulator.
> I have continued a little with TinyOS cases as well.
> The tinyos8051wg projects some functions marking to make
> SDCC more happy after our discussion. More of simple test applications
> can be compiled with inline support. There are still problems
> with stile of inline use in NESC for more complex ones.
> I have done some testing with RS232 Uart Echo application.
> tinyos-2.x-contrib/diku/common/apps/Echo$ make c8051F340TB
> I have managed it to compile with patched SDCC and to run under
> s51 simulator. I have to delete CLKMUL setup from
> PlatformP__GPIOInit__init to run it under s51. But there is still
> problem that
> //# 110 "/home/pi/repo/tinyos/tinyos-2.x-contrib/diku/mcs51/tos/chips/mcs51/mcs51hardware.h"
> static inline __nesc_atomic_t __nesc_atomic_start(void );
> definition is put after the function use by NESC compiler. I.e.:
> static inline int f1(void);
> void main(void)
> int i;
> i =
> static inline int f1(void)
> return 1;
> This is correct according to C99 standard, but requires to start
> inline expansion after whole unit (source file) is parsed
> into AST (compile unit-at-a-time). This would involve big changes
> in SDCC which are above my time constrains. When the NESC generated
> code is manually fixed (function definitions moved before its use),
> code compiles and runs in simulator.
> This is special case, which has made problems to GCC before
> 3.4.0 version as well
> This is not so critical so I think, that rest of the
> my work could be reviewed and usable parts integrated
> to not waste effort and use finding as base for future
> development. Changes should have minimal (according to my
> analysis zero) effect on non inlined code generation.
> Possible breakages user codebase utilizing inline functions
> should not be critical, because inline has been almost
> unusable and heavily broken till now.
> Best wishes
> Pavel Pisa
> e-mail: pisa@...
> www: http://cmp.felk.cvut.cz/~pisa
> university: http://dce.felk.cvut.cz/
> company: http://www.pikron.com/
> > Re: [sdcc-devel] Fix proposal for bug #1767885 - Parameters lost from scope
> > of intermediate inline function From: Frieder Ferlemann
> > <frieder.ferlemann@......> - 2009-08-11 18:30 Hi Pavel,
> > Pavel Pisa schrieb:
> > > please, look at my patches series which allowed me compile
> > > highly inlined code (main parts of uLUt library) and resulting
> > > code worked on mcs51 in s51 simulator as expected.
> > seems you are hit by summer vacation and/or those who could
> > review your patches are otherwise busy...
> > Your patches might also be of interest for nesC
> > http://en.wikipedia.org/wiki/NesC
> > http://www.tinyos.net/tinyos-2.x/doc/txt/tep121.txt (section 3.4.4)
> > http://www.tinyos8051wg.net/
> > Greetings,
> > Frieder
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> Sdcc-user mailing list