cpp init & machine check
"coles555" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hey guys,
I'm really stuck on this constructor function in the cpp-init. For
some reason Codewarrior keeps giving me machine check exceptions
during the branch command shown below:
{
003FA35C: 9421FFF0 stwu SP,-16(SP)
003FA360: 7C0802A6 mflr r0
003FA364: 90010014 stw r0,20(SP)
003FA368: 93E1000C stw r31,12(SP)
voidfunctionptr *constructor;
/*
* call static initializers
*/
for (constructor = _ctors; *constructor; constructor++) {
003FA36C: 3C600040 lis r3,64
003FA370: 3BE35340 addi r31,r3,21312
003FA374: 48000014 b __init_cpp+0x28 (0x3fa388)
(*constructor)();
003FA378: 819F0000 lwz r12,0(r31)
003FA37C: 7D8903A6 mtctr r12
003FA380: 4E800421 bctrl //MACHINE CHECK
}
003FA384: 3BFF0004 addi r31,r31,4
003FA388: 801F0000 lwz r0,0(r31)
003FA38C: 28000000 cmplwi r0,0x0000
003FA390: 4082FFE8 bne __init_cpp+0x1c (0x3fa378) //branch
to 003FA378
}
003FA394: 83E1000C lwz r31,12(SP)
003FA398: 80010014 lwz r0,20(SP)
003FA39C: 7C0803A6 mtlr r0
003FA3A0: 38210010 addi SP,SP,16
003FA3A4: 4E800020 blr
I'm not sure what is the bne instruction for, if anyone can help I
would really appreciated.
Lei
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/dN_tlB/TM
--------------------------------------------------------------------~->
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/