0 Members and 1 Guest are viewing this topic.
void *buffer = malloc(LCD_SIZE);
printf("%d / %lu", LCD_SIZE, HeapAvail());
eliminating SAVE_STACK (saving/restoring the screen yourself, in an allocated memory block or through the method used by the Home Screen Restore program)
reducing call nesting
using the registers to pass parameters (__attribute__((__regparm__)) on single functions, -mregparm=5 compiler switch)
For -mregparm=5 compiler switch, I guess I have to add "-mregparm=5" at the end of the text box in Project->Options->Compilation->GCC Switches. Am I right ?
Are you saving and restoring the screen yourself to local buffers (buffers declared inside functions, as opposed to global buffers) ?
Yup. And that's a global switch which applies to all functions; if you wanted to enable it on several functions only, you'd use __attribute__((__regparm__(5))) in the definition of each of those functions
In any case, you can send me a copy of the code base, like the previous time I performed optimizations on it
I don't think I'll have time to do much on it before the week-end, though.
QuoteAre you saving and restoring the screen yourself to local buffers (buffers declared inside functions, as opposed to global buffers) ?Yes, it's already done
I applied the switch [-mregparm=5], it doesn't change anything...
so I will only have access to my computer on holiday