#308 Omit stack frame for one-arg __wparam function

open
nobody
5
2011-01-03
2011-01-03
Christopher Head
No

If I compile the attached file with the following command:

$ sdcc --std-sdcc99 -mpic16 -p18f65j50 --fomit-frame-pointer --obanksel=1 --optimize-cmp --optimize-df --use-non-free -c spi.c

The generated function creates a stack frame, even though it is completely unnecessary (there are no local variables and the only parameter is passed in WREG).

$ sdcc --version
SDCC : pic16/pic14 3.0.0 #6037 (Nov 8 2010) (Linux)

Discussion

  • Example source file

     
    Attachments