Hi all,
I have been trying to use the callee-saves option to specify that an
external function (that's not part of my code) should be called without
saving registers (because it would be optimal to do so - the func is
just a few MOVs of immediate values to peripheral registers and then a
RET), but it does not appear to be working.
I've tried with both #pragma callee_saves and --callee-saves
command-line option.
(By the way, am I using the #pragma right? I'm assuming the #pragma
statement needs to be present in the source file where the function call
is made, not in, say, an included .h header.)
Either way, it does not have the expected effect on the code. I was
expecting the following code to lose the pushing and popping of the A
register when _some_func is declared callee-saves:
push a
call _some_func
pop a
But it doesn't change.
This wouldn't happen to be one of those SDCC features that is
8051-specific, but not documented as such?
Regards,
Basil Hussain
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user