Home
Usage Restrictions - Renesas Electronics
Contents
1. Restriction on optimization for loop processing x Applicable O Not applicable Not relevant Check tool available Restrictions and Changes Additions to Specifications ZBG CD 10 0030 Attachment 1 4 78 Version 2 72 3 00 91 Restriction that an undefined symbol error occurs due x ololojolo O to if and goto statements 92 Restriction on flash external ROM re link function i olololo lolo during linking 93 Restriction whereby error E2288 is output x x x x x x O O O 94 Restriction on security ID and option byte x x x x O O O O 95 Restriction on floating point constants and integer type x x x x x x x x x 96 Restriction on input conversion for I O function in x x x x x x x x x standard library 97 Restriction on assignment in machine dependent x x x x x O10 0 0 optimization module 98 Restriction whereby data in an automatic variable area x x x 7 x x x 1 OO O O is illegally deleted 99 Restriction on address specification with U option of x x x x x x OO O O hx850 100 Restriction whereby strcmp and strncmp x x x x x x O o O operations differ 101 Restriction on string literal with 65 or more characters x x x x x x O Oo Oo 102 Restriction on optimization with assembler x x x x x x O O O 103 Restriction whereby an assignment s
2. Workaround Specify wo Nj to suppress the optimization that causes this bug or do not specify the optimization option Correction This restriction has been removed in Ver 2 41 No 69 Restriction on project manager during building Description The project manager freezes during building and commands will no longer be accepted Workaround There is no workaround In such a case shut down and restart the project manager Correction This restriction has been removed in Ver 2 41 No 70 Restriction on static function written in pragma section Description When a prototype of a static function is declared and defined in a pragma section the following error message will be output Message E2211 redeclaration of function name Example pragma section begin static void func static void func Overloading error pragma section end ZBG CD 10 0030 Attachment 1 34 78 Workaround Declare the prototype and define a static function outside the pragma section Correction This restriction has been removed in Ver 2 41 No 71 Restriction on pointer constant when accessing address with offset Description During expression transformation through the compiler s basic optimization if the value of the pointer constant exceeds 24 bits when indirectly accessing an address with an offset invalid code will be output Example void func int adr volatile unsigned char 0x400
3. Wi t abs_ptn_opt 0 Correction This issue has been corrected in Ver 3 10 A tool used to check whether this restriction applies is available Contact a n NEC Electronics sales representative or distributor for details No 98 Restriction whereby data in an automatic variable area is illegally deleted Description If the following conditions are satisfied some elements of an array or members of a structure or union in an automatic variable area are deleted and indirect referencing for that automatic variable might be performed incorrectly ZBG CD 10 0030 Attachment 1 60 78 Conditions 1 The second or a later element of an automatic array or the second or a later member of an automatic structure or union is directly referenced or its address is acquired 2 That automatic variable is placed at the lowest address of the automatic variable area in that function In such a case indirect referencing for an automatic variable placed at an address lower than the one referenced in 1 is performed incorrectly Example char val char p void func char str 12 Initialize the pointer by assigning the address of array str 4 to it p amp str 4 Indirectly references str 0 to str 3 by using p val p 1 lt This indirect reference is incorrect In this case only the 8 byte area from str 4 to str 11 is allocated Consequently indirect referencing for
4. str 0 to str 3 might be performed incorrectly 0123 4 5 67 8 9 101 Acquired address Elements or members are deleted illegally Workaround Assign the start address of the automatic variable to an external pointer that is modified with volatile Example char val char p char volatile dmy void func char str 12 Initialize the pointer by assigning the address of array str 4 to it p amp str 4 Assigns the start address of the array str to a dummy external pointer modified with volatile dmy amp str 0 Indirectly references str 0 to str 3 by using p val p 1 lt This indirect reference is correct Correction This issue has been corrected in Ver 3 20 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details ZBG CD 10 0030 Attachment 1 61 78 No 99 Restriction on address specification with uU option of hx850 Description Error F8651 occurs if the following conditions are satisfied Conditions 1 The option Ustart size Of Unum start size is specified 2 The hex conversion area is specified for the option in 1 and the specified area includes an address higher than the start address of a peripheral I O register area F8651 specified address area addrl addr2 overlaps I O area addr3 addr4 Workaround There is no workaround Correction T
5. ZBG CD 10 0030 Attachment 1 19 78 Workaround Do not nest a macro Correction This restriction has been removed in Ver 2 60 No 38 Restriction on invalid instruction sal Description If a sal instruction which does not exist in the device is specified the assembler does not output an error but outputs invalid code The compiler does not output this instruction Example sal 3 r10 Workaround There is no workaround Do not specify the sal instruction in source code Correction This restriction has been removed in Ver 2 40 No 39 Restriction on file name for linker directive file Description In the file name specification of a mapping directive a linker error occurs if a file name specified in braces begins with A F H L or V or the lowercase equivalent and the second character is a number Message 10850 syntax error line num string is illegal in file specification field Workaround Use file names that do not satisfy the above conditions Correction This restriction has been removed in Ver 2 30 No 40 Restriction on referencing specific symbols and reserved symbols in C source Description Target specific symbols such as _gp_DATA and reserved symbols such as _stext cannot be referenced in the C source Workaround Do not use a target specific symbol or reserved symbol in the C source Correction This problem will not be corrected so regard it as a specification No 41 Restriction
6. i 0 i lt INT_MAX i ary i sl 1 3 Specify oa or Ob as the optimization option Correction This issue has been corrected in Ver 3 40 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 105 Incorrect string literals Description If the following conditions are satisfied the contents of the string literal become incorrect Conditions 1 ASCII code 0x00 is used in a string literal 2 An ASCII code from 0x30 through 0x37 immediately follows 0x00 in 1 Example When the ASCII code following the ASCII code 0x00 is 0x37 char stringl x00 x37 char string2 000 067 char string3 x00 7 The correct output is 0x00 0x37 0x00 respectively but 0x07 and 0x00 are output Workaround Do one of the following 1 Initialize strings without using string literals char string4 x00 x37 0 2 Specify the ASCII code for a character other than 0x30 to 0x37 after 0x00 and then dynamically replace that character char string5 x00 string5 1 x37 ZBG CD 10 0030 Attachment 1 68 78 Correction This issue has been corrected in Ver 3 40 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 106 Restriction involving format specifiers for the sscanf fsca
7. I Variable void f1 sobj i sl 1 sobj i s5 1 sobj i s6 1 sobj i sl 1 sobj i s5 1 Compound assignment sobj i s6 1 Caution The following case is not affected by this bug because the element is resolved during compilation struct S2 short s1 7 short s2 7 short s3 7 short s4 7 short s5 7 short s6 7 sobj2 10 const int i 5 const Constant void 2 sobj2 i sl 1 sobj2 i s5 1 sobj2 i s6 1 sobj2 i sl 1 sobj2 i s5 1 sobj2 i s6 1 Workaround Do one of the following 1 Change the compound assignment to a simple assignment Example sobj i s5 sobj i s5 1 2 Specify the bit field members so they do not extend over a 32 bit boundary Example struct S short sl short s2 a wn wa short s3 short s4 7 short dummy 4 Dummy member short s5 7 Does not extend over a 32 bit boundary short s6 7 sobj 10 Correction This restriction has been removed in Ver 2 50 ZBG CD 10 0030 Attachment 1 41 78 No 80 Restriction on optimization for union containing integer and pointer Description If the conditions below are satisfied an error occurs in the optimization module and the optimization module stops without outputting an error message This issue do not apply if the optimization module ends normally without causing an error 1 Optimization is specifi
8. function due to optimization such as global optimization or loop optimization 5 Inthe function 2 the parameter of the function 1 is not referenced after the function 1 is called Example int fl int i i return i void f2 int pp int i int j 0 4 if i 0 volatile int vi f1 p 8 for ils F lt 2557 JFE r ZBG CD 10 0030 Attachment 1 31 78 void 3 void int i 1 The code on this line is illegally deleted int p amp i 2 f 2 p 0 1 A 1 to 8 correspond to the bug conditions 1 to 3 B Because the code in 4 is moved to the address immediately before 3 by the global optimization this applies to condition 4 Because the code in 4 is only used in the if statement block this code is moved to the address immediately before 3 in the if statement by optimization C Because there is no function reference in addresses after 3 this applies to condition 5 Workaround Specify wp f Wo Ni to suppress the optimization that causes this bug or do not specify the optimization option Correction This restriction has been removed in Ver 2 41 No 65 Restriction on allocating unsigned char variable to tidata_word section Description When the V850E is specified as the target device and an unsigned char variable is allocated to the tidata_word section invalid code might be output causing a linker error Example pragma section tidata_w
9. pragma pack 1 struct s 4 unsigned char a unsigned short b x x gt b 512 Workaround Change the unsigned short member to a short member Note that the variables vary depending on the type Correction This restriction has been removed in Ver 2 41 No 51 Restriction on assignment of a union including indirect assignment Description When optimizing the deletion of redundant assignment statements in a basic block the assignment in 1 is illegally deleted when the assignment instructions are written in the following order 1 Assignment for a union that does not use the address operator 2 Indirect assignment for an undefined address The following code might apply to undefined addresses e A pointer e A variable other than a pointer that is used as a pointer by casting e An absolute address Remark Undefined address Because a pointer is a variable it is not assigned a value just by declaring it Therefore the address pointed to by a pointer is also undefined 3 Reference or assignment to a member of the union described in 1 4 Assignment to a member of the union described in 1 ZBG CD 10 0030 Attachment 1 24 78 Example typedef union unsigned char a 2 unsigned short b U Ui 39 unsigned short p pia tr Hohe The code on this line is illegally deleted p 0 t b gt gt 4 t a l 3 Workaround Specify the wo Nce option This option suppresses propagation of copy
10. 72 SBG TT 0154 E July 12 2002 Addition of new restrictions No 73 to No 79 SBG TT 0218 E October 10 2002 Correction of restrictions No 2 No 3 No 14 No 28 No 43 No 44 No 60 No 71 No 73 No 74 No 75 No 76 No 77 No 78 and No 79 SBG DT 03 0027 E January 31 2003 Addition of new condition for restriction No 56 Addition of new restrictions No 80 to No 82 SBG DT 03 0167 E June 10 2003 Addition of new restrictions No 83 to No 87 Addition of new restrictions to other package tools No 1 and No 2 SBG DT 03 0218 E July 23 2003 Correction of restrictions No 9 No 10 No 11 No 19 No 36 No 37 No 56 No 80 No 81 No 83 No 84 No 85 No 86 No 87 and a part of No 61 SBG DT 03 0254 E September 26 2003 Correction of erroneous descriptions e Correction in No 9 No 10 No 11 No 19 No 36 and No 37 SBG DT 04 0005 January 9 2004 Addition of new restrictions No 88 and No 89 SBG DT 04 0119 March 24 2004 Addition of new restriction No 90 ZBG CD 04 0009 May 28 2004 Correction of restrictions No 1 No 35 No 59 No 61 No 88 No 89 and No 90 Addition of new restriction No 91 ZBG CD 04 0070 September 22 2004 Addition of new restriction No 92 ZBG CD 05 0026 March 30 2005 Addition of new restriction No 93 Addition of new restriction to other packag
11. AX USRTEXT d o libusr a crela USRTEXT1 SRELA N rela USRTEXT a o libusr a crela USRTEXT2 SRELA N rela USRTEXT b o libusr a crela USRTEXT3 SRELA N rela USRTEXT c o libusr a crela USRTEXT4 SRELA N rela USRTEXT d o libusr a Correction This restriction has been removed in Ver 2 41 ZBG CD 10 0030 Attachment 1 25 78 No 53 Restriction on wi 04 specification for switch statement Description If the wi 04 option is specified the V850E device is specified and a switch statement is used as table jump Ne optimization is performed incorrectly and the code is illegally deleted code Note In the CA850 table jump code is output when the following two conditions are satisfied for a switch statement e The number of case labels is 4 or more e The difference between the max and min values of the label is up to three times the number of case labels Workaround Specify the 01 option instead of the wi 04 option Correction This restriction has been removed in Ver 2 41 No 54 Restriction on global and static functions having the same name Description Even though global and static functions with the same name exist a duplicate definition error is not output Instead an invalid error message is output 1 An internal error C7318 illegal label xxxx is output 2 The invalid debugging information symbol Gxxxx
12. expression lt 5 gt The debugging information output option g is specified Example float f 70000 0 short s short func return s f Conditions 1 lt 1 gt 1 lt 2 gt 1 lt 3 gt Compilation result ld w Su fy cL mov ela 6 jarl a trices Wwy 1p mov POr E st h ELISS mov rill r10 lt The return value remains an int Workaround Specify the wo Xer option to suppress continuous use of the same register Correction This restriction has been removed in Ver 2 60 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 87 Restriction on interrupt function Description If the following conditions are satisfied the callt instruction to call run time execution of a function and 1 lt 4 gt prologue epilogue is illegally output to an interrupt function and execution cannot be returned by reti 1 The V850E is specified as the device used 2 One of the following options is specified lt 1 gt Xpro_epi_runtime on lt 2 gt An optimization option is specified e Os in Ver 2 41 or earlier e An option other than 0t is specified or optimization is not specified in Ver 2 50 3 An interrupt function is used for which the __ interrupt or__multi_interrupt qualifier is specified 4 The total size of the parameter area dynamic variable area and register area f
13. expression in an if statement and the branch condition in the conditional expression can be determined during compilation invalid code might be output Example void func struct st IRC T30 st int k 1 int st x 80 k st x 50 if k 0 1 k st x 50 if k 1 2 k st x 70 if k 1 f 3 A code to call f 3 is output k st x 70 if k 0 f 4 In the above example none of the conditions in the if statement are satisfied and therefore all the code to call f x can be removed by optimization However due to invalid optimization the code to call 3 is output Workaround Specify wi data_flow_opt 0 to suppress the optimization that causes this bug or do not specify 01 or Wi O4 Correction This restriction has been removed in Ver 2 41 No 73 Restriction on optimization for switch statement Description If the following conditions are satisfied a variable to which a register should not be assigned by optimization is assigned a register As a result invalid code might be output 1 The optimization option Os or 0t is specified 2 The switch statement outputs a table branch code Table branch code will be output in either the following cases e Xcase table is specified e Xcase ifelse Of Xcase binary is not specified and the following conditions are satisfied e The number of case labels is 4 or more e The difference between the maximu
14. is shifted differs 4 After being shifted the two values are not referenced 5 Both values are negative Example When a 2 and b 4 two values are negative int func int a int b a gt gt 1 Arithmetic right shift b gt gt 2 Arithmetic right shift if a b return 1 Equal sign comparison else return 0 Workaround Do one of the following 1 Specify wi hole4_opt 0 to suppress the optimization that causes the bug This is an option to suppress peephole optimization of 4 instructions 2 Remove the optimization option Correction This restriction has been removed in Ver 2 50 No 78 Restriction on union containing integer and pointer Description A compiler error will be output if an integer constant is assigned using a union containing an integer and pointer C5102 internal internal error in IvarNode IvarNode This bug occurs when the following conditions are satisfied 1 The optimization option Os or Ot is specified 2 There is a union containing an int long or unsigned int long anda pointer 3 An integer constant is assigned to the integer in the union in 2 4 After assignment an indirect reference indirect assignment or structure assignment is executed using the pointer in the union in 2 5 The integer constant in 3 can be optimized by propagation of copying in the basic block to the pointer access position in 4 Example struct S int a 10 s
15. is specified or the optimization option 0 is specified as an assembler option 3 When the debugging information output option g is not specified 4 The CPU bug prevention option the compiler option Xv850patch or the assembler option p is not specified Example e Assembler code addi 4 sp r15 ld w Ox4 11S 26 st w r16 Ox0 r14 ld w Ox8 r15 r17 add 8 sp Stack pointer rewriting code jmp lp e Assembler code after assembler optimization addi 4 sp r15 ld w Ose ELS EL add 8 sp Code moves to this location 1 st w r16 Ox0 r14 ld w Ox8 r15 r17 jmp lp If interrupt servicing occurs between 1 and 2 or 2 and 3 the subsequent operation will be invalid ZBG CD 10 0030 Attachment 1 33 78 Workaround Specify Oa as a compiler option or 0 as an assembler option Correction This restriction has been removed in Ver 2 41 No 68 Restriction whereby the compiler stops during optimization Description When the optimization option Os or Ot is specified the compiler abnormally stops during optimization for a source file that includes a function that satisfies the following conditions 1 Only directly accesses to an address 2 There is no parameter other than a structure 3 There is no return value Example define ADDRESS unsigned char 0x100000 void func void BRDDRESS ADDRESS gt gt 4 amp OxOf ADDRESS lt lt 4 amp Oxf0
16. not affect the processing when the project is rebuilt e Not added to the Include Files folder in the Project window e Not added to a makefile e Not treated as dependencies when building the project Example 1 xxx xxx include usrl h lt 3 double quotation marks before the include statement XXX XXX include usr2 h lt 6 double quotation marks before the include statement In the above code this restriction applies to usr1 h and the header file included using usr1 h This restriction does not apply to usr2 h Example 2 XXXX gt lt XXX include lt usr3 h gt lt lt is used before include but it is not followed by gt include lt usr4 h gt lt lt is used before include and it is followed by gt In the above code this restriction applies to usr3 h and the header file included using usr3 h This restriction does not apply to usr4 h ZBG CD 10 0030 Attachment 2 5 5 Workaround Do one of the following 1 If the number of double quotation marks at the beginning of the source file before a given include statement is odd add another to make the number even 2 Ifak lt is specified at the beginning of the source file before a given include statement and no gt is specified afterwards add one Correction This issue will be corrected in the PM module included in CA850 Ver 3 40
17. on invalid processing of specific constant operation Windows version only Description If the expression 2147483648 1 or 2147483648 1 is generated as a result of optimization flow analysis a Windows dialog box saying The program has performed an invalid operation and will be shut down is displayed during compilation Example void f int int_min 2147483648 unsigned int ansl int_min 1 unsigned int ans2 int_min 1 Workaround Change the above code as follows 1 Directly write the calculation result void f unsigned int ansl 2147483648 unsigned int ans2 0 2 Assign 2147483648 to an external variable other than a const variable int int_min 2147830648 void f unsigned int ans1 int_min 1 unsigned int ans2 int_min 1 Correction This restriction has been removed in Ver 2 40 No 6 Restriction on structures used with conditional operator in function parameters Description The correct branch code is not generated if a structure used with a conditional operator in a parameter Example typedef struct int i S S ssl ss2 Ine SIG void func func_call j gt 10 ssl ss2 Workaround Change the above statement to the following if statement if j gt 10 func_call ss1l selse func_call ss2 Correction This problem will not be corrected so regard it as a specification ZBG CD 10 0030 Attachment 1 7 78 No 7 Restriction on in
18. on specifying linker option r applies to UNIX version only Description If the r option is specified during linking in the UNIX version CA850 and the following conditions are satisfied a core dump might occur 1 A TEXT section does not exist 2 Data is allocated to the sdata or sbss section 3 A section with an allocation attribute A is specified by a link directive exists as well as an odd sized section without an initial value SNOBITS 4 A relocatable object is created using the r option of the Id850 and linking is performed again Workaround Do one of the following 1 2 Example Before correction pragma section static unsigned pragma section static unsigned After correction pragma section static unsigned static unsigned pragma section static unsigned 3 Initialize the char variable Example Before correction pragma section static unsigned pragma section static unsigned After correction pragma section static unsigned pragma section static unsigned Correction ZBG CD 10 0030 Attachment 1 20 78 Do not specify the r option of the Id850 Specify an even number as the size of a section without an initial value sidata begin char a sidata end long b sidata begin char a char dummy lt Addadummy sidata end long b sidata begin char a sidata end long b sidata begin char a 0 lt Initialize the variable sidata end long b Th
19. union int Ty ZBG CD 10 0030 Attachment 1 39 78 int P str ct S Sp u volatile int vi void f void u i 0x100 Indirect reference vi u p usi 0x200 Indirect assignment u p vi u i 0x300 Structure assignment s u sp Workaround Specify the address instead of the pointer Example struct S int a 10 s union int i int pP struct sS Sp u volatile int vi void f void u i 0x100 Indirect reference vi int 0x100 u i 0x200 Indirect assignment x int 0x200 vi u i 0x300 Structure assignment s struct S 0x300 Correction This restriction has been removed in Ver 2 50 No 79 Restriction on compound assignment of values to bit field members when structure packing is specified Description When structure packing is specified the result of a compound assignment of values to bit field members will be invalid if the following conditions are satisfied 1 The bit field members to be assigned a variable using compound assignment extend over a 32 bit boundary 2 The element of the structure array cannot be resolved Example When compiled with packing value 1 Xpack 1 struct S short sl short s2 short s3 short s4 a nN nN nN A short s5 7 Extends over a 32 bit boundary ZBG CD 10 0030 Attachment 1 40 78 short s6 7 sobj 10 int a
20. 2000 adr Oxff Expression transformation 1 When accessing an address with an offset the address will be calculated using address 0x4002000 offset adr 2 This expression is transformed to the access expression address offset through the basic optimization 3 The address 0x4002000 stored in an area is moved to another area so that the value will be used in calculation in 1 when the expression is transformed in 2 During the processing in 3 the address is stored in an area smaller than the original area As a result the overflowed data is lost Output code example mov 255 r12 st b r12 8192 r11 This value is invalid Workaround Calculate the address in advance and modify the source code before assigning the value so that the address does not have an offset Example of preventive code void func int adr volatile unsigned char 0x4002000 adr Oxff Correction This restriction has been removed in Ver 2 50 Note however that if the conditions under which this restriction applies occur in Ver 2 41 the following error message will be output and compilation will stop Message E2179 compiler restriction offset out of range 24bit ZBG CD 10 0030 Attachment 1 35 78 No 72 Restriction on optimization for i statement Description When optional optimization 01 or the powerful optimization option wi 04 is specified and if a bit field is related to the conditional
21. 850 Corrected in Ver 2 60 2 ar850 Corrected in Ver 2 50 3 dis850 Corrected in Ver 2 70 4 dump850 Corrected in Ver 2 70 5 hx850 Corrected in Ver 2 50 6 6 romp850 Corrected in Ver 2 60 ZBG CD 10 0030 Attachment 1 28 78 Workaround Do not use multibyte characters in a command file When using the project manager do not use multibyte characters for options because they are specified by a command file Correction This restriction has been removed in Ver 2 70 No 62 Restriction on structure pointer for structure packing Description Invalid code might be output when structure packing Xpack is used and e a structure pointer to be packed is declared as register or e the optimization option Os or Ot is specified and the structure pointer to be packed is assigned to the register Example struct test struct test next struct test list 20 struct test Head amp list 0 func Dit a9 struct test pp pp Head for i 0 pp 0 itt pp pp gt next The code on this line is invalid Workaround Delete the register declaration for the structure pointer and do not specify the optimization option Correction This restriction has been removed in Ver 2 41 No 63 Restriction on assignment to and reference of a structure Description When the V850E is specified as the target device and the optimization options Os and OI are spec
22. 89 Restriction on parameter of inline function Description Invalid code is generated if an inline function satisfies the following conditions e The address of a parameter of the inline function is acquired the address is cast to a pointer whose type differs from the parameter and the parameter is referenced e The parameter above is not used at any other location The address resulting from typecasing becomes invalid where the inline function is expanded If oragma inline is specified for a function in the program this bug might apply to the function In addition depending on the combination of the optimization options Os and 0t and options related to inline expansion the inline function might be expanded and this bug might occur Example of code that causes the bug pragma inline subfunc unsigned int s static void subfunc int i this function is inlined s unsigned int amp i cast void func int ii subfunc ii void main void int t 2 func t printf x n s references the parameter Workaround Do one of the following 1 Suppress inline expansion a When using CA850 Ver 2 40 or Ver 2 41 do a 1 or a 2 a 1 Remove pragma inline and specify an optimization option other than Os or Ot a 2 Specify the options below if you do not remove pragma inline or change the optimization options Which option to specify varies depending on whether
23. Attachment 1 50 78 Example 3 Example when the packing value is 1 and a 2 or 4 byte member is referenced by a structure pointer pragma pack 1 struct char c int i pstl int il 12 13 i4 int funei return il lt lt i2 lt lt 13 14 lt lt pst1l gt i pstl gt i is applicable Workaround Temporarily store the member and the result of the included function __sasf in the expression that might cause this bug in a local variable declared as volatile and use the local variable for the expression Example When bug applies to stl i in the parameters of return pragma pack 1 struct char c int di stl Ant ily i2 235 i4 157 int func return il lt lt 12 lt lt i3 i4 lt lt i5 stl i Modification to prevent bug pragma pack 1 struct char c int i stl n Temporarily store the value of st1 i ina variable declared as volatile and use the int il i2 i3 i4 i5 variable where applies int func volatile int tmp stl i return il lt lt i2 lt lt 13 i4 lt lt i5 tmp ZBG CD 10 0030 Attachment 1 51 78 Correction This restriction has been removed in Ver 2 70 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No
24. Correction This issue has been corrected in Ver 3 20 No 94 Restriction on security ID and option byte Description If the following conditions are satisfied the target values listed below become 0 Conditions 1 A device that has a security ID or option byte is specified 2 The linker s B option is specified 3 The security ID or option byte is not defined in the assembler source file Target values 1 The security ID specified using the xsid option 2 Initial value of the security ID when xsid is omitted in Ver 3 00 only The default value is Oxffffffttfttttttftfff 3 Initial value of the option byte The default value is registered in the device file Workaround Define the security ID and option byte in the assembler source file The security ID and option byte must be defined in the device file Example SECURITY_ID section SECURITY_ID word OxXEFEEFEEE 0 3 byte code Address is 0x70 0x73 word Oxffffffrftt 4 7 byte code Address is 0x74 0x77 hword OxXET EY 8 9 byte code Address is 0x78 0x79 OPTION_BYTES section OPTION_BYTES hword 0x0000 0 1 byte code Address is 0x7a 0x7b hword 0x0000 2 3 byte code Address is 0x7c 0x7d hword 0x0000 4 5 byte code Address is 0x7e 0x7f Correction This issue has been corrected in Ver 3 10 No 95 Restriction on floating point constants and integer type Description When a floating point valu
25. Microcontroller Technical Information Document No ZBG CD 10 0030 CA850 Date issued Sep 13 2010 V850 C Compiler Package Issued by MCU Tool Product Marketing Department Usage Restrictions MCU Software Division MCU Business Unit Related documents Renesas Electronics Corporation CA850 Ver 3 20 C Language U18513EJ1 1st edition Notification Ni Usage restriction CA850 Ver 3 20 Assembly Language U18514EJ1 1st edition classification Upgrade CA850 Ver 3 20 Operation U18512EJ1 1st edition Document modification CA850 Ver 3 20 Link Directives U18515EJ1 1st edition PM Ver 6 30 User s Manual U18416EJ1 1st edition CA850 Ver 2 50 Coding Technique U16076EJ1 1st edition Other notification 1 Affected product CA850 part number CA703000 2 New restrictions Restrictions No 111 and No 112 for the CA850 have been added e No 111 Restriction on incorrect compare operation optimization while casting e No 112 Restriction on incorrect move optimization of assignment sentence 3 Workarounds The workarounds below are available for these restrictions See attachments 1 for details CA850 e No 111 Insert __asm n before the line where incorrect comparison operation optimization occurs e No 112 Insert __asm n before the line which the checktool output ZBG CD 10 0030 4 Removed restrictions The restrictions below have been removed See attachments 1 and 2 for d
26. O register Restriction on volatile specification for nested structures and unions Restriction on NOT operator used with constant 0 Restriction on assembler optimization in V850E mode Restriction on specifying optimization option Restriction on object file size during optimization x Applicable O Not applicable Not relevant Check tool available ZBG CD 10 0030 Attachment 1 2 78 Version Restrictions and Changes Additions to Specifications 2 72 3 00 Restrictions on debugging during optimization Restriction on using _rcopy function in loop Restriction on address of structure member Restriction on bit field Restriction on option nomacro pseudo instruction Restriction on specifying only tilde in macro Restriction on tilde when macro is nested Restriction on invalid instruction sal Restriction on file name for linker directive file Restriction on referencing specific symbols and reserved symbols in C source Restriction on specifying linker option r applies to UNIX version CA850 only Restriction on warning message related to EP relative segment Restriction on warning message related to segment Restriction on object file name in archive file Restriction on size of rompsec section displayed by m option of romp850 Restriction on output file path specification option of per
27. a must be allocated at the top of the stack but it is allocated in the middle of the stack If a structure is specified as a return value note that the parameter in the conditions below is expressed in the format that the return value of the structure is inserted in the 1st parameter that is 1st parameter return value 2nd parameter 1st parameter of a function 3rd parameter 2nd parameter of a function 1 2 Structure packing is used The The packed structure specified Xpack option is used or pragma pack is written Multiple packed structures with 5 or more bytes are specified for the parameter of a function The function in 2 cannot use a variable number of parameters for the 2nd or subsequent parameter is allocated extending over the 16th and 17th byte boundary in the parameter area of the stack frame Consequently the structure of condition 4 is allocated at an invalid location and invalid code will be output in response to the following accesses e Access as the structure e the stack frame Example pragma pack 1 typedef struct char c nE ais ST void f int i ST stl g st2 c SEZI The stack is allocated as shown below Oxnnnn014 Boundary of 16th and 17th byte Condition 4 Oxnnnn010 OxnnnnOof OxnnnnO0O0d Oxnnnn00c Oxnnnn009 Oxnnnn005 Oxnnnn004 Oxnnnn000 Access of the structure member extending over the 16th and 17th byte boundary i
28. an optimization option Os or Ot ZBG CD 10 0030 Attachment 1 10 78 2 Declare the external or static variable as volatile Correction This restriction has been removed in Ver 2 40 No 17 Restriction on successive assignment expressions Description When the following conditions are met the required code is inadvertently deleted 1 There are insufficient temporary registers in the global optimization processing that occurs when the Os or Ot option is specified 2 If 1 has occurred temporary registers are saved to the stack and restored from the stack when required in the code generation phase after global optimization If the C code below is detected at this time the restore processing code is not generated 3 This bug occurs only when conditions 1 and 2 are both met because during the machine dependent optimization phase after the code generation phase necessary code is treated as an unnecessary instruction string and deleted Example lt val gt lt op2 gt lt val_1 gt lt op1 gt lt imm_ 1 gt lt val gt lt op2 gt lt val_2 gt lt op1 gt lt imm 2 gt lt val gt lt op2 gt lt val_n 1 gt lt opl gt lt imm_n 1 gt lt val gt lt op2 gt lt val_n gt lt op1 gt lt imm_n gt Explanation lt op1 gt lt op2 gt Operators lt vab Variable lt imm gt Immediate value lt val_n gt Variable or variable operator lt n gt 5 to 10 or more depends on functio
29. ata 1 bitf to 1 ends up too low data 0 ary 30 is initialized to 1 data 1 bit ends up undefined Expected values data 0 ary 30 0 data 1 bitf 1 Output result data 0 ary 30 1 data 1 bitf is undefined ary 31 Upper m data 1 lt ary 0 bitf A ary 31 ary 29 data o lt on 0 31 vV J 4 bytes Workaround Do one of the following 1 Initialize the structure by assigning values to its members For example 1 struct int biti L2 struct int s bP Sie data Not initialized data bitf OxFFF Changed to assignment data str s 2 ZBG CD 10 0030 Attachment 1 73 78 2 Declare the bit field in a separate structure within the main structure For example 1 struct struct Tat bate at le ie str2 Structure within the structure struct int s Saxe data OxFFF Correction This issue has been corrected in Ver 3 40 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 109 Restriction involving nested conditionally assembled pseudo instructions Description If the following conditions are satisfied the error message F3510 is output Conditions 1 An elseif or elseifn pseudo instruction is used 2 3 There is an elseif or else pseudo instruction that corresponds to the pseudo instructi
30. break Workaround Create a function block that calls the _rcopy function and call this function in the loop void main void while dummy lt 0 int dummy return rcopy amp _S_romp 1 Correction This restriction has been removed in Ver 2 30 ZBG CD 10 0030 Attachment 1 17 78 No 33 Restriction on address of structure member Description If either of the conditions below is satisfied when a structure is packed data access follows the data alignment of the device and the accessed address is masked As a result data will be missing or lost when accessing the address of the structure member Conditions 1 The device does not support misaligned access 2 The device supports misaligned access but misaligned access is prohibited Example struct test char c offset 0 int 4s offset 1 4 test int ip i void func i ip Accessed from a masked address void func2 ip amp test i Workaround There is no workaround Correction This problem will not be corrected so regard it as a specification No 34 Restriction on bit field Description If the width of a bit field is less than the data type of a member when the bit field is accessed during structure packing the bit field is read as having the width of the data type of that member Consequently an area outside the object an area where there is no data is also accessed This access is
31. call ext_tsk Description When a task of a real time OS is written by specifying pragma rtos_task and the system call ext_tsk is used in the task an error might occur if the task is compiled with the g option specified resulting in abnormal termination Example extern int funci void pragma rtos_task usrtsk void usrtsk int Param int i i funcl ext_tsk Workaround Use a function pointer to indirectly call ext_tsk extern int funcl void pragma rtos_task usrtsk void usrtsk int Param Inte lt b void ext_tsk_ptr ext_tsk i funcl ext_tsk_ptr Correction This restriction has been removed in Ver 2 30 No 21 Restriction on section allocation Description In the tidata section allocation specification by the pragma section directive or in a char array of a structure or access to a char member specified by sf850 to be located in the tidata section a linker error occurs if the displacement value of the sst or sld instruction used to access the array or member is exceeded Workaround Do one of the following 1 Do not use the char member or char array of a structure that causes the linker error 2 Do not assign the char member or char array of a structure that causes the linker error to the tidata section ZBG CD 10 0030 Attachment 1 13 78 Correction This problem will not be corrected so regard it as a specification No 22 Restriction on section file wit
32. chment 1 30 78 test c 1 test c 0 2 The code on this line is illegally deleted test ui unsigned test us amp unsigned Oxffffe7ff 0x1000 func3 test The code in 1 will be illegally deleted in the same manner as in Example 1 Sy best gt e LL test c 29 2 mov 27 L0 st b rio 6 A4 sp stich r10 7 A4 sp 1 test ui unsigned test us amp unsigned 0Oxffffe 7ff Ox10000 ld hu 8 A4 sp r14 and Oxffffe7ff r14 or Ox10000 r14 st w r14 8 A4 sp Workaround Specify wi stld_trans_opt OFF to suppress the optimization that causes this bug or remove the optimization option 01 Correction This restriction has been removed in Ver 2 41 No 64 Restriction on optimization for two functions Description When the optimization option Os or Ot is specified if the conditions below are satisfied optimization for two functions might be executed incorrectly As a result the code might be illegally deleted 1 In the function called first 3 a parameter of the called function 2 is an address pointer 2 In the function called first 3 the value of the variable that assigns an address to the pointer is assigned before calling the function 2 3 In the function called next 2 a parameter of the called function 1 is a value 4 In the function called next 2 a line or part of a line of the code is moved immediately before the called
33. cimal 0x123456789 the latter is greater than the former In other words 0x12345678 lt 0x23456789 Expected values ul ULONG_MAX errno ERANGE Output result ul 0x23456789 Example 2 When the st rtol function is used char p signed long 1 strtol 123456789 amp p 16 The hexadecimal value 0x 123456789 exceeds 32 bits and the comparison in 3 includes all characters in the string Expected values 1 LONG_MIN errno ERANGE Output result 1 DCBA9877 0x23456789 Example 3 When the atoi function is used signed int i 1 atoi 5368709120 The decimal value 5368709120 which equals 0x140000000 exceeds 32 bits and the comparison in 3 includes all characters in the string Example If the character string 536870912 is converted to decimal 536870912 which equals 0x20000000 and the value is compared to the lower 32 bits of the value that results when the string including the next number 5368709120 is converted to decimal 5368709129 which equals 0x140000000 the latter is greater than the former In other words 0x20000000 lt 0x40000000 Expected values i LONG_MAX Output result als 1073741824 0x40000000 Workaround There is no workaround Correction This issue has been corrected in Ver 3 40 ZBG CD 10 0030 Attachment 1 71 78 No 108 Restriction involving initialization of a structure that includes a bit field among its members D
34. current folder the executed folder If the a11 option is specified the o option outputs the analysis result to the specified folder Workaround Execute analysis in the folder to which the result is to be output Correction This restriction has been removed in Ver 3 00 No 49 Restriction on 1 bit manipulation using or Description When an optimization option Os or Ot is specified if 1 bit manipulation using or is performed on a short int variable assigned to a register under the following two conditions invalid code will be output 1 The variable is non volatile and automatic not including static variables and parameters 2 Asigned int Of signed long variable is declared before the target variable is assigned to the register Example void f void int i short s 0 i g amp s switch i case 100 s amp Oxfffe break case 200 ZBG CD 10 0030 Attachment 1 23 78 s 1 break case 300 s 1 break Sod ie sy Workaround Specify the wo XTb option This option limits the range affected by bit manipulation instructions Correction This restriction has been removed in Ver 2 40 No 50 Restriction on unsigned short in structure packing Description Invalid code will be output if the V850E is specified as the target device structure packing is used and an unsigned short member is assigned to an odd address This bug does not apply to a short member Example
35. d F1303 cannot open file xxxx cca F3503 can not open file xxxx cas Workaround Re generate the file required for building by selecting Export Makefile in the PM Project menu Correction This issue has been corrected in CA850 Ver 3 10 and PM Ver 6 11 No 7 Restriction on linking system calls of RX850 or RX850 Pro from library in PM Description If all the conditions below are satisfied linking of system calls of the RX850 or RX850 Pro results in a linking error and the following error message is output F4452 undefined symbol Conditions 1 The RX850 or RX850 Pro is used 2 A library is specified in the Linker Options dialog box 3 System calls are used in the library specified in 2 4 The system calls of 3 are not used in a program registered as a source file Workaround Do the following 1 In the Linker Options dialog box click the Library tab and specify the library of the RX850 or RX850 Pro in the Library l text box Example When using RX850 Ver 3 20 and the user library name is libusr a usr EX 2 In the Linker Options dialog box click the Library tab and specify the library path of the RX850 or RX850 Pro in the Library Search Path L text box Example When using RX850 Pro Ver 3 20 C Program Files NEC Electronics Tools RX850 Pro V3 20 1ib850e r32 3 Clear the following check boxes in the RX850 Pro Settings dialog box RX850 Pro only e Link a Nucleus Library U e Link a Interfac
36. d as The stack size of system calls of RX850 V3 20 and RX850 Pro V3 20 is 0 so this restriction does not affect the stack calculation result Workaround Use the system calls with their stack size unknown or set the additional margin for the stack to 0 Correction This issue has been corrected in stk850 Ver 2 11 No 5 Restriction on specifying stack size of system calls with stk850 RX850 Description In RX850 V3 20 the stack size of the following system calls is 0 but 12 may be added to the margin eter_tsk erel_wai e get_blk e pget_blk etget_blk erel_blk If restriction No 4 applies the stack size of the system call is unknown and calculated as 0 so No 5 do not apply Restriction No 5 applies when the size of the above system calls is not specified for the additional margin with the stk850 but the function is not displayed in the Unknown Functions field Workaround Change the additional stack size margin for the relevant system call to 0 Correction This issue has been corrected in stk850 Ver 2 11 ZBG CD 10 0030 Attachment 2 3 5 No 6 Restriction on handling of command file using PM Description If a source file is selected in the Project Window and then compiled while the Use Command File check box is selected in the Compiler Options dialog box or Assembler Options dialog box the corresponding command file is deleted As a result either of the following error messages is output at the next build or rebuil
37. direct function calling Description If an indirect function call requires an offset an internal compiler error occurs Message C2000 internal gen_binary OP_CALL left child s operator is wrong C5211 syntax error at line lt num gt in intermediate fil Example str ct S 7 int dummy int func_body 0x100 sobj void f void sobj func_body Workaround Separate the offset calculation from the call as follows void f void fp void amp sobj func_body fp Correction This problem will not be corrected so regard it as a specification No 8 Restriction involving meaningless function definition Description An error is not output for a meaningless function definition Example typedef int INTFN INTFN f return 0 Workaround Avoid writing meaningless function definitions Correction This problem will not be corrected so regard it as a specification No 9 Restriction on number after preprocessor directive Description An error is not output for a number specified after a preprocessor directive Example if0 Workaround Avoid writing the code such as above Correction This restriction has been removed in Ver 2 60 ZBG CD 10 0030 Attachment 1 8 78 No 10 Restriction on invalid identifier after preprocessor directive Description An error is not output for an invalid identifier specified after a preprocessor directive Example if Wor
38. e movhi 0x0 gp rl option volatile st b r14 Ox0 r1 st b r14 Ox0O r1 option novolatile option novolacile Workaround Suppress the assembler optimization 1 For C source files Specify the option wWa 0 When using PM select the Tool menu Compiler Options the Others tab and then input wa 0 in the AnyOption text box 2 For assembler source files Do not specify the option o When using PM select the Tool menu Assembler Options and then clear the Do Optimization check box Correction This issue has been corrected in Ver 3 20 No 103 Restriction whereby an assignment statement for an automatic variable whose address is acquired by a function is deleted illegally Description If the following conditions are satisfied an assignment statement for an automatic variable whose address is acquired by a function might be deleted illegally Conditions 1 The CA850 earlier than Ver 2 50 is used a The optimization option Os or Ot is specified b One of the following is executed e The address of an automatic variable is assigned to an external 32 bit integer variable and then a function is called example 1 e The address of an automatic variable is assigned to an external variable whose address cannot be identified statically and then a function is called example 2 2 The CA850 Ver 2 50 or later is used a An optimization option of Og or a higher level is specified b One of the follo
39. e Library R Correction This issue has been corrected in CA850 Ver 3 10 and PM Ver 6 11 ZBG CD 10 0030 Attachment 2 4 5 No 8 Restriction on include files handled by PM Description If a file name that includes a space is specified as an include file in a source file the include file and all the following include files are handled as follows e Not registered to the Include Files folder in the Project window e Not registered to a makefile e Not made to be the target of the dependency during build This issue also applies to include files specified in the portion to be false as a result of conditional compilation This issue only applies to the specification of include files in a source file which are analyzed by PM but not to actual processing during compilation Example include C i n c test h Workaround Specify file names that do not include spaces Correction This issue has been corrected in CA850 Ver 3 20 and PM Ver 6 31 No 9 Restriction on acquiring information on included C source files handled by PM Description If 1 The number of double quotation marks at the beginning of the source file before a given include statement is odd or 2 A lt is specified at the beginning of the source file before a given include statement and no gt is specified afterwards Header files added by the include statements might be treated as described below However these problems will
40. e input field 2 is stored in data2 as a decimal integer However there is no input field for the format specifiers sd d following after s In this case the value of the parameter ary2 for the first extra format specifier is overwritten Expected values datal 1 data2 2 ary2 test TRO Output result datal 1 data2 2 ary2 ZBG CD 10 0030 Attachment 1 69 78 Example 3 When the character pattern enclosed by is notin the entered fields test test test char ary3 5 char ary4 5 char ary5 5 sscanf aaaa bbbb cccc s ary3 ary4 ary5 Format specifier that does not match the entered field The input field aaaa is stored in ary2 as a string literal Next the code searches for a in the input field bbbb and attempts to store the result in ary3 but the character is not found In this case the value of ary3 is overwritten Expected values ary3 aaaa ary4 test ary5 test Output result ary3 aaaa ary4 0 ary5 test Workaround There is no workaround Correction This issue has been corrected in Ver 3 40 No 107 Restriction involving the character string parameter for the atoi atol strtol and strtoul functions Description If conditions 1 to 5 below are satisfied the return value might be invalid For the strtol and strtoul functions the global variable errno is not set to ERANGE Conditions 1 The atoi atol strto
41. e is assigned first might be undefined as a result of optimization Note One of the following sets of options is specified when using a CA850 earlier than Ver 2 50 Option for object size optimization optional optimization Os 01 Option for object size optimization advanced optimization Os Wi O4 Option for object size optimization optional optimization advanced optimization Os 01l Wi 04 Option for execution speed optimization optional optimization ot 01 Option for execution speed optimization advanced optimization ot Wi 04 Option for execution speed optimization optional optimization advanced optimization ot 0l Wi 04 One of the following sets of options is specified when using CA850 Ver 2 50 or later Option for object size optimization Os Option for execution speed optimization ot Option for Level 1 Advanced optimization advanced optimization O Wi 04 ZBG CD 10 0030 Attachment 1 59 78 Example 1 if Conditional expression Same variable group x and y are constants or variables Example 2 switch conditional expression case 0 Same variable group x and y are constants or variables break Workaround Specify the following options to suppress the optimization that causes this bug Wi Wi 4 cf_reg_trans_opt1 0 cf_reg_trans_opt2 0 tcef_ forward_reg_trans_opt 0 cf_reverse_reg_trans_opt 0
42. e is converted to an int value the range that can be expressed with integer values is the signed int or signed long type area and if the value is converted to an unsigned int or unsigned long while the range is exceeded a compiler error might result E2519 invalid has occurred at compile time ZBG CD 10 0030 Attachment 1 58 78 Example 2147483647 0 PRO OK EL 2147483648 0 Error unsigned int ui unsigned int ui Workaround Specify an integer Example unsigned int ui 2147483648 Correction This problem will not be corrected so regard it as a specification No 96 Restriction on input conversion for I O function in standard library Description When input conversion processing is performed for printf sprintf vprintf or vsprintf which are I O functions in the standard library the precision specified for the conversion specifier g G is incremented Example printft 2g 12 3456789 The result should be 12 but 12 3 is output Workaround There is no workaround Correction This problem will not be corrected so regard it as a specification No 97 Restriction on assignment in machine dependent optimization module Description When specifying optimization options if an if statement or switch statement that assigns the same value to three or more variables exists in a basic block the value of the variable to which a valu
43. e loop comparison Correction This restriction has been removed in Ver 2 70 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 91 Restriction that an undefined symbol error occurs due to if and goto statements Description If the following conditions are satisfied an undefined symbol error is output for the label not defined by the user during linking as shown below The label name varies depending on the application used 1d850 CA850 error F4452 undefined symbol G38 referenced in main o Conditions 1 The optimization option level is ob the default or higher 2 The debugging information generation option g is specified 3 An if statement includes a statement to assign two constants to the same variable and a goto statement is specified without using else at the end of the if statement There is no other code in the if statement 4 amp amp and are not used in the if statement condition 5 An if statement includes a statement to assign two constants to a variable and the two constants satisfy the conditions below If a is a constant to which a value is assigned when the if statement conditions are satisfied and b is a constant to which a value is assigned when the if statement conditions are not satisfied and any of a to d is satisfied when these constants are signed integers or any of e
44. e name including space Restriction on length of assembly source Restriction on length of variable name Restriction on precision during floating point constant operation Restriction on invalid processing of specific constant operation Windows version only Restriction on structures used with conditional operator in function parameters Restriction on indirect function calling Restriction involving meaningless function definition Restriction on number after preprocessor directive Restriction on invalid identifier after preprocessor directive Restriction on declaring union with struct Restriction on extra in function prototype Restriction on using extern when defining structure Restriction on initialization with character string Restriction on switch statement at the end of infinite loop Restriction on debugging information symbol Restriction on successive assignment expressions Restriction on register assignment of runtime library Restriction on section file and global variables Restriction on system call ext_tsk Restriction on section allocation Restriction on section file with variable defined in assembly source Restriction on section file with tentative definition of external variables of same name in multiple files Restriction on operation including pointer constant Restriction on accessing bits of the peripheral I
45. e tidata section and the member is a 2 byte member allocated to an odd address or a 4 byte member allocated to an address that cannot be divided by 4 See Examples 1 and 2 b The operation is referenced from a structure pointer that uses structure packing the packing value for the structure is 1 and a 2 or 4 byte member is referenced See Example 3 c The operation uses the result of the included function __sasf This bug might occur if a 1 a 2 b or c is satisfied Caution The term structure includes bit fields Bit field members are affected according to their data types not bit widths For example int a 8 is a 4 byte data type and short b 8 is a 2 byte data type Example 1 Example of a member aligned to an odd address pragma pack 1 struct char padl Up to here the total size of members from the start is an odd number short mem odd address Example 2 Example of a member aligned to an address that cannot be divided by 4 1 pragma pack 1 struct char padl Up to here the total size of members from the start is a multiple of 4 int mem odd address Example of a member aligned to an address that cannot be divided by 4 2 pragma pack 1 struct short padl char pad2 Up to here the total size of members from the start is a multiple of 4 3 int mem hi ZBG CD 10 0030
46. e tools No 3 Correction of restrictions No 47 No 48 No 91 No 92 Correction of erroneous description No 13 ZBG CD 05 0062 June 29 2005 Addition of new restrictions No 94 to No 95 Correction of erroneous description No 7 ZBG CD 05 0077 September 1 2005 Addition of new restrictions to other package tools No 4 to No 6 ZBG CD 05 01 12 December 5 2005 Addition of new restriction No 97 Addition of new restriction to other package tools No 7 ZBG CD 06 0044 May 31 2006 Addition of new restriction to other package tools No 8 Correction of restrictions No 94 and No 97 Correction of restrictions to other package tools No 3 to No 7 ZBG CD 07 0067 September 27 2007 Addition of new restrictions No 98 to No 103 ZBG CD 09 0025 May 21 2009 Addition of new restrictions No 104 to No 110 Addition of new restriction to other package tools No 9 Correction of restrictions No 93 No 98 to No 103 Correction of restriction to other package tools No 8 ZBG CD 10 0030 Sep 13 2010 Addition of new restrictions No 111 and No 112 Correction of restrictions No 104 to No 110 Correction of restriction to other package tools No 9 ZBG CD 10 0030 Attachment 1 1 78 List of Usage Restrictions in CA850 1 Product History Version Restrictions and Changes Additions to Specifications 2 72 3 00 Restriction on fil
47. ed Og O Os or Ot in Ver 2 50 Os or Ot in Ver 2 41 or earlier A union containing a pointer and 4 byte integer is specified wo uot Optimization that propagates copying from the integer to the pointer in the basic block occurs for the union in 2 4 The element propagated as a result of optimization in 3 is not an integer constant 5 Indirect access by the pointer of the propagated address occurs or a structure is transferred Example If compilation is performed with optimization option Os specified Condition 1 typedef union unsigned char p Union containing pointer and 4 byte integer Condition 2 unsigned longa TEST int e char Variable data is copied to variable s p Condition 3 func unsigned long data register TEST s Variable s p is referenced indirectly Condition 5 return 1 Workaround Do one of the following 1 Lower the optimization level to Oq or Ob in Ver 2 50 Default optimization level in Ver 2 41 or earlier 2 Specify the wo Nc option to suppress propagation of copying in the basic block Correction This restriction has been removed in Ver 2 60 No 81 Description ZBG CD 10 0030 Attachment 1 42 78 Restriction on packed structure parameter An invalid stack frame is generated if the conditions below are satisfied The parameter register are
48. ed e Processing to assign a value to the loop variable inside the loop excluding addition to or subtracting from the loop variable e Branching from outside the loop to inside the loop e Branching from inside the loop to outside the loop 2 When using CA850 Ver 2 50 Ver 2 60 or Ver 2 61 a The specified optimization option is 0 Os or Ot b An unsigned int variable is used as the loop variable c The value of the loop variable is any of the following e Loop initial value ox3ffffffe or lower Loop end value 0xc0000002 or higher Loop increment Ox3ffffffe or lower e Loop initial value 0xc0000002 or higher Loop end value ox3ffffffe or lower Loop decrement Ox3ffffffe or lower d lt lt gt or is used for loop variable comparison e None of the following are performed e Processing to assign a value to the loop variable inside the loop excluding addition to or subtracting from the loop variable e Branching from outside the loop to inside the loop e Branching from inside the loop to outside the loop Example void main void unsigned int i for i 0 i lt Oxffffff00 i 0x1111 processing ZBG CD 10 0030 Attachment 1 54 78 Workaround Do one of the following 1 Specify wo No to suppress the optimization of loop expansion not executed or executed once 2 Declare the unsigned int type loop variable as volatile 3 Lower the optimization level 4 Use for th
49. ere is a block Block D that performs the same transfer as that performed in Block A Remark A basic block is group of directives that are processed in order and ends with a directive that causes execution to jump Example 2 cree ae 2i Only information used by the compiler Workaround Do one of the following 1 Insert__asm n The check tool outputs the position where this insertion is required int func int val int res switch val case OxA res 0x1 break case OxB res 0x2 break case OxC res 0x3 break case OxD res 0x3 break case OxE res 0x3 break default res 0x3 break __asm n lt _ Insert ___asm n return res 2 Specify o or lower as the optimization option 3 Specify the wi 04 option ZBG CD 10 0030 Attachment 1 76 78 Correction This issue has been corrected in Ver 3 40 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 111 Restriction on incorrect compare operation optimization while casting Description No 111 occurs when the following conditions are satisfied Conditions 1 Compare operation lt lt gt gt between integer operands 2 Either operand is casted as shown below signed char gt unsigned char signed char gt unsigned short unsigned char gt signed char signed sho
50. escription If conditions 1 and 2 are satisfied the bit field is not correctly initialized example 1 Conditions 1 A structure is used that includes a bit field immediately followed by another structure or union as members 2 Both of the members included in the structure in 1 are initialized using initial values If conditions 3 to 5 are satisfied the bit field might not be correctly initialized example 2 3 An automatic array of structures is used 4 The structure in 3 includes a bit field and an element that is at least 126 bytes among its members 5 The initializer for this element is omitted and the element is implicitly initialized to 0 Example 1 struct int Bitit o 12 A bit field is used A structure follows the bit field struct int s str 3 data OxFFF 2 Both members of the structure that includes the bit field are initialized The higher 4 bits of data bitf are not initialized Expected values data bitf OxFFF Output result data bitf OxFF Upper data str data bitf Not initialized ZBG CD 10 0030 Attachment 1 72 78 Example 2 void func void struct int biti 25 A bit field is used int ary 32 The following element is at least 126 bytes data 2 The automatic array of structures data is used ary is implicitly initialized to 0 The offset of the code used to set d
51. ession or the divisor in a division expression is one of the following e An addition or subtraction expression involving a signed char or unsigned char variable and a constant that is in the range 16384 to 16383 e A multiplication expression involving one of the following combinations where one operand is a variable and the other is a constant that is in the range for the specified data type signed char and signed char signed char and unsigned char unsigned char and signed char 4 The constant in 8 is assigned to a register 5 The variable or constant of the multiplication or division expression in 3 is assigned to r6 or r7 when the operation is performed Example char s t void func int a int b int c c s Oxaa t if b lt Oxaa c 0 func2 ey Workaround Specify one of the following options e Wo preg0 specifies that registers not be assigned to parameter registers e Wo XTm specifies that mulh divh not be output Correction This restriction has been removed in Ver 2 40 ZBG CD 10 0030 Attachment 1 12 78 No 19 Restriction on section file and global variables Description A warning message might not be output if a section mismatch occurs for a global variable in the section file and source file Workaround Modify the section file so as not to cause inconsistency between sections Correction This restriction has been removed in Ver 2 60 No 20 Restriction on system
52. etails CA850 e No e No e No e No e No e No e No 104 105 106 107 108 109 110 Incorrect number of loop executions Incorrect string literals Restriction involving format specifiers for the sscanf fscanf and scanf functions Restriction involving the character string parameter for the atoi atol strtol and strtoul functions Restriction involving initialization of a structure that includes a bit field among its members Restriction involving nested conditionally assembled pseudo instructions Restriction involving assignment within switch and if statements Other package tools e No 9 Restriction on acquiring information on included C source files handled by PM 5 Modification schedule New restrictions described in this document will be corrected in CA850 V3 46 which will be released at the end of September 2010 6 List of restrictions A list of restrictions in the CA850 including the revision history and detailed information is described on attachment 1 and a list of restrictions in other package tools is described on attachment 2 Document Number SBG TT 0003 E 7 Document revision history ZBG CD 10 0030 3 3 V850 C Compiler Package CA850 Usage Restrictions Issued on November 2 2001 Description Newly created SBG TT 0064 E February 5 2002 Addition of new restrictions No 68 to No 71 SBG TT 0074 E March 7 2002 Addition of new restriction No
53. formance checker Restriction on output file path specification option of cross reference tool Restriction on output file path specification option of memory layout visualization tool Restriction on 1 bit manipulation using amp or Restriction on unsigned short in structure packing Restriction on assignment of a union including indirect assignment Restriction on creating a relinkable object Restriction on wi 04 specifications for switch statement Restriction on global and static functions having the same name Restriction on string literal in a function Restriction on variable initialization Restriction on declaring a pointer to a function that has a structure as its parameter Restriction on label subtraction in sld or sst instruction displacement Restriction on internal ROM checking by ROMization processor Restriction on temporary file directory x Applicable O Not applicable Not relevant Check tool available ZBG CD 10 0030 Attachment 1 3 78 Version Restrictions and Changes Additions to Specifications 2 72 3 00 Restriction on multibyte characters in a command file Restriction on structure pointer for structure packing Restriction on assignment to and reference of a structure Restriction on optimization for two functions Restriction on allocating unsigned char variable to tida
54. from another Correction This restriction has been removed in Ver 2 41 No 59 Restriction on internal ROM checking by ROMization processor Description When using the ROMization processor romp850 the following warning message is output when it should not be or not output when it should be depending on whether a t ext section exists and its allocated address Note that the output object has no problem Message Warning rompsec section overflowed highest address of target machine Workaround Output the map by using the m option of the romp850 and confirm that the rompsec section does not exceed the internal ROM If does not exceed the ROM ignore the above warning message Correction This restriction has been removed in Ver 2 70 No 60 Restriction on temporary file directory Description If a relative path is specified for the temporary file directory in the project manager the command file pm cmd for the project manager might remain in the temporary file directory Workaround Delete the command file after the project manager is exited Do not specify a relative path for the temporary file directory Correction This restriction has been removed in Ver 2 50 No 61 Restriction on multibyte characters in a command file Description When a multibyte character is used in the command files for the following commands the CA850 fails to identify delimiters in character strings causing an erro 1 as
55. h variable defined in assembly source Description In an application where a variable is defined in the assembly source and that variable is referenced in the C source an error occurs during linking if the section file is generated by sf850 Workaround Delete the variable in the assembly source from the section file Correction This problem will not be corrected so regard it as a specification No 23 Restriction on section file with tentative definition of external variables of same name in multiple files Description If a section file is generated by sf850 when the tentative definitions of external variables of the same name are in multiple files symbols might be defined in duplicate during linking Message 1d850 fatal error symbol _xxxx multiply defined Workaround If multiple tentative definitions of external variables of the same name exist be sure to declare the variables using extern in the file that references them Correction This problem will not be corrected so regard it as a specification No 24 Restriction on operation including pointer constant Description Invalid code is output as a result of an operation including a pointer constant and multiple expressions Example inte LL int i2 charc c char 10 il 12 10 Workaround Enclose the expressions in parentheses and then cast the pointer Example c char 10 il i2 10 Correction This restriction has been removed in Ve
56. han 2 50 the compiler optimization option Os or 0t is specified in addition to 01 but wWi 04 is not specified For Ver 2 50 or later the compiler optimization option Os or Ot is specified but wi 04 is not specified B Parallel processing is performed to assign a value to the same variable in a switch or if statement C After the assignment in B execution jumps back to the same position Example 1 int func int val int res switch val case OxA 0x1 break case OxB 0x2 break case OxC 0x3 break case OxD 0x3 break case OxE 0x3 break default 0x3 break return res lt After a value is assigned to res execution jumps back to the same position Parallel processing to assign a value to the same variable res ZBG CD 10 0030 Attachment 1 75 78 2 The assembly language output according to the C source code in 1 satisfies all of the following conditions example 2 a The mov or 1d directive is used to transfer data to the same register at the end of multiple basic blocks Block A b Block A combines everything into one block Block B c There are no directives or output code in Block B which contains information used by the compiler At least one information item is included d In Block C the block following Block B the data is transferred to a register other than the one used in Block A e Among the blocks directly combined into Block C th
57. he line the linefeed codes that exist before and after the relevant character string are included in the replacement target Example When Regular Expression is selected in the Replace String dialog box and replacement of xyz with ABC is executed the line feed is also replaced as shown below abc XYZ abc abcABC abc Workaround Do not use a regular expression for replacement Correction This issue has been corrected in PM Ver 5 20 included with CA850 Ver 2 70 ZBG CD 10 0030 Attachment 2 2 5 No 2 Restriction on square brackets in PM Description With PM if a square bracket is used in the file name path name or project group name the workspace cannot be loaded and individual options cannot be set Workaround Do not use square brackets for the file name path name or project group name Correction This issue has been corrected in PM Ver 5 20 included with CA850 Ver 2 70 No 3 Restriction on linking prw file with PM Description The prw files are linked with PM but if a workspace file whose name contains a space is double clicked the file might not be opened normally Workaround Open the workspace file by using the PM Open Workspace menu Correction This issue has been corrected in PM Ver 6 10 No 4 Restriction on system call display by stk850 RX850 and RX850 Pro Description The stack size of system calls of the RX850 and RX850 Pro is unknown and displaye
58. he loop termination condition involves comparing the loop counter to a constant 4 A constant is added to or subtracted from the loop counter within the loop 5 The loop counter is used within the loop as described in A or B A Conditions ato e are satisfied example 1 a The loop counter is used to index an array b The elements of the array in a are structures unions or arrays c The size of the elements of the array in ais not a power of 2 d The size of the elements of the array in ais within 65 534 bytes ZBG CD 10 0030 Attachment 1 66 78 e The product of the constant used for the loop termination condition in 3 and the size of an element of the array in ais too large to store in a 32 bit integer B Conditions fto iare satisfied example 2 f The loop counter is used as one multiplier in an expression with a constant g The constant in fis not a power of 2 h The constant in fis in the range from 65 534 to 65 534 i The product of the constant used for the loop termination condition in 3 and the constant in f is too large to store in a 32 bit integer Loop counter This controls when a loop ends Example 1 struct int sl int s2 int s3 The elements of the array ary are structures ary 100 The size 12 bytes is not a power of 2 and is within 65 534 bytes int i The loop counter i is not declared as volatile for i 0 i lt INT_MAX i The loop terminati
59. his issue has been corrected in Ver 3 20 No 100 Restriction whereby strcmp and strncmp operations differ Description When character strings are compared the characters are interpreted as follows strcmp function Signed strncmp function Unsigned Consequently the result of strcmp and strncmp operations differ This restriction do not apply when the compared characters are ASCII codes 0x00 to 0x7f Example strcmp aaa aa x80 0x80 is interpreted as a negative number a gt 0x80 gt An integer greater than 0 225 in the above code is returned strncmp aaa aa x80 3 0x80 is interpreted as a positive number a lt 0x80 gt An integer less than 0 31 in the above code is returned Workaround There is no workaround Correction This issue has been modified in Ver 3 20 so that the strcmp function will interpret character strings as unsigned No 101 Restriction on string literal with 65 or more characters Description The following assembler error will be output if the second character of a string literal with 65 or more characters is E3249 illegal syntax To count the number of characters included in character strings 0 is added at the end of the string literal and an escape character is handled as two characters For example escape characters such as and 0 are handled as two characters The following example causes an a
60. hment 1 22 78 No 46 Restriction on output file path specification option of performance checker Description If the folder to which the analysis result of a specified output file is to be output is specified by the path specification option o the result is not output to the specified folder but to the current folder the executed folder If the a11 option is specified the o option outputs the analysis result to the specified folder Workaround Execute analysis in the folder to which the result is to be output Correction This issue does not apply to Ver 2 50 No 47 Restriction on output file path specification option of cross reference tool Description If the folder to which the analysis result of a specified output file is to be output is specified by the path specification option o the result is not output to the specified folder but to the current folder the executed folder If the a11 option is specified the o option outputs the analysis result to the specified folder Workaround Execute analysis in the folder to which the result is to be output Correction This restriction has been removed in Ver 3 00 No 48 Restriction on output file path specification option of memory layout visualization tool Description If the folder to which the analysis result of a specified output file is to be output is specified by the path specification option o the result is not output to the specified folder but to the
61. id func gj __sasf tus il gt 0 Conditions 3 4 5 Compilation result ld w Sl 13 cmp r0 r13 lt Flag is set due to sasf sld h S_tus r14 and r21 r14 lt Flag is cleared due to sasf sasf Oxf r14 st w r14 S_gj Workaround Make sure that the first parameter of __sasf is an automatic variable that is volatile and has a basic data type Example LIVE Gay aly pragma section tidata begin unsigned short tus pragma section tidata end void func volatile unsigned short a tus volatile automatic variable that has a basic data type gj __sasf a il gt 0 Correction This restriction has been removed in Ver 2 60 No 86 Restriction on conversion from float to short Of unsigned short Description Invalid code is output if the conditions in 1 or 2 are satisfied 1 lt 1 gt A float is converted to a short or unsigned short ZBG CD 10 0030 Attachment 1 47 78 lt 2 gt The value after the type conversion is referenced from multiple locations lt 3 gt The first reference of lt 2 gt is for assignment lt 4 gt The second or a later reference of lt 2 gt is just for assignment to a register lt 1 gt A float is converted to a short Of unsigned short lt 2 gt The value after the type conversion is referenced from multiple locations lt 3 gt The first reference of lt 2 gt is for assignment lt 4 gt The second or a later reference of lt 2 gt is as the operand of an
62. ified optimization in which an unsigned short structure member is assigned a value or referenced might be executed incorrectly As a result the code might be illegally deleted Example 1 unsigned int Testflg 0 struct test unsigned char b1 3 unsigned short s1 2 unsigned short s2 2 ZBG CD 10 0030 Attachment 1 29 78 unsigned charb2 2 unsigned long1 2 void func struct test argl struct test ausrtl argl ausrtl bl ausrtl sl ausrtl b2 The code on this line is illegally deleted ausrtl s2 NM NY NY ND ausrtl 1 if ausrtl b2 2 Testflgt main struct test arg func arg The following assembler code will be output to the relevant section ausrtl b2 2 st br10 3 A4 sp aa 1 Memory overview ausrtl s2 2 4 A4 sp 3 A4 sp ld hu 4 A4 sp r15 2 4 4 mov 0x40 r16 O and Oxffffff9f r15 or Che GLS c st b 3 A4 sp st h r15 4 A4 sp 3 lt gt ld hu 4 A4 sp When there is an st instruction that writes data to memory 1 if the 1d instruction that reads data in memory 2 and a code that reads a part of the memory in 1 are successively executed the memory usage for 2 is illegally checked As a result the code in 1 is illegally deleted Example 2 union test char c 4 unsigned short us unsigned int ui void func union test test ZBG CD 10 0030 Atta
63. ill be output instead of invalid code W2172 constant out of range Example int func struct unsigned int x 32 32 bit bit field sl 0x12345678 Initialization Workaround Specify a 32 bit data type instead of 32 bits ZBG CD 10 0030 Attachment 1 37 78 Example int func struct unsigned int x sl 0x12345678 Correction This restriction has been removed in Ver 2 50 No 75 Restriction on initialization of automatic array Description If the following conditions are satisfied invalid code will be output for initialization of an automatic array 1 The optimization option Os or Ot is specified 2 An automatic array is initialized 3 32 or more initial values for the automatic array in 2 are omitted Example int a 37 1 2 3 4 5 The 6th and subsequent values 32 values are omitted Workaround Do one of the following 1 Remove the optimization option to reset to the default optimization 2 Specify 0 for omitted initializers to make the number of omitted values 31 or less Example int a 37 1 2 3 4 5 0 The 7th and subsequent values 31 values are omitted Correction This restriction has been removed in Ver 2 50 No 76 Restriction on ov flag in machine dependent optimization module Description If the following conditions are satisfied invalid code will be output in the machine dependent optimization module 1 The optimization op
64. ing and optimization of deletion of common subexpressions Correction This restriction has been removed in Ver 2 41 No 52 Restriction on creating a relinkable object Description When sections with the same name that should therefore be relocated exist in each of a number of input files during linking if they are allocated to different sections using a linker directive file at the stage in which a relinkable object is created by specifying the r option an object file having invalid relocation information will be created If this object file is linked the instructions in the file will be illegally overwritten because the relocation information is wrong Example USRTEXT LOAD RX USRTEXT1 SPROGBITS AX USRTEXT a o libusr a USRTEXT2 SPROGBITS AX USRTEXT b o libusr a USRTEXT3 SPROGBITS AX USRTEXT c o libusr a USRTEXT4 SPROGBITS AX USRTEXT d o libusr a hi Workaround Specify the linker directive file so that the relocation information section is allocated to each input file separately The section name of the relocation information is rela section name and the section attribute is SRELA N USRTEXT LOAD RX USRTEXT1 S PROGBITS AX USRTEXT a o libusr a USRTEXT2 SPROGBITS AX USRTEXT b o libusr a USRTEXT3 SPROGBITS AX USRTEXT c o libusr a USRTEXT4 SPROGBITS
65. ions When accessing a variable modified with volatile is specified in C the pseudo instruction option volatile and an instruction that accesses the variable are output At that time instructions newly generated through instruction expansion due to assembler optimization might be rearranged Deletion and rearrangement of memory access instructions are not performed With the C source files the code is executed normally according to the ANSI C volatile type qualifier specifications Conditions If the following conditions are satisfied the order of instructions might be changed and output 1 If the code is written in C a The optimization option 0g 0 Os or Ot is specified b A variable modified with volatile is defined in another file c There are variables that satisfy either of the following conditions gt const variables for which the location is not specified Xsconst num option specification with a section file nor pragma section is specified gt There are variables for which the location is specified in any of the following ways e The directive pragma section is used to specify data or const sections based on the section type e The option Gnuzm is used to allocate a variable larger than the size specified with num to a data or bss section e A section file is used to specify data or const based on the section type and the variable name is specified e The option Xsconst num is used to allocate a va
66. is judged as an undefined symbol error during linking Example static void func void func Workaround Do not define global and static functions with the same name Correction This restriction has been removed in Ver 2 41 No 55 Restriction on string literal in a function Description When a string literal is defined in a function an internal error occurs if its length exceeds 8 200 characters Message C2000 internal string literal too long Example void func void char p abcde When exceeding 8200 characters Workaround When defining a string literal ensure that it does not exceed 8 200 characters Correction This restriction has been removed in Ver 2 41 ZBG CD 10 0030 Attachment 1 26 78 No 56 Restriction on variable initialization Description When either of the following conditions is satisfied the error message below is output and compilation might stop 1 There are too many variable initializations 2 The code includes the debugging information output option g and variable initializations A large amount of the following information is included e File names including the names of include files e Function names e Variable names e Enumeration tag names and enumerator names e Structure tag names union tag names and member names e typedef names e Label names Message C7317 illegal block no xxxxxxxx Workaround Divide the file to reduce the number of initia
67. is restriction has been removed in Ver 2 30 No 42 Restriction on warning message related to EP relative segment Description The Id850 outputs a warning message if the following conditions are satisfied 1 2 3 A V850E device is specified The start address of the internal RAM in the device is not Ox03xxxxxx An SEDATA or SIDATA segment exists Message 1d850 warning segment SIDATA 0x03xxxxxx O0x03xxxxxx must be in EP relative address able range 0x0xxxxxxxc000 O0x0xxxxxxx Workaround Check the link map and confirm that SEDATA and SIDATA segments are allocated before and after the internal RAM address and ignore the above message Correction This restriction has been removed in Ver 2 40 ZBG CD 10 0030 Attachment 1 21 78 No 43 Restriction on warning message related to segment Description If a device with a 28 bit space such as the V850E MA1 or V850E IA1 is specified and a section is allocated and if the value of an address masked with 26 bits overlaps an allocation prohibited address the warning message below is output Although a message is output the created object does not contain errors Message 1d850 warning segment XXXX overflowed highest address of target machine Example If the internal ROM ranges from 0x00000000 to Ox0003ffff and external memory starts from 0x00100000 allocating the area of 0x00040000 to OxOOOfffff is prohibited For the following areas ho
68. karound Avoid writing the code such as above Correction This restriction has been removed in Ver 2 60 No 11 Restriction on declaring union with struct Description An error is not output if a union is declared with struct Example union uu char a int b struct uu uu Workaround Avoid writing the code such as above Correction This restriction has been removed in Ver 2 60 No 12 Restriction on extra in function prototype Description A syntax error is output for an extra in a function prototype Example typedef int Int void f1 Int Workaround Modify the code as follows typedef int Int void fl Int Correction This problem will not be corrected so regard it as a specification No 13 Restriction on using extern when defining structure Description A syntax error is output when using extern to define a structure Example extern struct tag int i Workaround Remove extern struct tag int i Correction This restriction has been removed in Ver 2 20 ZBG CD 10 0030 Attachment 1 9 78 No 14 Restriction on initialization with character string Description Because the code of a string literal is not output for a character string cast to a data type other than char or unsigned char an internal error is output and the compiler is terminated Message C7308 undefined block number xx reference in opcode xx Example struct S long 1 sobj long st
69. l or strtoul function is used 2 Forthe atoi or atol function the character string parameter exceeds 32 bits when expressed as a decimal number For the strtol or strtoul function the first character string parameter exceeds 32 bits when expressed using the base specified as the third parameter 3 When the portion of the character string parameter in 2 from the first character to a given character is converted to a number and compared to the absolute value of the lower 32 bits of the value that results when the portion of the same character string from the first character to the character following the given character above is converted to a number the latter value is greater than the former 4 The comparison in 3 includes all characters in the string 5 Forthe atoi atol or strtol function the lower 32 bits of the number to which the character string was converted in 2 are within the range from LONG_MIN to LONG_MAx after adding a sign Example 1 When the st rtoul function is used char p unsigned long ul strtoul 123456789 amp p 16 ZBG CD 10 0030 Attachment 1 70 78 The hexadecimal value 0x123456789 exceeds 32 bits and the comparison in 3 includes all characters in the string Example If the character string 12345678 is converted to hexadecimal 0x12345678 and the value is compared to the lower 32 bits of the value that results when the string including the next number 9 is converted to hexade
70. lizations per compilation or reduce the amount of the above information Correction This restriction has been removed in Ver 2 60 No 57 Restriction on declaring a pointer to a function that has a structure as its parameter Description When debugging is specified when the g option is specified if a pointer to a function that has a structure as its parameter is declared but the structure is not defined the Gxxxx symbol in the debugging information causes the following error to be output by the linker id850 Message 1d850 fatal error undefined symbol Example void x struct SSS Workaround Define the structure used before the pointer to the function is declared Example struct Sos 4 unsigned chars unsigned chart sss_obj void x Struct SSS Correction This restriction has been removed in Ver 2 41 No 58 Restriction on label subtraction in sid or sst instruction displacement Description When the subtraction of one label from another is specified for the displacement in the sla or sst instruction and the expression value varies according to instruction unrolling by the assembler the instruction might be invalid The CA850 does not create the code that causes this bug ZBG CD 10 0030 Attachment 1 27 78 Example LAB1 sld w LAB2 LABI1 r10 mov LAB2 LAB1 r11 The instruction might be unrolled LAB2 Workaround Write the immediate value instead of a subtraction of one label
71. ly by optimization and might then satisfy the conditions below This bug is more likely to occur when the number of temporary registers is insufficient upon code generation and the stack must be used instead However this does not mean that this bug always occurs because the occurrence of this bug depends on the number of registers used and the amount of stack space used upon code generation This bug might occur under the conditions below The conditions vary according to the CPU used V850 core or V850E V850ES core and the version of the CA850 used Conditions 1 When using a V850E V850ES core and CA850 Ver 2 40 or 2 41 or when using a V850 core and CA850 Ver 2 40 2 41 2 50 or 2 60 a The operation references a packed member of a structure and the member is a 1 a 2 byte member aligned to an odd address See Example 1 a 2 a4 byte member aligned to an address that cannot be divided by 4 See Example 2 b The operation is referenced from a structure pointer that uses structure packing the packing value for the structure is 1 and a 2 or 4 byte member is referenced See Example 1 ZBG CD 10 0030 Attachment 1 49 78 This bug might occur if a 1 a 2 or b is satisfied 2 When using a V850E V850ES core and CA850 Ver 2 50 or 2 60 a The operation references a packed member of a structure and a 1 the member is a 2 or 4 byte member aligned to an odd address See Example 1 a 2 the structure is allocated to th
72. m and minimum values of the label is up to three times the number of case labels 3 The switch statement satisfies one of the following conditions e The values of the case labels are not consecutive The order of the case labels does not matter e Multiple case labels branch to the same address e The case label processing continues without inserting a break statement ZBG CD 10 0030 Attachment 1 36 78 Example When the optimization option Ot is specified and compilation is executed Condition 1 void g void int alee void f void i 0 do switch i case 0 lt The number of case labels is 4 and the difference between the max i and min value of the case label is 3 Therefore table branch code break is output Condition 2 case 1 i lt Case label processing continues without inserting break case 2 Condition 3 i break default while i lt 4 Workaround Do one of the following 1 Remove the optimization option to reset to the default optimization 2 Specify xcase ifelse in CA850 Ver 2 40 or later 3 Specify Xcase binary in CA850 Ver 2 40 or later Correction This restriction has been removed in Ver 2 50 No 74 Restriction on initialization of bit field Description Invalid code will be output if 32 is specified as the number of bits in a bit field and that field is then initialized When initialization is not executed the following message w
73. member lt 2 gt Anelement of the member in lt 1 gt is accessed lt 3 gt The member does not use the object of the structure in lt 1 gt or another member If structure packing is specified and the structure used as a parameter is not aligned to 4 bytes this bug does not occur even if all these conditions are satisfied Example struct S int dummyl int dummy2 int buf 1 Condition 2 lt 1 gt struct S sobj int num static void sub struct S sobj Condition 1 int i 0 num sobj buf i Condition 2 lt 2 gt Condition 2 lt 3 gt func sub sobj ZBG CD 10 0030 Attachment 1 45 78 Compilation result rune add S5 sp ld w 4 A5 sp r11 lt The value is not passed as a parameter st w rll S_num 19 3 mov r0O rio add S5 sp l jmp 1p Workaround Specify the wp a option to suppress deletion of unreferenced parameters in a function to be inlined Correction This restriction has been removed in Ver 2 60 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 84 Restriction on function pointer Description If the following conditions are satisfied an invalid value might be assigned to a function pointer 1 A mask register is used The xmask_reg option is specified 2 254 or more variable or function names are included in a single compilatio
74. mp 0 label return tmp Workaround Specify the compiler option wo Nx to suppress set f optimization Correction This issue has been corrected Ver 2 72 ZBG CD 10 0030 Attachment 1 56 78 No 92 Restriction on flash external ROM re link function during linking Description If the condition below is satisfied when flash external ROM relinking is used in CA850 Ver 2 70 an unresolved relocation error below might occur or invalid code might be output without returning an error when linking a load module on the flash memory side 1d850 CA850 error F4163 output section tibss word overflowed or illegal label reference for symbol symbol in file file o value Oxffff9048 input section text offset 0x00000002 type R_V850_REGWBYTE symbol is allocated in section tibss word file a out Condition An external symbol in a load module on the boot side is referenced relative to tp the text pointer or ep the element pointer from a load module on the flash memory side When flash external ROM relinking is used a load module on the boot side and a load module on the flash memory side are created When an external symbol in the load module on the boot side is referenced from the load module on the flash memory side the offset is calculated based on the base pointer of the load module on the boot side and code is generated using the value However the value of tp gp or ep
75. n scale and variable usage conditions opt amp ig only applicable in cases when the add instruction is used with sign inversion Left right inversion of the op1 operand might also occur op2 amp val Variable identical to non volatile int unsigned long Or unsigned long Example x aj x b amp 0x000000f0 x c amp 0x00000f00 x d amp 0x0000f000 x e amp 0x000f0000 x f amp 0x00f00000 Code is not output x g amp 0x0f000000 Code is not output x h amp Oxf0000000 Code is not output Workaround Do one of the following 1 Do not specify optimization options Os or Ot in source files containing the above C code ZBG CD 10 0030 Attachment 1 11 78 2 Modify the C code as follows x O o amp 0x000000f0 amp 0x00000f00 0x0000 000 amp 0x000f0000 amp Ox00 00000 0x0 000000 amp Oxf 0000000 a a R 7 Q th Oo R Correction This restriction has been removed in Ver 2 40 No 18 Restriction on register assignment of runtime library Description Because the multiplication division operation is output by the runtime library the register assignment is invalid possibly causing the value of the r6 or r7 register to be corrupted This is true when the following five conditions are met 1 A V850 core device is specified 2 Os or Ot is specified 3 Either the multiplier in a multiplication expr
76. n the parameter area of Condition 1 ST st2 Conditions 2 and 3 Set using the called function The called function recognizes st2 i is inthis area Register variable register area Area accessed by st2 i Alignment hole Set using the called function lt Stack pointer sp ZBG CD 10 0030 Attachment 1 43 78 Workaround Do one of the following 1 Do not use packing of the relevant structure 2 Use the parameter as a pointer to the structure Correction This restriction has been removed in Ver 2 60 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 82 Restriction on data swap include function Description If the following conditions are satisfied the code generator outputs the error message below and the compiler stops 1 The V850E is specified as the device used 2 Any of the include functions __bsh ___bsw or ___hsw is used An include function that can be used only when the V850E is specified as the device is used 3 A specific register is assigned to the parameter in 2 4 The result of 2 is assigned to multiple locations 5 One or more assigned locations in 4 are different registers from the one in 3 6 The register in 3 is used later Message C6202 internal register overflow Example 1 int gi void funcl Int Liy 23 il i2 __bsw gi d_f
77. n unit including extern symbols 3 A function pointer is used 4 The address of a function is assigned to the function pointer in 3 Example The Xmask_reg option is specified Condition 1 253 functions Condition 2 int func254 return 254 int funcp Condition 3 void main funcp amp func254 Condition 4 Workaround Do one of the following 1 Remove the xXmask_reg option 2 Keep the number of variable and function names to within 253 in a single compilation unit Correction This restriction has been removed in Ver 2 60 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details ZBG CD 10 0030 Attachment 1 46 78 No 85 Restriction on included function __sasf Description If the following conditions are satisfied invalid code is output for __sasf 1 The V850E is specified as the device 2 A mask register is used The Xmask_reg option is specified 3 4 4 The first parameter of __sasf iS an unsigned short Of unsigned char variable allocated to a The function __sasf is used tidata ortibss section 5 The second parameter of __sasf is a conditional expression Example The V850E device and the Xmask_reg option are is specified Conditions 1 2 INE Gay EV pragma section tidata begin unsigned short tus pragma section tidata end vo
78. nf and scanf functions Description If conditions 1 to 3 are satisfied the parameter for the format specifier described in 3 is overwritten Conditions 1 The sscanf fscanf or scanf function is used 2 There are less entered fields than format specifiers 3 The first extra format specifier character is s e f g E F G or examples 1 and 2 If conditions 4 and 5 are satisfied the parameter for the format specifier described in 5 is overwritten Conditions 4 The sscanf fscanf or scanf function is used 5 are used as format specifier characters and the character pattern enclosed by them is not in the entered fields example 3 Example 1 When first extra format specifier is char aryl 5 float f1 2 0 2 3 0 sscanf aaaa ss Sf Sf aryl amp f1 amp f2 T First extra format specifier The input field aaaa is stored in aryl as a character string However there is no input field for the format specifiers sf and f after ss In this case the value of the parameter 1 for the first extra format specifier is overwritten Expected values aryl aaaa fl 2 0 f2 3 0 Output result aryl aaaa f1 0 0 2 3 0 Example 2 When first extra format specifier is s int datal data2 char ary2 5 test sscanf 1 2 Sd sd Ss amp datal amp data2 ary2 First extra format specifier The input field 1 is stored in data1 as a decimal integer Th
79. ng in moving the statement assigning variable X in Basic Block 1 to the back of the sentence assigning variable X in Basic Block 2 incorrectly Conditions 1 Optimization level is Og or higher Og O Os Ot and associated code optimizations 2 Control flow of function consists of Basic Blocks like a e a Either non volatile automatic variable X or non volatile argument variable X is assigned in both Basic Block 1 and 2 then referenced in Basic Block 3 b The value assigned to variable X in Basic Block 2 is either volatile variable expression or peripheral I O register expression c The path from Basic Block 1 is the only one merging into Basic Block 2 d After Basic Block 2 both path merging into Basic Block 3 and path not exist e No indirect access to variable X between Basic Block 1 and 3 Note A basic block is code that has one entry point one exit point and no jump instructions contained within it Example int g a 10 volatile int vl v2 void func void ant tb 0 12 0 if g i lt 10 i amp amp afi lt i2 ZBG CD 10 0030 Attachment 1 78 78 Control flow of the example code is as follows m x Ig ES za I Basic Block 1 O ali lt i2 gt referenced Basic Block 3 END Basic Block Workaround Insert __asm n before the line which the checktool output if g int y il vl i2 v2 __asm n for i 0 i l
80. on condition involves comparing the loop counter to a constant A constant is added to the loop counter i The loop counter i is used to index the array INT_MAX 12 which equals OxSFFFFFFF4 is too large to store in a 32 bit integer so this code might apply to this restriction Example 2 volatile int vi Intex 0 The loop counter i is not declared as volatile while i lt INT_MAX The loop termination condition involves comparing the loop counter to a constant i 100 The loop counter i is used as one multiplier in an expression with a constant The constant is in the range from 65 534 to 65 534 A constant is added to the loop counter i INT_MAX 100 which equals 0x31FFFFFF9C is too large to store in a 32 bit integer so this code might apply to this restriction Workaround Do one of the following 1 Change the constant in the loop termination condition as follows e The product of this constant and the size of an element in an array indexed using the loop counter is not too large to store in a 32 bit integer e The product of this constant and a constant multiplied with the loop counter is not too large to store ina 32 bit integer ZBG CD 10 0030 Attachment 1 67 78 2 Declare the loop counter as volatile Modify with volatile the automatic variable whose address is acquired Before modification i lt INT_MAX i After modification volatile int i for
81. on in 1 4 The condition in 1 evaluates to true There is a pseudo instruction that is conditionally assembled nested within the block that corresponds to the pseudo instruction in 1 Example LAGI LAG2 LAG3 LAG4 Seu SEL Set rset F E E F if FLAG1 set EMP 1 elseif FLAG2 1 Satisfies conditions 1 and 2 if FLAG3 Satisfies condition 4 set TEMP 2 Nested endif elseif FLAG4 Satisfies condition 3 set EMP 3 endif ZBG CD 10 0030 Attachment 1 74 78 Workaround When nesting a conditionally assembled pseudo instruction use either block 1 or 2 below 1 if pseudo instruction block if FLAG1 set TEMP 1 else if FLAG2 if FLAG3 set TEMP 2 Nested endif elseif FI 560 endif endif 2 elseif pseudo instruction block that ends with endif if FLAG1 Set EMP elseif FLAG4 1 set EMP elseif FLAG2 1 if FLAG3 set TEMP 2 Nested endif endif Correction This issue has been corrected in Ver 3 40 No 110 Restriction involving assignment within switch and if statements Description If the following conditions are satisfied the processing within switch or if statements might become incorrect as a result of optimization by the ca850 Conditions 1 The C source code satisfies conditions A to C example 1 A For a version earlier t
82. or operation in a stack frame is smaller than 4 bytes or is 125 bytes or larger The size can be confirmed by checking the value of R number output at the end of the function in the assembly list ZBG CD 10 0030 Attachment 1 48 78 5 The compiler uses any of r25 to r29 or lp r31 in the function and does not use r20 to r24 Caution This bug does not occur when Xpro_epi_runtime off is specified Example Checking the total size of the parameter area automatic variable area and register area for operation in the assemble list The R symbol is defined after the function set S20 Oxd4 set F20 Oxd4 set A20 0x80 set T20 0x0 set P20 0x0 set R20 O0xc0 lt This value set X20 0xc0 Workaround Specify the following option Xpro_epi_runtime off Correction This restriction has been removed in Ver 2 60 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 88 Restriction on generating code for complex expressions Description Invalid code might be generated or a compiler error E3228 illegal operand must be register might be output when executing a complex expression that includes many operations at least four operators are included if the expression satisfies the conditions below This bug might occur even if the number of operators is less than 4 because expressions are combined internal
83. ord begin char dummy 128 struct test unsigned char a unsigned short b unsigned int Gi test_u pragma section tidata_word end unsigned char ua void func ua test_u a ua The code on this line is invalid Workaround Allocate the relevant unsigned char variable to the tidata_byte section Correction This restriction has been removed in Ver 2 41 No 66 Restriction on constant expression in preprocessor directive Description Processing becomes invalid if a constant expression that includes multiplication is specified for an if preprocessor directive ZBG CD 10 0030 Attachment 1 32 78 Example define A 1 define B 2 void main if A B 2 func1 else func2 Condition judgment is illegally performed and invalid code will be output fendif Workaround There is no workaround Correction This restriction has been removed in Ver 2 41 No 67 Restriction whereby code is moved due to assembler optimization Description When the conditions below are satisfied the code for rewriting the stack pointer will be moved due to optimization by the assembler and a malfunction might occur depending on the timing at which interrupt servicing occurs Conditions 1 The V850E is specified as the target device This condition applies to all devices including the V850E if the V850E common object file creation option cn is specified 2 The optimization option Os or Ot
84. pragma inline is specified and the combination of optimization options ZBG CD 10 0030 Attachment 1 52 78 sae pragma inline Specified pragma inline Not Specified Specify all the following options This bug does not apply Wp NO a 1 Wp G0 Wp Sn Specify all the following options Wp N0 Wp G0 Wp Sn Wp Sn How to specify options in PM and PM In the Compiler Options dialog box click the Optimization2 tab and then input 0 in the Code Threshold text box for specifying the wp N0 option and 0 in the Stack Threshold field for specifying the wp G0 option To specify the wp Sn option click the Others tab and input Wp Sn in the Any Option text box b When using CA850 Ver 2 50 or Ver 2 60 do b 1 or b 2 b 1 Remove pragma inline and specify an optimization option other than ot b 2 Specify the options below if you do not remove pragma inline or change the optimization options Which option to specify varies depending on whether pragma inline is specified and the combination of optimization options Sa ee pragma inline Specified pragma inline Not Specified Wp no_inline This bug does not apply b 1 Wp no_inline optimizatic i This bug does not apply 5 specified b 1 How to specify options in PM and PM In the Compiler Options dialog box click the Detail of Optimization tab and specify No Expansion Wp no_inline in the Con
85. r 2 40 No 25 Restriction on accessing bits of the peripheral I O register Description The code generator cgen might output invalid code when a variable or expression that is assigned to a bit of a peripheral register is assigned to a register ZBG CD 10 0030 Attachment 1 14 78 Example void func unsigned char a int i 8 while i P0 0 a a gt gt 1 i Workaround Assign values instead of variables to a bit of the peripheral I O register Example void func unsigned char a int i 8 while i if a amp 0x1 P0 0 1 else P0 0 0 a gt gt 1 Correction This restriction has been removed in Ver 2 40 No 26 Restriction on volatile specification for nested structures and unions Description If a structure or union member nested in a structure or union is accessed using a pointer declared as volatile and if it is written as the left operand of a compound assignment operator volatile becomes invalid Example typedef union struct unsigned char a0 unsigned char al unsigned short a2 ja unsigned long c T define s volatile T 0x0100000 S a al Oxl Workaround Change the compound assignment operator to a simple assignment operator ZBG CD 10 0030 Attachment 1 15 78 Example S a al s a al 0x1 Correction This restriction has been removed in Ver 2 40 No 27 Restriction on NOT operator used with cons
86. riable larger than the size specified with num to a const section d Accessing variables that satisfy conditions b and c is specified In this case the restriction applies to the code of d 2 If the code is written in assembly language a The optimization option o is specified b An assembly language instruction to be expanded is written in a range specified with the pseudo instruction option volatile Of option nooptimize c The labels in the instruction that satisfies condition b have not been defined so far up to that line In this case the restriction applies to the code of d Example bss globl _Labell 1 lcomm _Labell 1 _Labell is defined in the same file tion data _lLabel2 _Label2 is defined in another file tion volatile st b r13 _Labell option novolatile option volatile st b r14 _Label2 option novolatile ZBG CD 10 0030 Attachment 1 64 78 In the above example an instruction that references _Labell and _Label2 is expanded into two instructions as shown below Among instructions that reference _Labe12 instructions newly generated through instruction expansion might be rearranged Case where instructions are not rearranged Case where instructions are rearranged option volatile option volatile movhi 0x0 gp rl movhi 0x0 gp rl st b ris Ox0 rL st b els CSO 847 option novolatile option novolatile movhi 0x0 gp rl lt This one is moved option volatil
87. ring Workaround Change the code as follows char c string struct S long 1 sobj long c Correction This restriction has been removed in Ver 2 50 No 15 Restriction on switch statement at the end of infinite loop Description If an infinite loop ends with a switch statement when ot or g is specified including when the statements following the switch statement are deleted as unnecessary processing an internal error is output This occurs only when a switch statement is used to branch from a switch statement to a jump table Message C6101 illegal intermediate file operator Workaround Do one of the following 1 Specify the Xcase ifelse option to avoid outputting the code to branch from a switch statement to a jump table 2 Specify the Xcase binary option to avoid outputting the code to branch from a switch statement to a jump table 3 Specify __asm n at the end of the infinite loop Correction This restriction has been removed in Ver 2 41 No 16 Restriction on debugging information symbol Description If optimization is not specified and the output of debugging information g is specified the linker outputs the message undefined symbol if an external or static variable is allocated to a register and the allocated area ends with either of the following e Multiplication by 2 1 e Multiplication by 2 1 Workaround Do one of the following 1 Specify
88. rt gt unsigned short unsigned short gt signed short unsigned short gt signed char 3 After casting the operand its type is the same as the type of the other operand 4 Other operand is treated as constant by way of compiler optimization 5 Comparison used in 1 occurs between constant in 4 and before casting of 2 This will always be true or always be false Example short s unsigned short us s l1 if s short us In this example even if the result of comparison operation depends on its operands CA850 incorrectly interprets the comparison result as always false This results in eliminating both the if sentence and if true block Workaround Insert __asm n before the line where incorrect comparison operation optimization occurs Checktool will identify the line number When a function that has incorrect comparison operation optimization is inlined checktool will identify the function name and its line number short s unsigned short us s l1 __asm n if s short us ZBG CD 10 0030 Attachment 1 77 78 Correction This issue will be corrected in Ver 3 46 A tool used to check whether this restriction applies is available Contact an Renesas Electronics sales representative or distributor for details No 112 Restriction on incorrect move optimization of assignment sentence Description No 112 occurs when the following conditions are satisfied resulti
89. s been removed in Ver 2 70 No 2 Restriction on length of assembly source Description If one line of the assembly source output from a C source program handling a very long variable name exceeds 1 024 characters an error occurs Workaround Shorten the variable name to keep the length of each line to within 1 023 characters Correction This restriction has been removed in Ver 2 50 No 3 Restriction on length of variable name Description If a variable name of 1 022 characters is specified with the g option and the source file is compiled an error occurs in the assembler because the assembler handles this variable name as 1 023 characters Workaround Shorten the variable name Correction This restriction has been removed in Ver 2 50 No 4 Restriction on precision during floating point constant operation Description If a floating point operation that might be inadvertently executed is specified for compilation that involves casting to an integer the precision drops very slightly and the value might become invalid as a result of casting to an integer No problem occurs if floating point data is handled without casting it Example long 1 12 100 Workaround Change the above statement as follows float f 1 12 long f 100 float f long f 1 12 100 Correction This problem will not be corrected so regard it as a specification ZBG CD 10 0030 Attachment 1 6 78 No 5 Restriction
90. ssembly error because it includes a string literal with 65 or more characters ZBG CD 10 0030 Attachment 1 62 78 Example char a a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa E3249 error Character string count a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 T f 1 10th 20th 30th 40th 50th 60th 65th Workaround Do one of the following For the following character string a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1 Replace with another character in the array declaration and replace this character with upon execution Example char a axaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa void main afl UG 2 Initialize the char array with characters Example 3 Write the above character string in the assembler Example sdata globl _a 62 a str a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 Correction This issue has been corrected in Ver 3 20 ZBG CD 10 0030 Attachment 1 63 78 No 102 Restriction on optimization with assembler Description As a result of specifying the pseudo instruction option volatile or option nooptimize which is functionally equivalent to option volatile in assembler code instructions that are placed in an area not subject to assembler optimization might be rearranged optimized as a result of expanding instruct
91. t 10 i if il lt a i amp amp a i lt i2 g a i Correction This issue will be corrected in Ver 3 46 A tool used to check whether this restriction applies is available Contact an Renesas Electronics sales representative or distributor for details ZBG CD 10 0030 Attachment 2 1 5 List of Usage Restrictions in Other Package Tools 1 Product History Version Restrictions and Changes Additions to Specifications 2 70 2 72 3 00 Restriction on replacement using regular expression in PM Restriction on square brackets in PM Restriction on linking prw file with PM Restriction on system call display by stk850 RX850 and RX850 Pro Restriction on specifying stack size of system calls with stk850 RX850 Restriction on handling of command file using PM Restriction on linking system calls of RX850 or RX850 Pro from library in PM Restriction on include files handled by PM x x x x O OO O Restriction on acquiring information on included C x x O source files handled by PM x Applicable O Not applicable Not relevant 2 Details of Usage Restrictions No 1 Restriction on replacement using regular expression in PM Description With PM if replacement processing of a character string is performed using the regular expression which indicates the line head and which indicates the end of t
92. ta_word section Restriction on constant expression in preprocessing Restriction whereby code is moved due to assembler optimization Restriction whereby the compiler stops during optimization Restriction on project manager during building Restriction on static function written in pragma section Restriction on pointer constant when accessing address with offset Restriction on optimization for if statement Restriction on optimization for switch statement Restriction on initialization of bit field Restriction on initialization of automatic array Restriction on ov flag in machine dependent optimization module Restriction on shift in machine dependent optimization module Restriction on union containing integer and pointer Restriction on compound assignment of values to bit field members when structured packing is specified Restriction on optimization for union containing integer and pointer Restriction on packed structure parameter Restriction on data swap include function Restriction on inlining a function with structure as parameter Restriction on function pointer Restriction on included function _sasf Restriction on conversion from float to short or unsigned short Restriction on interrupt function Restriction on generating code for complex expressions Restriction on parameter of inline function
93. tant 0 Description The not instruction is output by the NOT operator if it is used with the constant 0 when the optimization option 0s or Ot is specified Example Workaround Modify the code so that the same value is assigned to the variable that would be when using the NOT operator with the constant 0 a b Correction This restriction has been removed in Ver 2 40 No 28 Restriction on assembler optimization in V850E mode Description Although V850E is supported optimization of the assembler is not executed in the V850E mode Workaround There is no workaround Correction This restriction has been removed in Ver 2 50 No 29 Restriction on specifying optimization option Description If the level of the optimization option specified during compilation is raised the number of phases to be executed during compilation such as the optimization and compilation increases If the ot option is specified the size of the intermediate file created between these phases increases sometimes causing a fatal error in some cases Workaround Lower the optimization level by using Os Correction This problem will not be corrected so regard it as a specification No 30 Restriction on object file size during optimization Description When an optimization option is specified the size of an object file including debugging information might significantly increase Workaround Either lower the optimization level or
94. tatement for an x x x x x x 1 O OO O automatic variable whose address is acquired by a function is deleted illegally 104 Incorrect number of loop executions x x x x x x x x Oo 105 Incorrect string literals Ser x OR aN Be e lll oR tl cae ae o 106 Restriction involving format specifiers for the sscanf x x x x x x x x O fscanf and scanf functions 107 Restriction involving the character string parameter for x x x x x x x x O the atoi atol strtol and strtoul functions 108 Restriction involving initialization of a structure that x x x x o includes a bit field among its members 109 Restriction involving nested conditionally assembled x x x x x fx x x O pseudo instructions 110 Restriction involving assignment within switch and if s a a a a x a x 1 O statements 111 Restriction on incorrect compare operation optimization De e fx x x Se seit Sil x while casting 112 Restriction on incorrect move optimization of x E fx x x Px x x assignment sentence x Applicable O Not applicable Not relevant Check tool available ZBG CD 10 0030 Attachment 1 5 78 2 Details of Usage Restrictions No 1 Restriction on file name including space Description A file or directory name including a space must not be used Workaround Do not use a name or directory name including a space Correction This restriction ha
95. tion 01 or powerful optimization wi 04 is specified 2 During data flow optimization the following operation add addi sub subr or cmp exists in the machine dependent optimization module e Addition of NaNs results in an underflow and the result is a negative value Example Ox7fffffff 0x1 0x80000000 e Addition of negative values results in an underflow and the result is a NaN Example 0x80000000 0x80000000 0x0 e A negative value is subtracted from a non negative value and the result is a negative value same as comparison Example 0x7fffffff 0x80000000 Oxfffffffft 3 A conditional branch or conditional assignment lt lt gt gt references the ov flag in 2 4 The conditions in 2 and 3 are not detected in the global optimization module Workaround Do one of the following 1 Specify wi data_flow_opt 0 to suppress data flow optimization that causes this bug ZBG CD 10 0030 Attachment 1 38 78 2 Remove 01 or Wi 04 Correction This restriction has been removed in Ver 2 50 No 77 Restriction on shift in machine dependent optimization module Description If the following conditions are satisfied the equal sign comparison between the values shifted to the right arithmetically might be converted to a logical right shift 1 The optimization option Os or Ot is specified 2 Two values are shifted to the right arithmetically 3 The number of bits by which each value
96. to h is satisfied when these constants are unsigned integers the restriction applies However these conditions assume that the values of a and b are not floating point numbers or pointers although the indirect assignment of an integer pointer is regarded as a target for the conditions a 0 and 32768 lt b lt 32767 b a 2 and 32768 lt a lt 32767 c b 0 and 32768 lt a lt 32767 32768 lt a b lt 32767 or a b 2 and 32768 lt b lt 32767 b 0 and a lt 32767 f a b lt 32767 or a b 2 and b lt 32767 g a 0 and b lt 32767 h b a lt 32767 or b a 2 and a lt 32767 ZBG CD 10 0030 Attachment 1 55 78 Example 1 Anta if i i 0 condition 5 a goto label condition 3 i 1 condition 5 b label Even if a goto statement is not used explicitly a goto statement might be output internally depending on the optimization status of the compiler If the conditions are satisfied in such a case the restriction applies Example 2 if num Xa return 2 if num return 0 return 0 The above code internally outputs the code below which satisfies the conditions so the restriction applies Example 3 unsigned char tmp if num tmp 2 condition 5 a goto label condition 3 if num tmp 0 condition 5 b goto label condition 3 t
97. trol of Inline Expansion drop down list 2 Assign the parameter of the inline function to another variable before using the parameter 3 Specify the wp a option to suppress deletion of unreferenced parameters When specifying settings in PM or PM open the Compiler Options dialog box click the Others tab and input wp a in the Any Option text box Correction This restriction has been removed in Ver 2 70 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 90 Restriction on optimization for loop processing Description When a for loop while loop do while loop or if goto loop is executed while the following conditions are satisfied the loop is executed only once even if the loop count is set to two or more ZBG CD 10 0030 Attachment 1 53 78 Conditions 1 When using CA850 Ver 2 40 or Ver 2 41 a The level of the specified optimization option is Os Ot or higher b An unsigned int variable is used as the loop variable c The value of the loop variable is any of the following e Loop initial value Oxfffe or lower Loop end value Oxff 0002 or higher Loop increment Oxfffe or lower e Loop initial value Oxff 0002 or higher Loop end value Oxfffe or lower Loop decrement Oxfffe or lower d lt lt gt or 2 is used for loop variable comparison e None of the following are perform
98. unc i1 i2 Example 2 int gi void func2 volatile int il i2 if il i2 _bsw gi e_func il i2 else e func al z 3 Workaround Specify volatile for a variable to which the return value of the relevant include function is assigned At this time do not use the relevant include function in the middle of an expression Example 1 int gi void funcl volatile int il i2 Specify volatile for the variable of the return value ZBG CD 10 0030 Attachment 1 44 78 il i2 __bsw gi d_func il i2 Example 2 void func2 volatile int il i2 il i2 _bsw gi Move the include function outside the expression LEC 11 4 amp func Lite2 3 else func 21 12 J3 The following workarounds may be effective to avoid this bug because the register assignment conditions are changed 1 Change the optimization level 2 Change the order of the expression and insert a variable Correction This restriction has been removed in Ver 2 50 No 83 Restriction on inlining a function with structure as parameter Description If the following conditions are satisfied the code corresponding to the parameter is illegally deleted 1 The function to be inlined has a structure as a parameter 2 A member of the structure used as a parameter in 1 satisfies the following conditions lt 1 gt The member is an array structure or union and is defined as the second or a later
99. use the g option which outputs the debugging information only to the file to be debugged Correction This problem will not be corrected so regard it as a specification ZBG CD 10 0030 Attachment 1 16 78 No 31 Restrictions on debugging during optimization Description The following restrictions apply when an optimization option is specified for debugging the source 1 When the value of a variable is referenced a temporary value might be obtained in the middle of calculation instead of the correct value 2 If an element of an array a member of a structure or a user defined pointer is assigned to a register variables might be illegally displayed or modified in the Variable window of the debugger 3 If an element an automatic array or a member of a structure is not used the area might be deleted In this case variables might be illegally displayed or modified in the Variable window of the debugger The stack might be destroyed when a variable is modified Workaround There is no workaround Correction This problem will not be corrected so regard it as a specification No 32 Restriction on using _rcopy function in loop Description When the _rcopy function is used in a loop such as a while statement an internal error occurs if the optimization option Os or higher is specified Example 1 while _rcopy amp _S_romp 1 lt 0 Example 2 for 7 7 ret _rcopy amp _S_romp 1 if ret 0
100. usually executed correctly but it might be invalid if I O is mapped Example struct S int KEA sobj 3 bytes sobj x 1 Workaround There is no workaround Correction This problem will not be corrected so regard it as a specification No 35 Restriction on option nomacro pseudo instruction Description The mov instruction in the specified range of the option nomacro pseudo instruction might result in a syntax error ZBG CD 10 0030 Attachment 1 18 78 Example text option nomacro mov 0x12345678 r10 Workaround Remove the relevant mov instruction from the specified range of the option nomacro pseudo instruction Correction This restriction has been removed in Ver 2 70 No 36 Restriction on specifying only tilde in macro Description The assembler is terminated abnormally if only is specified in a macro Example macro MACRO endm MACRO Workaround Do not specify the above sort of code Correction This restriction has been removed in Ver 2 60 No 37 Restriction on tilde when macro is nested Description tilde might cause an error when a macro is nested Example macro inc w var reg ld w var reg add 1 reg st w reg var endm macro aaa rnum ld w r rnum r30 add L 730 st w r30 xr rnum endm macro bbb rnum inc w r rnum r30 endm set pathreg 25 text globl f aaa Spathreg OK bbb Spathreg Error macro MACRO
101. wever the above message is irrelevant because these areas can be allocated AREA1 0x 4040000 to 0x 40fffff AREA2 0x 8040000 to 0x 80fffff AREAS 0x c040000 to Ox cOfffff Specifically addresses of AREA1 AREA2 and AREA3 immediately after the internal ROM and before the external memory are output unnecessarily Workaround There is no workaround Correction This restriction has been removed in Ver 2 50 No 44 Restriction on object file name in archive file Description If an object file name in the archive file has 15 characters or more the following problems occur 1 Mapping cannot be performed as specified by the linker directive file 2 An invalid file name is displayed in the link map and error message Workaround Specify an object file name within 15 characters when creating an archive file Correction This restriction has been removed in Ver 2 50 No 45 Restriction on size of rompsec section displayed by m option of romp850 Description In the memory map displayed using the m option of romp850 the total size of the rompsec section is incorrect The displayed size is larger than the actual size because the size of the copy information section has been added Workaround Subtract the size of the copy information section from the size of the rompsec section or output the dump information using dump850 to obtain the correct size Correction This restriction has been removed in Ver 2 30 ZBG CD 10 0030 Attac
102. which is used as the base pointer becomes invalid due to this bug so any offset values that were calculated using tp or ep also become invalid This bug does not apply to code that performs gp relative reference because the offset values based on gp are calculated in a different way from the offset values based on tp and ep Workaround There is no workaround Correction This issue has been corrected in Ver 2 72 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 93 Restriction whereby error E2288 is output Description If the conditions below are satisfied error message E2288 is output and the CA850 is abnormally terminated E2288 return type mismatch xxxx yyyy Conditions 1 A function s data type does not match the data type of the value it returns Error E2288 is output if code is specified in which the function s data type and the data type of the return value type do not match 2 Structure packing is specified Xpack 3 The function s data type is struct or union In PM the error message is displayed and the execution results in error but the error count is incorrect Example struct S sobj struct 8 funel return amp sobj Error E2288 ZBG CD 10 0030 Attachment 1 57 78 Workaround Correct the function s data type and the data type of the return value type
103. wing is executed e The address of an automatic variable is assigned to an external 32 bit integer variable and then a function is called example 1 e The address of an automatic variable is assigned to an external variable whose address cannot be identified statically and then a function is called example 2 ZBG CD 10 0030 Attachment 1 65 78 Example 1 int a void funcl void int val a amp val val 1 lt Illegally deleted func2 Example 2 int ary 10 void funcl int i int val amp val lt Illegally deleted Workaround Do one of the following 1 Workaround using an option a The CA850 earlier than Ver 2 50 is used Do not specify the optimization option 0s or ot b The CA850 Ver 2 50 or later is used Specify the optimization option 0b or Od 2 Workaround by modifying the source Declare the automatic variable whose address is acquired as volatile Example volatile int val Correction This issue has been corrected in Ver 3 20 A tool used to check whether this restriction applies is available Contact an NEC Electronics sales representative or distributor for details No 104 Incorrect number of loop executions Description If all of the following conditions are satisfied a loop might execute the incorrect number of times Conditions 1 0Og O Os or Ot is specified as the optimization option 2 The loop counter is not declared as volatile 3 T
Download Pdf Manuals
Related Search
Related Contents
DeLonghi 6708EK Electric Heater User Manual Woxter ICube1500 Manual SL-13MSE SALES DECLARATION USER GUIDE WR 110 - Tecnica Industriale S.r.l. Diretrizes básicas para S&S Samsung ES75 Kasutusjuhend Kurzanleitung / Quick Guide / Mode d`emploi / Verkorte PORTUGUÊS Copyright © All rights reserved.
Failed to retrieve file