Hi,
> I am using the pic14 port, currently with 16F627 and F648.
> I am updating the compiler once a week to the latest snapshot...
>
> I would like to ask the following:
>
> - How can I optimise those silly banksel instructions before each
> variable access?
No real chance here right now, sorry.
I am about to teach SDCC/pic14 to cluster function-local variables into a
single bank so that there will not be any banksel when accessing r0x<number>,
but this will still take some time.
Furthermore, an option to allocate all locals and globals defined within a
single .o file into one bank might be (re)introduced, hopefully removing
numerous further banksels. Again, this will take time and thought ;-)
> - Can I control the generation of the banksel instructions?
No.
> - Are there a way to tell the compiler to optimise the generation
> of the banksels?
No.
> - Are there any way to use the inline function feature?
No.
> I know it is not supported and I can define an empty inline to
> overcome, but how to achieve the same functionality?
The only option I am aware of is to turn the function into a macro:
int foo(char bar) { int res; do semething; return res; }
becomes
#define foo(bar, result) do { int res; do something; result = res; } while (0)
and
a = foo(42);
becomes
foo(42, a);
> As I reading the docs the naked function seems to be the
> solution...
I dont think so, naked only leaves out the functio prologue and epilogue but
does not include the function body into the calling function. Register
allocation needs to be reconsidered to work across function boundaries for
inline to work as expected.
> - The peephole optimiser does not work for each rule!
> Eg. it will not do the "peep 3 - decf/mov/skpz to decfsz\n" for
> me.
> It is because the the compiler generate the
> " btfss STATUS,2\n"
> instead of:
> " btfss STATUS,z\n"
>
> Is it my fault or can I do something to overcome?
Thanks for the hint, I was not aware of this one!
I will look into it and try to get the rules working again, it *should* be
simply a matter of replacing zs with 2s...
> I wish Happy New Year to all the developers and the users of sdcc.
Thanks, same to you.
Regards,
Raphael
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user