From: SourceForge.net <no...@so...> - 2004-11-17 18:03:23
|
Bugs item #1068154, was opened at 2004-11-17 17:40 Message generated for change (Comment added) made by tecodev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1068154&group_id=599 Category: pic16 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: ccsporters (tecodev) Assigned to: Nobody/Anonymous (nobody) Summary: unsigned multiplication 8bit x 8bit --> 16 bit fails Initial Comment: Mutliplication of two 8 bit numbers with a desired 16/32 bit result fails to initialize/assign to the higher result bytes. This also causes failures when accessing (2 dimensional) arrays like: <code> typedef unsigned char byte; byte large_data[3][4] = { {1,2,3,4}, {6,7,8,9}, {8,7,6,5} }; byte demo1 (byte a, byte b) { return large_data[a][b]; } int main () { demo1(2,4); } </code> The errors are located in genarith.c, pic16_genUMult8XLit_8() and are resolved (hopefully) by the attached patch. Raphael Neider ---------------------------------------------------------------------- >Comment By: ccsporters (tecodev) Date: 2004-11-17 18:03 Message: Logged In: YES user_id=1115835 My last patch had a typo -- new fix available... Raphael Neider ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1068154&group_id=599 |