Return values from functions are placed to the appropriate registers following a modified Microchip policy optimized for SDCC. The following table shows these registers:
size | destination register |
8 bits | WREG |
16 bits | PRODL:WREG |
24 bits | PRODH:PRODL:WREG |
32 bits | FSR0L:PRODH:PRODL:WREG |
>32 bits | on stack, FSR0 points to the beginning |