Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC77-971101D

NC77WA V.4.00 Release 1
NC77 V.4.00 Release 1
Precaution

Please note the following errors concerning C compilers NC77 V.4.00 Release 1 and NC77WA V.4.00 Release 1 (with assembler), both used with the 7700/7751/7770/7790 Series. These errors will be corrected in the next upgraded version.



32-bit constant value cannot be cast to a far pointer.
  1. Summary

    When 32-bit size value is cast to a far pointer, the upper 16 bits are lost.

  2. Occurrence Conditions

    This error only occurs when all of the following conditions are fulfilled at the same time.

    • 32-bit size constant value is used.
    • The above constant is cast to a far pointer.

  3. Error Phenomena

    Only the lower 16 bits of the 32-bit constant are used. The upper 16 bits are ignored.

  4. Error Example
    [C language source example]
         ------------------------------------
           char    i;
    
           void func(void)
           {
    
                  i = *(char far *)0x123456;
    
           }
         ------------------------------------
    

    [Generated code example]
         ------------------------------------------------------------------
           ;## # C`SRC :          i = *(char far *)0x123456;
                  sem
                  lda     A,LG:03456H      /* <-Higher-order is ignored */
                  sta     A,DT:_i
         ------------------------------------------------------------------
    

  5. Solution

    Please use the #pragma ADDRESS instead of casting the constant value.


Double-to-double division may not perform properly.
  1. Summary

    Division of double operands, both of which are global variables, may return the wrong result.

  2. Occurrence Conditions

    This error only occurs when all of the following conditions are fulfilled at the same time.

    • Division of two double type variables.
    • The variables are both global variables.
    • The variables are both declared as near.
    • There is an instruction including a sem instruction just before the division.

  3. Error Phenomena

    There is an instruction which is supposed to include clm instruction, but the clm instruction is not there. Therefore the sem condition is held and the operation returns a wrong value. Because clm instruction doesn't exist, the instruction that should be executed after clm is executed by a state of sem.

  4. Error Example
    [C language source example]
         ------------------------------------
          double d1, d2;
    
          double func(char ch)
          {
                 double  d = 0.0;
    
                 if( ch == 0 )
                         d = d1 / d2;
                 return d;
          }
         ------------------------------------
    

    [Generated code example]
         ----------------------------------------------------------------------
          ;## # C`SRC :          if( ch == 0 )
                 sem
                 lda     A,DP:17 ;  ch
                 bne     L1
                 .cline  8
          ;## # C`SRC :                  d = d1 / d2;
    
                 lda     A,DT:_d1+6   /* <- Data is pushed by a state of sem. */
                 pha
                 lda     A,DT:_d1+4
                 pha
                 lda     A,DT:_d1+2
                 pha
                 lda     A,DT:_d1
                 pha
         -----------------------------------------------------------------------
    

  5. Solution

    This error only occurs with global variables. Please copy the data into an auto variable and perform the calculations as an auto variable.


Auto variable offset may deviate when option -OSFA is specified.
  1. Summary

    When the auto variable is an odd-numbered size, and option -OSFA (-Ostack_fram_align) is specified, the auto variable offset may deviate.

  2. Occurrence Conditions

    This error only occurs when all of the following conditions are fulfilled at the same time.

    • Option -OSFA is specified.
    • There is no auto variable which is an odd-numbered size.
    • The odd-numbered size auto variable is not used with other auto variables, and therefore, they are overlapped in the stack area.

  3. Error Phenomena

    The auto variable offset value is not correctly set.

  4. Error Example
    [C language source example]
         ------------------------------------
          int func(void)
          {
                 char c;
                 int i;
    
                 i=c;
                 return i;
          }
         ------------------------------------
    

    [Generated code example]
         ------------------------------------------------------------------
          ;## # C`SRC :          i=c;
                 sem
                 lda     A,DP:0  ;  c        /* <- offset is abnormal */
                 clm
                 and.W   A,#00ffH
                 sta     A,DP:1  ;  i
         ------------------------------------------------------------------
    

  5. Solution

    Please do not use option -OSFA.




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