 |
|
 |
MESC TOOL NEWS:
MESCT-NC77WA-000616D
Please take note of the following problem in using C compiler NC77WA (old versions) for the 77xx series of microcomputers:
-
Versions Concerned
| NC77WA V.4.00 Release 1 -- V.5.00 Release 1 |
* This problem does not occur in NC77WA V.5.10 Release 1 or later.
-
Problem
In the program containing loop statements with a backward jump, the m and x flags may not indicate correct status: then, the program will not run normally in such a case.
* Even if no loop statement is contained, it is probable that the same problem occurs depending on optimization relating to a jump instruction.
- 2.1 Conditions
- This problem occurs if the following two conditions are satisfied:
- (1) A set of statements with an backward jump contains another set of statements with one or more backward jumps.
- (2) Within a set of statements with an backward jump are included data of type char and that of other type.
- 2.2 Example
-
-------------------------------------------------------------
char io;
char pc;
void func(void)
{
char c;
int i;
while( 1 ){
while( 1 ){
i++;
c = io;
if( c != 0 )
break;
}
if( c == 1 ){
while( 1 ){
if( c != 3 )
break;
c = io;
if( c != 0 )
pc = c + 1;
}
}
}
}
-------------------------------------------------------------
* Even in the program described in the above example, the problem
may not occur depending on optimization.
-
Workaround
If this problem should occur, use the asm function to force change of the m and x flags.
[Example]
-------------------------------------------------------------
:
:
if( c == 1 ){
while( 1 ){
if( c != 3 )
break;
c = io;
if( c != 0 )
pc = c + 1;
asm( 0,0 ); /* Added */
}
}
:
:
-------------------------------------------------------------
-
Schedule of Fixing Problem
Please use NC77WA V.5.10 Release 1 or later versions since they have already been fixed.
* The customer who has their license ID can download the latest version of the product without charge from HERE.
|
 |