Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC30WA-980701D

NC30WA
V.2.00 Release 1, V.3.00 Release 1
Precaution

Please take note of the following problems in using C compiler NC30WA V.2.00 Release 1 and V.3.00 Release 1 for the M16C/60 series of microcomputers.



On Upgraded Compilers
When a C compiler is upgraded, codes generated by the most recent release may be different from those by the previous one owing to enhanced functionality. Therefore, you are recommended to confirm the operations of your application programs after you have upgraded your compiler.


On Divide Operations
  1. Description
    When a value of type signed int or signed long is divided by an immediate value and assigned to a variable with a shorter type, an incorrect code is output.

  2. Conditions
    This problem occurs if both of the following conditions are satisfied:
    1. Divide operation char = signed int / immediate value is performed
    2. The immediate value is within 0x80--0xff

    This problem also occurs if both of the following conditions are satisfied:
    1. Divide operation int = signed long / immediate value is performed
    2. The immediate value is within 0x8000--0xffff
         -----------------------------------------------------------------------
         [C Language Source]
              func(){
    
                    char c;
                    int i;
    
                    c=i/0x80;
    
              }
    
    
  3. Workaround
    If a dividend does not need to be of type signed int or long, cast it to or re-declare it with an unsigned type; otherwise, assign the result of the operation temporarily to a TMP variable of the same type as the dividend and then transfer it to the final result.


NC30WA V.2.00 Release 1, V.3.00 Release 1 Precaution
MESCT-NC30WA-980701D

On Stack Information about bcopy Function
  1. Description
    When a bcopy function exists in a .stk file generated with option -fSSU, an excessive "_" (underscore) is prefixed to the function name.

  2. Conditions
    This problem occurs if all the following three conditions are satisfied:
    1. A structure is being transferred
    2. A bcopy function is called
    3. Option -fSSU (-fshow_stack_usage) is given
         -----------------------------------------------------------------------
         [C Language Source]
              struct tag{
                  unsigned int i;
                  unsigned char c[10];
              };
    
              far struct tag *a;
              far struct tag *b;
    
              main()
              {
                    *a=*b;
              }
    
    
  3. Example
         -----------------------------------------------------------------------
         [Contents of .stk File]
              FUNCTION main
                      context            3 bytes
                      auto               0 bytes
                      f8regSize          0 bytes
    
                                12 bytes PUSH &       CALL _bcopy
                                12 bytes PUSH (MAX)
    
    
  4. Workaround
    Modify the generated .stk file as follows:

         [Original]    12 bytes PUSH &       CALL _bcopy
         [Modified]    12 bytes PUSH &       CALL  bcopy
    




© 2008. Renesas Technology Corp., All rights reserved. Privacy | Legal