Bugfix for newlib/libc/machine/m68k/memcpy.S misaligned memory access errors
Joerg Blattner
Joerg.Blattner@varian.com
Tue Jan 24 11:12:00 GMT 2012
Hello newlib
While using newlib 1.19 and 1.20 successfully to have a current gcc 4.6.1 based GNU toolchain for a legacy MC68332 based CPU Board for which we still have to maintain code, I encountered misaligned address runtime exceptions in newlib/libc/machine/m68k/memcpy.S running on a MC68332 CPU (CPU32 core).
While investigating this issue, I found the following discussion:
http://old.nabble.com/-PATCH--more-problems-with-newlib-libc-machine-m68k-memcpy.S-td27515903.html
The final version of the patch in the 2nd post from bottom has been proved to work in a productive environment.
All the credits for the fix go to the people participating to the linked discussion.
For convenience, I have attached a patch file containing the patch from the mentioned post above to this mail; it has to be applied to the current newlib 1.20 sources with the ignore-white-space option.
I think it would be a good thing to have this fix in the official newlib sources.
Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m68k_memcpy.S.patch
Type: application/octet-stream
Size: 3593 bytes
Desc: m68k_memcpy.S.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20120124/cb887c12/attachment.obj>
More information about the Newlib
mailing list