From: SourceForge.net <no...@so...> - 2004-09-26 19:26:17
|
Bugs item #1035119, was opened at 2004-09-26 19:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1035119&group_id=599 Category: pic16 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: ccsporters (tecodev) Assigned to: Nobody/Anonymous (nobody) Summary: Errors in PIC16's genMinus Initial Comment: The following program produces incorrect results where indicated: #include <pic18fregs.h> #pragma stack 0x300 0x100 int main () { volatile long res, val1, val2; volatile long lres, lval1; PORTE=0; res = 0x1234; res = 12 - res; // patch at 1500 (this failed) val2 = 0x4567; res = 0x2345; res = res - val2; // patch at 1569 val1 = 0x2345; res = 0x2344; res = val1 - res; // patch at 1573 (this failed) lval1 = 0x12345678L; lres = 0x23456789L; lres = lres - lval1; // patch at 1569 (this failed) return 0; } I uploaded a patch for these issues. The patch also simplifies the genMinus' code by introducing efficient code for a more general case than before (especially patching at 1488,1549 does so). I left in "comments" for your convenience, feel free to remove them. Raphael Neider ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1035119&group_id=599 |
From: SourceForge.net <no...@so...> - 2004-10-01 22:04:11
|
Bugs item #1035119, was opened at 2004-09-26 22:26 Message generated for change (Comment added) made by vrokas You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1035119&group_id=599 Category: pic16 target >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: ccsporters (tecodev) >Assigned to: Vangelis Rokas (vrokas) Summary: Errors in PIC16's genMinus Initial Comment: The following program produces incorrect results where indicated: #include <pic18fregs.h> #pragma stack 0x300 0x100 int main () { volatile long res, val1, val2; volatile long lres, lval1; PORTE=0; res = 0x1234; res = 12 - res; // patch at 1500 (this failed) val2 = 0x4567; res = 0x2345; res = res - val2; // patch at 1569 val1 = 0x2345; res = 0x2344; res = val1 - res; // patch at 1573 (this failed) lval1 = 0x12345678L; lres = 0x23456789L; lres = lres - lval1; // patch at 1569 (this failed) return 0; } I uploaded a patch for these issues. The patch also simplifies the genMinus' code by introducing efficient code for a more general case than before (especially patching at 1488,1549 does so). I left in "comments" for your convenience, feel free to remove them. Raphael Neider ---------------------------------------------------------------------- >Comment By: Vangelis Rokas (vrokas) Date: 2004-10-01 21:40 Message: Logged In: YES user_id=770505 Patch applied succesfully. Bug fixed in SDCC v.2.4.5 #851 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1035119&group_id=599 |