<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial>
<P><SPAN id=_ctl0_dgMessages__ctl2_lblPost>Hello, <BR><BR>I am trying to debug a
crash during memcpy while copying data from the FCM buffer of an mpc8536 to the
ddr ram. I debugged memcpy enough through my BDI3000 to see that the entire
contents of the fcm buffer I want moved are actually moved off to memory
location I specify. The crash comes after it memcpy finishes copying and
performs the instruction "2: cmplwi 0,r5,4": <BR><BR>memcpy: <BR>rlwinm.
r7,r5,32-3,3,<WBR></WBR>31 /* r0 = r5 >> 3 */ <BR>addi r6,r3,-4 <BR>addi
r4,r4,-4 <BR>beq 2f /* if less than 8 bytes to do */ <BR>andi. r0,r6,3 /* get
dest word aligned */ <BR>mtctr r7 <BR>bne 5f <BR>1: lwz r7,4(r4) <BR>lwzu
r8,8(r4) <BR>stw r7,4(r6) <BR>stwu r8,8(r6) <BR>bdnz 1b <BR>andi. r5,r5,7 <BR>2:
cmplwi 0,r5,4 <BR><BR>contents of r5 are 0x0 showing that the entire 0x1000 size
transfer I specified correctly finished. At this point I can check the memory
contents through my BDI and verify all the data is in the ddr as I expect. Now
the strange thing happens, if I execute the "cmplwi 0,r5,4" the program takes an
exception and eventually gets struck at exception vector 0x700 which I saw from
start.S is an "Alignment" exception. I am not sure what this exception means,
can someone help me understand what is happening? <BR><BR>Does this exception
somehow mean that memcpy did not move all the data? Does memcpy expect contents
of r5 to be 4 and not 0 when it hits the cmplwi instruction?
<BR></SPAN></FONT></P></DIV>
<DIV align=left><FONT size=2 face=Arial><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Fahd Abidi<BR>Product
Manager - Technical Tools and <SPAN
lang=EN>Development</SPAN></SPAN></FONT></DIV>
<DIV align=left><FONT size=2 face=Arial><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Ultimate Solutions,
Inc.<BR></SPAN><SPAN style="COLOR: #0080c0; FONT-SIZE: 10pt"><FONT
face="Times New Roman">================================================================</FONT></SPAN><SPAN
style="COLOR: teal; FONT-SIZE: 10pt"><BR></SPAN><EM><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Your Single Source
for Professional Development Tools and Embedded
Solutions</SPAN></B></EM><B><I><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><BR></SPAN></I></B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Ph: 978-455-3383
x255<BR>Fx: 978-926-3091<BR>Email: fabidi@ultsol.com<BR>Visit: </SPAN><A
title=blocked::http://www.ultsol.com/ href="http://www.ultsol.com/"><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"
title=blocked::http://www.ultsol.com/><FONT
color=#800080>http://www.ultsol.com</FONT></SPAN></A><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"> </SPAN></FONT></DIV>
<DIV> </DIV></BODY></HTML>