59 asm("orrne r1, r1, #1 "); |
59 asm("orrne r1, r1, #1 "); |
60 asm("strne r1, [sp, #80] "); // if THUMB, set bit 0 of return addr |
60 asm("strne r1, [sp, #80] "); // if THUMB, set bit 0 of return addr |
61 |
61 |
62 asm("mov r11, sp "); // save stack pointer |
62 asm("mov r11, sp "); // save stack pointer |
63 |
63 |
|
64 #if 0 /* IMK: Temorarily deleting these __EH_FRAME calls to discover if the suspect |
|
65 GCCE definitions of them are behind a kernel panic. */ |
|
66 |
64 // The frame starts 84 bytes (up) from r11 i.e. CFA is r11 + 84 |
67 // The frame starts 84 bytes (up) from r11 i.e. CFA is r11 + 84 |
65 __EH_FRAME_ADDRESS(sp, 84) // Reg needs to be sp (=r11) here for gcce |
68 __EH_FRAME_ADDRESS(sp, 84) // Reg needs to be sp (=r11) here for gcce |
66 // we can only restore callee-save values, but that's what we want if we 'leave' |
69 // we can only restore callee-save values, but that's what we want if we 'leave' |
67 // saved link is -8 bytes from CFA (= r11 + 0x24 + 0x20 + 0x8) |
70 // saved link is -8 bytes from CFA (= r11 + 0x24 + 0x20 + 0x8) |
68 __EH_FRAME_SAVE1(lr, -8) |
71 __EH_FRAME_SAVE1(lr, -8) |
|
72 #endif |
69 |
73 |
70 // the other callee saves start at -48 from CFA (= r11 + 0x24) |
74 // the other callee saves start at -48 from CFA (= r11 + 0x24) |
71 #if 0 |
75 #if 0 |
72 // would like to say this |
76 // would like to say this |
73 __EH_FRAME_SAVE1(r4-r11, -48) |
77 __EH_FRAME_SAVE1(r4-r11, -48) |
74 // but the macro expansion gives rise to odd code so we do what follows |
78 // but the macro expansion gives rise to odd code so we do what follows |
75 #endif |
79 #endif |
76 #if defined(__ARMCC__) |
80 #if defined(__ARMCC__) |
77 FRAME SAVE {r4-r11}, -48 |
81 FRAME SAVE {r4-r11}, -48 |
78 #elif defined(__GCCE__) |
82 #elif defined(__GCCE__) |
|
83 #if 0 /* IMK: see above */ |
79 __EH_FRAME_SAVE1(r4-r11,-48) |
84 __EH_FRAME_SAVE1(r4-r11,-48) |
|
85 #endif |
80 #else |
86 #else |
81 #error What compiler? |
87 #error What compiler? |
82 #endif |
88 #endif |
83 |
89 |
84 |
90 |