Ran the comment and indent tools on the source code.

This commit is contained in:
skarg
2008-04-24 01:07:23 +00:00
parent 2ed87c2e0c
commit 3d3d7e420d
11 changed files with 345 additions and 350 deletions
+10 -16
View File
@@ -143,31 +143,25 @@ static void input_switch_read(
extern uint8_t _end;
extern uint8_t __stack;
#define STACK_CANARY (0xC5)
void StackPaint(void) __attribute__ ((naked)) __attribute__ ((section (".init1")));
void StackPaint(
void) __attribute__ ((naked)) __attribute__ ((section(".init1")));
void StackPaint(void)
void StackPaint(
void)
{
#if 0
uint8_t *p = &_end;
while(p <= &__stack)
{
while (p <= &__stack) {
*p = STACK_CANARY;
p++;
}
#else
__asm volatile (" ldi r30,lo8(_end)\n"
" ldi r31,hi8(_end)\n"
" ldi r24,lo8(0xc5)\n" /* STACK_CANARY = 0xc5 */
" ldi r25,hi8(__stack)\n"
" rjmp .cmp\n"
".loop:\n"
" st Z+,r24\n"
".cmp:\n"
" cpi r30,lo8(__stack)\n"
" cpc r31,r25\n"
" brlo .loop\n"
" breq .loop"::);
__asm volatile (
" ldi r30,lo8(_end)\n" " ldi r31,hi8(_end)\n" " ldi r24,lo8(0xc5)\n" /* STACK_CANARY = 0xc5 */
" ldi r25,hi8(__stack)\n" " rjmp .cmp\n" ".loop:\n"
" st Z+,r24\n" ".cmp:\n" " cpi r30,lo8(__stack)\n"
" cpc r31,r25\n" " brlo .loop\n" " breq .loop"::);
#endif
}
#endif